Mohamed Kamal Mohamed Kamal - 1 year ago 246
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 Source

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 :

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download