How can I detect color with a webcam with OpenCV?

Started by Jules, November 17, 2016, 07:04:54 PM

Previous topic - Next topic


Hi all, I would like to ask you a big question for those who do medicine, how can i detect color with a webcam with opencv? I thank you for giving me your answer as soon as possible, Thank you in advance.


Every image is represented as a matrix. If it is a grayscale image each element of the matrix represents a gray-scale intensity from 0 to 255.

If it is an RBG image, each element is a tuple representing the intensity of Red, Blue and Green colors. E.g. (255, 255,255) is white, (0,0,0) is gray.

First identify your region of interest, and then you can check the matrix elements in that area.