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

lti::multiGeometricFeaturesFromMask Class Reference

This functor takes a mask (labeled or not), where it is assumed that a region must be connected or not and reassigns labels to them in a way that each connected region gets its own label. More...

#include <ltiMultiGeometricFeaturesFromMask.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class multiGeometricFeaturesFromMask More...

Public Member Functions

 multiGeometricFeaturesFromMask ()
 multiGeometricFeaturesFromMask (const parameters &par)
 multiGeometricFeaturesFromMask (const multiGeometricFeaturesFromMask &other)
virtual ~multiGeometricFeaturesFromMask ()
virtual const char * getTypeName () const
bool updateParameters ()
bool apply (const channel8 &src, std::vector< std::vector< rectangle > > &objects) const
bool apply (const channel8 &src, imatrix &dest, std::vector< std::vector< rectangle > > &objects) const
bool apply (const channel8 &src, std::vector< std::vector< geometricFeatureGroup0 > > &objects) const
bool apply (const channel8 &src, imatrix &dest, std::vector< std::vector< geometricFeatureGroup0 > > &objects) const
bool postProcess (std::vector< std::vector< geometricFeatureGroup0 > > &objects) const
bool postProcess (std::vector< std::vector< rectangle > > &objects) const
multiGeometricFeaturesFromMaskcopy (const multiGeometricFeaturesFromMask &other)
multiGeometricFeaturesFromMaskoperator= (const multiGeometricFeaturesFromMask &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

This functor takes a mask (labeled or not), where it is assumed that a region must be connected or not and reassigns labels to them in a way that each connected region gets its own label.

Additionally the minimum bounding rectangle or geometric features of the labeled objects are computed and stored in the vector corresponding to the object's kind. Thereby it is assumed that each object kind is assigned the same grey value in the input channel. All objects of the same kind are stored in a single vector. These vectors again are returned in a vector and ordered in the same way as in the parameter mask Values, which specifies the grey values for which the geometric features are computed. Any other grey values are still labeled as described in fastRelabeling, but excluded from the further processing performed by this class.

Close objects are merged if requested. To ensure fast merging two objects are close if their surrounding rectangles are close.

CAVEAT: 1) Sorting of the merged objects by their size does not work if the circumscribing rectangles are returned only.


Constructor & Destructor Documentation

lti::multiGeometricFeaturesFromMask::multiGeometricFeaturesFromMask (  ) 

default constructor

lti::multiGeometricFeaturesFromMask::multiGeometricFeaturesFromMask ( const parameters par  ) 

Construct a functor using the given parameters.

lti::multiGeometricFeaturesFromMask::multiGeometricFeaturesFromMask ( const multiGeometricFeaturesFromMask other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::multiGeometricFeaturesFromMask::apply ( const channel8 src,
imatrix dest,
std::vector< std::vector< geometricFeatureGroup0 > > &  objects 
) const

apply-method to get simple geometric features (bounding box, area, center of gravity) of the objects inside the image.

Additionally to the bounding boxes a matrix with all the labels is returned, where the label subtracted by one corresponds to the index into the vector with the geometric features. operates on the given parameter.

Parameters:
src channel8 with the source data
dest matrix with the labeled data
objects a vector with the geometric features of each labeled object
Returns:
true if apply successful or false otherwise.
bool lti::multiGeometricFeaturesFromMask::apply ( const channel8 src,
std::vector< std::vector< geometricFeatureGroup0 > > &  objects 
) const

apply-method to get simple geometric features (bounding box, area, center of gravity) of the objects inside the image.

operates on the given parameter.

Parameters:
src channel8 with the source data
objects a vector with the geometric features of each labeled object
Returns:
true if apply successful or false otherwise.
bool lti::multiGeometricFeaturesFromMask::apply ( const channel8 src,
imatrix dest,
std::vector< std::vector< rectangle > > &  objects 
) const

apply-method to get simple geometric features (bounding box, area, center of gravity) of the objects inside the image.

Additionally to the bounding boxes a matrix with all the labels is returned, where the label subtracted by one corresponds to the index into the vector with the geometric features. operates on the given parameter.

Parameters:
src channel8 with the source data
dest a matrix with the labeled data
objects a vector with the geometric features of each labeled object
Returns:
true if apply successful or false otherwise.
bool lti::multiGeometricFeaturesFromMask::apply ( const channel8 src,
std::vector< std::vector< rectangle > > &  objects 
) const

apply-method to get the bounding boxes of the objects inside the image.

operates on the given parameter.

Parameters:
src channel8 with the source data
objects a vector with the smallest rectangles containing each labeled object
Returns:
true if apply successful or false otherwise.
virtual functor* lti::multiGeometricFeaturesFromMask::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::geometricFeaturesFromMask.

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

copy data of "other" functor.

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

Reimplemented from lti::geometricFeaturesFromMask.

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

returns used parameters

Reimplemented from lti::geometricFeaturesFromMask.

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

returns the name of this type ("multiGeometricFeaturesFromMask")

Reimplemented from lti::geometricFeaturesFromMask.

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

alias for copy member

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

Reimplemented from lti::geometricFeaturesFromMask.

bool lti::multiGeometricFeaturesFromMask::postProcess ( std::vector< std::vector< rectangle > > &  objects  )  const

Merge if requested.

This method need only be called in the manual post processing mode.

Parameters:
objects the rectangles to be processed
Returns:
true on success and false otherwise
bool lti::multiGeometricFeaturesFromMask::postProcess ( std::vector< std::vector< geometricFeatureGroup0 > > &  objects  )  const

Merge if requested and compute the center of gravity.

This method need only be called in the manual post processing mode.

Parameters:
objects the geometric features to be processed
Returns:
true on success and false otherwise
bool lti::multiGeometricFeaturesFromMask::updateParameters (  )  [virtual]

Update the parameters content.

return true on success and false otherwise

Reimplemented from lti::functor.


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

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