Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Result of inRange ?


Since a couple of days, I've been testing image processing using the inRange function. First I found out that HSV values are different for Gimp and OpenCV. So after converting, I found values I thought I should use and notice that the returned image doesn't show the object(s) itself but merely the outlines of the object(s) within the specified colour range. The values I use to filter on yellow-ish are:

inRange(imageHSVMat, Scalar(20, 20, 20), Scalar(30, 200, 200), imageThreshMat);

While what I want is to find the object and then use findContours. In the version of my code with the C-API (using cvInRangeS) I did get want I want but the new compiler doesn't accept it. So is my new way using inRange correct or should I use different functions in the C++ API ?