latest version v1.9 - last update 10 Apr 2010 |
This class implements percentual Thresholding. More...
#include <ltiRelativeThresholding.h>
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 |
relativeThresholding & | copy (const relativeThresholding &other) |
relativeThresholding & | operator= (const relativeThresholding &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
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);
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
other | the object to be copied |
virtual lti::relativeThresholding::~relativeThresholding | ( | ) | [virtual] |
destructor
operates on a copy of the given parameters.
Reimplemented from lti::thresholding.
operates on a copy of the given parameters.
Reimplemented from lti::thresholding.
bool lti::relativeThresholding::apply | ( | channel8 & | srcdest | ) | const [virtual] |
operates on the given parameter.
srcdest | channel8 with the source data. The result will be left here too. |
Reimplemented from lti::thresholding.
bool lti::relativeThresholding::apply | ( | channel & | srcdest | ) | const [virtual] |
operates on the given parameter.
srcdest | channel with the source data. The result will be left here too. |
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.
other | the functor to be copied |
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 | ) |