Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

it is probably easier, than you thought:

in python, images are just numpy arrays, so you could access a single pixel at x,y like:

color = image[y,x] # row major, like in opencv

it is probably easier, than you thought:

in python, images are just numpy arrays, so you could access a single pixel at x,y like:

color = image[y,x] # row major, like in opencv

given a bgr image (3 channels), you'll recieve a tuple, such as:

(12,156,222)

to get a single hex value from that:

hex = (color[0] << 16) + (color[1] << 8) + (color[2])