Define a histogram as accumulator which returns an image3d. More...
#include <histo3d_rgb.hh>
Inherits base< image3d< unsigned >, histo3d_rgb< V > >.
Public Member Functions | |
bool | is_valid () const |
Check whethever this accumulator is able to return a result. | |
void | take_as_init (const T &t) |
Take as initialization the value t . | |
void | take_n_times (unsigned n, const T &t) |
Take n times the value t . | |
histo3d_rgb () | |
Constructors. | |
void | init () |
Manipulators. | |
void | take (const argument &t) |
Update the histogram with the RGB pixel t. | |
void | take (const histo3d_rgb< V > &other) |
Update the histogram with an other histogram. | |
result | to_result () const |
Accessors. |
Define a histogram as accumulator which returns an image3d.
Param V defines the type of the input image value. It is in this space that we count the values. For instance, this histogram works well for image2d< rgb<2> > or with image2d< rgb<7> >. The number of bins depends directly the values V. For 8 bits there is 256x3 bins. Note that less quantification works too.
Definition at line 167 of file histo3d_rgb.hh.
mln::accu::stat::histo3d_rgb< V >::histo3d_rgb | ( | ) | [inline] |
Constructors.
Infer the size of the resulting image3d domain. By evaluating the minimum and the maximum of V, we define the domain of the resulting image3d.
Definition at line 244 of file histo3d_rgb.hh.
void mln::accu::stat::histo3d_rgb< V >::init | ( | ) | [inline] |
Manipulators.
Initialize the histogram with zero value. This method must be called just before starting the use of the histogram. If it's not, resulting values won't converge to the density.
Definition at line 268 of file histo3d_rgb.hh.
References mln::data::fill(), and mln::literal::zero.
bool mln::accu::stat::histo3d_rgb< V >::is_valid | ( | ) | const [inline] |
Check whethever this accumulator is able to return a result.
Depends if the resulting image1d is valid. We can assume it is quite always the case.
Definition at line 307 of file histo3d_rgb.hh.
void mln::accu::stat::histo3d_rgb< V >::take | ( | const argument & | t | ) | [inline] |
Update the histogram with the RGB pixel t.
[in] | t | a graylevel pixel of type V. |
The end user shouldn't call this method. In place of it, he can go through the data compute interface.
Definition at line 275 of file histo3d_rgb.hh.
void mln::accu::stat::histo3d_rgb< V >::take | ( | const histo3d_rgb< V > & | other | ) | [inline] |
Update the histogram with an other histogram.
[in] | other | the other histogram. |
The end user shouldn't call this method. This is part of data compute interface mechanism.
Definition at line 286 of file histo3d_rgb.hh.
void mln::Accumulator< histo3d_rgb< V > >::take_as_init | ( | const T & | t | ) | [inherited] |
Take as initialization the value t
.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
void mln::Accumulator< histo3d_rgb< V > >::take_n_times | ( | unsigned | n, | |
const T & | t | |||
) | [inherited] |
Take n
times the value t
.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
histo3d_rgb< V >::result mln::accu::stat::histo3d_rgb< V >::to_result | ( | ) | const [inline] |
Accessors.
Return the histogram as an RGB image3d. This is the machinery to communicate with data compute interface. The end user should'nt use it.
Definition at line 293 of file histo3d_rgb.hh.