i convert image to HSV after it i make the threshold the yellow color so the code is cvInRangeS(imgHSV, cvScalar(112, 100, 100), cvScalar(124, 255, 255), imgThreshed); but it doesn't work always give me black image .
OpenCV has some built-in functions to perform Color detection and Segmentation operations. So what are Color Detection and Segmentation Techniques in Image Processing? Color detection is a technique of detecting any color in a given range of HSV (hue saturation value) color space.
BGR color space: OpenCV's default color space is RGB. However, it actually stores color in the BGR format.
getcolors()" function in PIL which returns a {color,count}.
You should try this tutorial for "tracking yellow objects".
It gives a HSV range of cvInRangeS(imgHSV, cvScalar(20, 100, 100), cvScalar(30, 255, 255), imgThreshed)
for yellow object.
If you have any doubt on selecting color, try this : http://www.yafla.com/yaflaColor/ColorRGBHSL.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With