What's the fastest way to find x and y coordinates of a pixel with a given rgb value? In this example the black pixel is at 100x100. Should I use openCV or Image? Does anyone have an idea or an example for me?
#!/usr/bin/env python
# coding: utf-8
import Image
img = Image.open('splash.png')
rgb = img.convert('RGB')
r, g, b = rgb.getpixel((100, 100))
print r, g, b
#for pixel in rgb.getdata():
# print pixel
>>>0 0 0
As you can see I need the opposite way.