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

lti::relativeThresholding Class Reference

This class implements percentual Thresholding. More...

#include <ltiRelativeThresholding.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class relativeThresholding More...

Public Member Functions

 relativeThresholding ()
 relativeThresholding (const parameters &par)
 relativeThresholding (const relativeThresholding &other)
virtual ~relativeThresholding ()
virtual const char * getTypeName () const
bool apply (channel &srcdest) const
bool apply (channel8 &srcdest) const
bool apply (const channel &src, channel &dest) const
bool apply (const channel8 &src, channel8 &dest) const
relativeThresholdingcopy (const relativeThresholding &other)
relativeThresholdingoperator= (const relativeThresholding &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

This class implements percentual Thresholding.

The parameter values highThreshold and lowThreshold inherited from thresholding::parameters are interpreted as percentages. i.e. lowThreshold = 0.5f means that approximately the lower 50% of the pixels will be cut off.

It uses a simple histogramm with thresholding::parameters::bins to calculate the absolute thresholds.

 #include ltiRelativeThresholding.h
 
 lti::relativeThresholding::parameters rtPar;
 rtPar.lowThreshold   = 0.5f;
 // creates a black&white mask
 rtPar.outRegionValue = 0.0f;
 rtPar.inRegionValue  = 1.0f;
 rtPar.keepInRegion   = false;

 lti::relativeThresholding rt(rtPar);
 rt.apply(sourcechannel,destchannel);

Constructor & Destructor Documentation

lti::relativeThresholding::relativeThresholding (  ) 

default constructor

lti::relativeThresholding::relativeThresholding ( const parameters par  ) 

Construct a functor using the given parameters.

lti::relativeThresholding::relativeThresholding ( const relativeThresholding other  ) 

copy constructor

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

destructor


Member Function Documentation

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

operates on a copy of the given parameters.

Parameters:
src channel8 with the source data.
dest channel8 where the result will be left.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::thresholding.

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

operates on a copy of the given parameters.

Parameters:
src channel with the source data.
dest channel where the result will be left.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::thresholding.

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

operates on the given parameter.

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

Reimplemented from lti::thresholding.

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

operates on the given parameter.

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

Reimplemented from lti::thresholding.

virtual functor* lti::relativeThresholding::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::thresholding.

relativeThresholding& lti::relativeThresholding::copy ( const relativeThresholding 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::relativeThresholding::getParameters (  )  const

returns used parameters

Reimplemented from lti::thresholding.

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

returns the name of this type ("relativeThresholding")

Reimplemented from lti::thresholding.

relativeThresholding& lti::relativeThresholding::operator= ( const relativeThresholding other  ) 

alias for copy member

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

Reimplemented from lti::functor.


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

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