Image of HSV color wheel for openCV?

16,026

in opencv, the hsv image has to fit into 3 8-bit channels, (no problem for S and V [0..255]) .

since H is in the [0..360] range, the actual values get divided by 2, so it fits into a uchar.

just divide any value in the diagram above by 2. ( or multiply the value you get from opencv )

Share:
16,026
skm
Author by

skm

Interested in digital image processing, motion analysis, pattern recognition... :)

Updated on June 13, 2022

Comments

  • skm
    skm almost 2 years

    I have written the code for histogram and i want to use it for SVM traning. But the fundamental problem is that i don't understand how many minimum number of bins i should choose so that i can get widely varied distribution among bins for different colors (red,green,yellow,blue,orange).

    So, can somebody give me the link/post the image of Hue color wheel for openCV. I need something as shown below but the hue range in it is 0-360 and i need a color wheel used by opencv (i.e. 0-180 )

    image

  • skm
    skm about 10 years
    i am not sure if it will work or not. I would prefer to have an image which can be trusted as this histogram is giving me too much trouble even in finding the simple colors.
  • berak
    berak about 10 years
    hey, i'm talking only about the range , not perceptual problems
  • skm
    skm about 10 years
    yeah, i just meant that dividing the range by 2 is a trustable method. For example, in the image given above the range of yellow is from 45-75 so, in opencv the range would be 22.5-37.5. Doing so will be ok?