latest version v1.9 - last update 10 Apr 2010 |
HistogramEqualization equalizes the values of the given channel, channel8, vector<ubyte> or fvector within the given input range and maps these equalized values to the given output range. More...
#include <ltiHistogramEqualization.h>
Classes | |
class | parameters |
the parameters for the class histogramEqualization More... | |
Public Member Functions | |
histogramEqualization (const float upperLimit=1.0f) | |
histogramEqualization (const histogramEqualization &other) | |
virtual | ~histogramEqualization () |
virtual const char * | getTypeName () const |
bool | apply (channel &srcdest) const |
bool | apply (channel8 &srcdest) const |
bool | apply (fvector &srcdest) const |
bool | apply (vector< ubyte > &srcdest) const |
bool | apply (const channel &src, channel &dest) const |
bool | apply (const channel8 &src, channel8 &dest) const |
bool | apply (const fvector &src, fvector &dest) const |
bool | apply (const vector< ubyte > &src, vector< ubyte > &dest) const |
histogramEqualization & | copy (const histogramEqualization &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
HistogramEqualization equalizes the values of the given channel, channel8, vector<ubyte> or fvector within the given input range and maps these equalized values to the given output range.
The algorithm used can be found in Sonka et. al "Image Processing, Analysis and Machine Vision" 2nd Edition, PWS Publishing, pp. 60-61
Example using HistogramEqualization
// The channel to be equalized and the result channel lti::channel src,dest; // ... initialize channel src here ... // set parameters and construct the functor lti::histogramEqualization::parameters param; // parameters param.cells = 256; // cells param.lowerInputLimit=0.0; // equalizes the dark values param.upperInputLimit=0.2; // param.lowerOutputLimit=0.6; // renders the equalized values lighter param.upperOutputLimit=1.0; // lti::histogramEqualization equalizer(param); // functor // equalizes the values within input range, maps them to the output range // and returns the partly equalized channel in dest. equalizer.apply(src,dest);
lti::histogramEqualization::histogramEqualization | ( | const float | upperLimit = 1.0f |
) |
default constructor
upperLimit | upper value used for the input and output upper limits. It is 1.0f as default, but if you plan to equalize channel8 objects, you should use 255 |
lti::histogramEqualization::histogramEqualization | ( | const histogramEqualization & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::histogramEqualization::~histogramEqualization | ( | ) | [virtual] |
destructor
bool lti::histogramEqualization::apply | ( | const vector< ubyte > & | src, | |
vector< ubyte > & | dest | |||
) | const [virtual] |
equalize the src vector and write result in dest
src | the input data | |
dest | the vector where the result will be left |
Reimplemented from lti::modifier.
returns the dest fvector with equalized values of the src fvector
src | the input data | |
dest | the fvector where the result will be left |
Reimplemented from lti::modifier.
returns the dest channel8 with equalized values of the src channel8
src | the input data | |
dest | the channel8 where the result will be left |
Reimplemented from lti::modifier.
returns the dest channel with equalized values of the src channel
src | the input data | |
dest | the channel where the result will be left |
Reimplemented from lti::modifier.
equalizes the values of the given vector<ubyte>
Reimplemented from lti::modifier.
bool lti::histogramEqualization::apply | ( | fvector & | srcdest | ) | const |
equalizes the values of the given fvector
Reimplemented from lti::modifier.
bool lti::histogramEqualization::apply | ( | channel8 & | srcdest | ) | const [virtual] |
equalizes the values of the given channel8
Reimplemented from lti::modifier.
bool lti::histogramEqualization::apply | ( | channel & | srcdest | ) | const [virtual] |
equalizes the values of the given channel
Reimplemented from lti::modifier.
virtual functor* lti::histogramEqualization::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
histogramEqualization& lti::histogramEqualization::copy | ( | const histogramEqualization & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::histogramEqualization::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::modifier.
virtual const char* lti::histogramEqualization::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("histogramEqualization")
Reimplemented from lti::modifier.