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 comment by andrew.k...@gmail.com
on 19 May 2008 at 6:01
Original comment by andrew.k...@gmail.com
on 19 May 2008 at 6:08
How about adding Hue histogram too to the class?
Original comment by piyoo...@gmail.com
on 19 May 2008 at 6:38
How do think it should work ? :)
Hue is cyclic value, so such values like mean, median and std. dev. will give
you 0
information.
Suppose you have 2 value on the histogram: 0 and 359. Both of them are for red
color. So, if mean will be 180 will it be true ? No.
Original comment by andrew.k...@gmail.com
on 19 May 2008 at 7:20
I agree...
However, histograms may not be used only to get statistical values. Histogram
simply
represents a collection of frequencies for various bins (which may not be
numerical
e.g. days of week). For cases when there is no definition of statistical values
like
mean, we can use such GenericHistogram<T>.
Addition of GenericHistogram would be an enhancement to the AForge class
hierarchy
allowing the use of a base type for handling any histograms without frills of
specialized functions (statistical, etc).
Hence, my suggestion would be to derive the other Histogram classes from
GenericHistogram<T>. The classes like ImageStatisticsHSL can expose the
corresponding derived histogram types or the generic type as allowed by their
semantics.
Original comment by piyoo...@gmail.com
on 19 May 2008 at 8:30
If you would like, you may register a new issue requesting new feature. This
particular issue is fixed and closed.
Original comment by andrew.k...@gmail.com
on 19 May 2008 at 5:38
Original issue reported on code.google.com by
piyoo...@gmail.com
on 9 May 2008 at 7:48