Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You have to look at Hue color wheel and remember that:

  • In OpenCV range for the Hue is: 0..180 (for 8bit images)
  • Red is close to 0 and close to 180
  • Coloured Light might change perceived color

See my previous answer for more details

Red = Hue(0...9) AND Hue(151..180)
Orange = Hue(10...15)
Yellow = Hue(16..45)
Green = Hue(46..100)
Blue = Hue(101..150)

In addiction to select only full color I would use Saturation and Brightness 128..255

White have Low saturation and high Brightness... let say

White = Saturation(0..20) AND Value(230..255)