I've been running a hue difference algorithm on some images. Hue difference generally means difference in color, and only color, regardless of contrast:
But, I've noticed a nasty effect with some images:
As you can see, cyan and yellow appeared out of nowhere. To be totally sure, I have run a test where the hue in the image was set to 1
and lightness to 0.5
:
The broken colors really seem to be near black/white pixels on almost every image. I use this rgb/hsl algorighm.
During every operation on images before, colorless pixels (lightness = 1 or 0 OR saturation = 0) were treated differently (their undefined color did not affect the calculation).
My questions about the problem:
- Are the colors real, or is it a bug in RGB/HSL
- Either way, is it possible to filtrate them out?