Webastor - Programming Tips and Tricks

Programming language => PHP => Topic started by: Francis on November 17, 2016, 07:04:54 PM

Title: How can I detect color with a webcam with OpenCV?
Post by: Francis on November 17, 2016, 07:04:54 PM
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.
Title: Re: color with a webcam with OpenCV?
Post by: Tom on January 09, 2018, 06:16:04 PM
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.