Reputation: 189594
I'm using the python OpenCV bindings and at the moment I try to isolate a colorrange. That means I want to filter out everything that is not reddish.
I tried to take only the red color channel but this includes the white spaces in the Image too.
What is a good way to do that?
Upvotes: 1
Views: 3302
Reputation: 17056
Use the HSV colorspace. Select pixels that have an H value in the range that you consider to contain "red," and an S value large enough that you do not consider it to be neutral, maroon, brown, or pink. You might also need to throw out pixels with low V's. The H dimension is a circle, and red is right where the circle is split, so your H range will be in two parts, one near 255, the other near 0.
Upvotes: 1
Reputation: 10575
Use a different color space: http://en.wikipedia.org/wiki/HSL_color_space
Upvotes: 4