Closed GoogleCodeExporter closed 8 years ago
I might be wrong saying that here Hue doesn't matter. Pls. confirm. Thanks.
Original comment by piyoo...@gmail.com
on 9 May 2008 at 8:51
Original comment by andrew.k...@gmail.com
on 13 May 2008 at 6:33
In this particular case there is no issue. Since the HSL value is calculated
from
RGB, then all non black pixels will form non zero components in HSL. If at
least one
HSL component is not equal to zero, then original RGB value represents non
black
pixel. In generic case of course I agree – the fact that Saturation or Hue is
not
set to zero does not mean that pixel is non black (luminance makes the
decision).
But, you are right. It is possible to make some tuning. In HSL color space
black is
represented by Luminance equal to zero (independent of other components). If
luminance is not zero, then it is not black and it represents RGB other then
(0,0,0). So I've simplified the check to:
if ( hsl.Luminance != 0.0 )
Fixed in revision 473. Will be released in AForge.NET 1.6.3.
Original comment by andrew.k...@gmail.com
on 13 May 2008 at 7:14
Original issue reported on code.google.com by
piyoo...@gmail.com
on 9 May 2008 at 7:48