Ask Your Question

# Revision history [back]

Your image is mostly gray; so the "hue" parameter doesn't make much sense.

The hue parameter is the angle of a given color relative to the gray on the color wheel (see below).

Normally the hue parameter should be 0 in the gray areas, but every digital image has some noise, so the position of the color of the pixels on the hue circle varies a bit around the neutral gray. If a pixel is just a bit yellow, and the next one just a bit blue, the hue parameter will be opposite! (45° and 225°)

The blotches are because the JPG is a lossy compression and it compresses a lot the chrominance channel creating color blotches.

Anyway, as a general rule, when processing HSV (or HSL) images, use all the channels, not only the hue (e.g. to segmenta a color, instead of just (a<hue<b) use (a<hue<b)&(saturation>c)&(luminosity>d)).

Your image is mostly gray; so the "hue" parameter doesn't make much sense.

The hue parameter is the angle of a given color relative to the gray on the color wheel (see below).

Normally the hue parameter should be 0 in the gray areas, but every digital image has some noise, so the position of the color of the pixels on the hue circle varies a bit around the neutral gray. If a pixel is just a bit yellow, and the next one just a bit blue, the hue parameter will be opposite! (45° and 225°)

The blotches are because the JPG is a lossy compression and it compresses a lot the chrominance channel creating color blotches.

I suggest to test your method on a colorful image, you'll see the difference.

Anyway, as a general rule, when processing HSV (or HSL) images, use all the channels, not only the hue (e.g. to segmenta a color, instead of just (a<hue<b) use (a<hue<b)&(saturation>c)&(luminosity>d)).