LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::histogramEqualization Class Reference

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>

Inheritance diagram for lti::histogramEqualization:
Inheritance graph
[legend]
Collaboration diagram for lti::histogramEqualization:
Collaboration graph
[legend]

List of all members.

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
histogramEqualizationcopy (const histogramEqualization &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

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);

Constructor & Destructor Documentation

lti::histogramEqualization::histogramEqualization ( const float  upperLimit = 1.0f  ) 

default constructor

Parameters:
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

Parameters:
other the object to be copied
virtual lti::histogramEqualization::~histogramEqualization (  )  [virtual]

destructor


Member Function Documentation

bool lti::histogramEqualization::apply ( const vector< ubyte > &  src,
vector< ubyte > &  dest 
) const [virtual]

equalize the src vector and write result in dest

Parameters:
src the input data
dest the vector where the result will be left
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::histogramEqualization::apply ( const fvector src,
fvector dest 
) const [virtual]

returns the dest fvector with equalized values of the src fvector

Parameters:
src the input data
dest the fvector where the result will be left
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::histogramEqualization::apply ( const channel8 src,
channel8 dest 
) const [virtual]

returns the dest channel8 with equalized values of the src channel8

Parameters:
src the input data
dest the channel8 where the result will be left
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::histogramEqualization::apply ( const channel src,
channel dest 
) const [virtual]

returns the dest channel with equalized values of the src channel

Parameters:
src the input data
dest the channel where the result will be left
Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::histogramEqualization::apply ( vector< ubyte > &  srcdest  )  const [virtual]

equalizes the values of the given vector<ubyte>

Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::histogramEqualization::apply ( fvector srcdest  )  const

equalizes the values of the given fvector

Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::histogramEqualization::apply ( channel8 srcdest  )  const [virtual]

equalizes the values of the given channel8

Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.

bool lti::histogramEqualization::apply ( channel srcdest  )  const [virtual]

equalizes the values of the given channel

Returns:
true if ok, false otherwise.

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.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

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")

Returns:
true if ok, false otherwise.

Reimplemented from lti::modifier.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:24 2010 for LTI-Lib by Doxygen 1.6.1