Mohamed Kamal Mohamed Kamal - 2 months ago 32
C Question

detect yellow color in opencv

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 .

Answer

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

Comments