Hello,
Please i need your help, i want to detect a red color in an image, i change the channel to HSV to detect "lower red" and "upper red" by this code and it's working : .
cvtColor(im, imHSV, COLOR_BGR2HSV);
Mat mask1 = Mat();
Mat mask2 = Mat();
inRange(imHSV, Scalar(0, 70, 50), Scalar(10, 255, 255), mask1);
inRange(imHSV, Scalar(170, 70, 50), Scalar(180, 255, 255), mask2);
Mat mask_combined = Mat();
bitwise_or(mask1, mask2, mask_combined);
But i have a problem with this image (in the top right of the image), it's detected as red, i think it's the reflexion of light on a red object :
I used this link ( https://pinetools.com/image-color-picker) to find HSV values of this part of the image, and that's what i found : it's aroud : H : 18 S : 29 V : 27
I I don't understand why i am detecting this as red, i need your help and thank you.