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

lti::dilation Class Reference
[Morphology operators]

Dilation functor. More...

#include <ltiDilation.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class dilation More...

Public Member Functions

 dilation ()
 dilation (const mathObject &aKernel)
 dilation (const dilation &other)
virtual ~dilation ()
virtual const char * getTypeName () const
bool apply (channel &srcdest) const
bool apply (channel8 &srcdest) const
bool apply (fvector &srcdest) const
bool apply (vector< channel8::value_type > &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< channel8::value_type > &src, vector< channel8::value_type > &dest) const
dilationcopy (const dilation &other)
virtual functorclone () const
const parametersgetParameters () const
void setKernel (const mathObject &aKernel)

Detailed Description

Dilation functor.

This functor implements the morphological operator "dilation". Through the parameters a "binary" or "gray scale" modus can be choosen, and the structuring element (represented by a linear filter kernel) can be given.

For mode Binary the destination image is set to the norm value of the kernel used if there is a source element in the kernel region that is not zero and to zero otherwise.

The definition for mode Gray can be found in e.g. Gonzalez, R. and Woods, R. Digital Image Processing, 2nd Edition, pp. 550--553, Prentice Hall, 2002

/code dest(s,t) = max(src(s-x, t-y) + kernel(x,y)) /endcode

where the regions of the kernel and source overlap. Qualitatively the Gray operation results in brightening esp. dark details. For channel8 the resulting values are clipped to be in the allowed range of [0,255]. Note that for channels the kernel values should be much lower than the default 1.f. Also note that when the kernel is separable (sepKernel) the values of all column and row kernels are subtracted. An example is chessBoardKernel.

Example:

 lti::dilation dilator;                    // the dilation functor
 lti::dilation::parameters dilationParam;  // the parameters

 lti::euclideanKernel<float> theKern(3);   // a circular kernel

 // binary dilation
 dilationParam.mode = lti::dilation::parameters::Binary;
 dilationParam.setKernel(theKern);

 // set the parameters
 dilator.setParameters(dilationParam);

 // apply the dilation to a channel "chnlSrc" and leave the result in
 // "chnlDest"

 dilator.apply(chnlSrc,chnlDest);

Constructor & Destructor Documentation

lti::dilation::dilation (  ) 

default constructor

lti::dilation::dilation ( const mathObject aKernel  ) 

construct with the given kernel

lti::dilation::dilation ( const dilation other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::dilation::apply ( const vector< channel8::value_type > &  src,
vector< channel8::value_type > &  dest 
) const

operates on a copy of the given parameters.

Parameters:
src vector<channel8::value_type> with the source data.
dest vector<channel8::value_type> where the result will be left.
Returns:
true if ok, false otherwise.
bool lti::dilation::apply ( const fvector src,
fvector dest 
) const [virtual]

operates on a copy of the given parameters.

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

Reimplemented from lti::modifier.

bool lti::dilation::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 ok, false otherwise.

Implements lti::morphology.

bool lti::dilation::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 ok, false otherwise.

Implements lti::morphology.

bool lti::dilation::apply ( vector< channel8::value_type > &  srcdest  )  const

operates on the given parameter.

Parameters:
srcdest vector<channel8::value_type> with the source data. The result will be left here too.
Returns:
true if successful, false otherwise.
bool lti::dilation::apply ( fvector srcdest  )  const

operates on the given parameter.

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

Reimplemented from lti::modifier.

bool lti::dilation::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 successful, false otherwise.

Implements lti::morphology.

bool lti::dilation::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 successful, false otherwise.

Implements lti::morphology.

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

returns a pointer to a clone of this functor.

Implements lti::functor.

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

copy data of "other" functor.

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

Reimplemented from lti::morphology.

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

returns used parameters

Reimplemented from lti::morphology.

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

returns the name of this type ("dilation")

Reimplemented from lti::morphology.

void lti::dilation::setKernel ( const mathObject aKernel  ) 

shortcut to set the filter kernel in the functor parameters.

The other parameters remain unchanged.


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

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