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

lti::optimalThresholding Class Reference

Threshold segmentation of a single channel with the optimal threshold value. More...

#include <ltiOptimalThresholding.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class optimalThresholding More...

Public Member Functions

 optimalThresholding ()
 optimalThresholding (const optimalThresholding &other)
virtual ~optimalThresholding ()
virtual const char * getTypeName () const
bool apply (channel &srcdest)
bool apply (channel8 &srcdest)
bool apply (const channel &src, channel &dest)
bool apply (const channel8 &src, channel8 &dest)
optimalThresholdingcopy (const optimalThresholding &other)
virtual functorclone () const
const parametersgetParameters () const
float getThreshold (const channel &src) const
int getThreshold (const channel8 &src) const
int getThreshold (const vector< float > &histo) const
int getThreshold (const vector< double > &histo) const
int getThreshold (const vector< int > &histo) const

Detailed Description

Threshold segmentation of a single channel with the optimal threshold value.

The optimal threshold value is calculated iteratively according to Sonky, Hlavac, Boyle: "Image Processing, Analysis and Machine Vision", p.129)


Constructor & Destructor Documentation

lti::optimalThresholding::optimalThresholding (  ) 

default constructor

lti::optimalThresholding::optimalThresholding ( const optimalThresholding other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::optimalThresholding::apply ( const channel8 src,
channel8 dest 
)

segmentate the channel src, and leave the result in dest.

lowThreshold is set to the optimal threshold value, highThreshold is set to 1.0 and thresholding is applied

Parameters:
src channel8 with the source data.
dest channel8 where the segmentated data will be left.
Returns:
true if apply successful or false otherwise
bool lti::optimalThresholding::apply ( const channel src,
channel dest 
)

segmentate the channel src, and leave the result in dest lowThreshold is set to the optimal threshold value, highThreshold is set to 1.0 and thresholding is applied

Parameters:
src channel8 with the source data.
dest The segmentated data will be left here.
Returns:
true if apply successful or false otherwise
bool lti::optimalThresholding::apply ( channel8 srcdest  ) 

segmentates a channel on place lowThreshold is set to the optimal threshold value, highThreshold is set to 1.0 and thresholding is applied

Parameters:
srcdest channel8 with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise
bool lti::optimalThresholding::apply ( channel srcdest  ) 

segmentates a channel on place lowThreshold is set to the optimal threshold value, highThreshold is set to 1.0 and thresholding is applied

Parameters:
srcdest channel with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise
virtual functor* lti::optimalThresholding::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::thresholding.

optimalThresholding& lti::optimalThresholding::copy ( const optimalThresholding other  ) 

copy data of "other" functor.

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

Reimplemented from lti::thresholding.

const parameters& lti::optimalThresholding::getParameters (  )  const

returns used parameters

Reimplemented from lti::thresholding.

int lti::optimalThresholding::getThreshold ( const vector< int > &  histo  )  const

calculates the optimal thresholding value for the given histogram

Parameters:
histo the vector containing a 1D histogram
Returns:
the index in the histogram which corresponds to the optimal threshold.
int lti::optimalThresholding::getThreshold ( const vector< double > &  histo  )  const

calculates the optimal thresholding value for the given histogram

Parameters:
histo the vector containing a 1D histogram
Returns:
the index in the histogram which corresponds to the optimal threshold.
int lti::optimalThresholding::getThreshold ( const vector< float > &  histo  )  const

calculates the optimal thresholding value for the given histogram

Parameters:
histo the vector containing a 1D histogram
Returns:
the index in the histogram which corresponds to the optimal threshold.
int lti::optimalThresholding::getThreshold ( const channel8 src  )  const

calculates the optimal thresholding value for a given channel

float lti::optimalThresholding::getThreshold ( const channel src  )  const

calculates the optimal thresholding value for a given channel

virtual const char* lti::optimalThresholding::getTypeName (  )  const [virtual]

returns the name of this type ("optimalThresholding")

Reimplemented from lti::thresholding.


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

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