latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class geometricFeatures More...
#include <ltiGeometricFeatures.h>
Public Types | |
enum | eBoundaryDefinition { CentralBoundary, OuterBoundary, Approximation } |
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Public Attributes | |
bool | calcFeatureGroup1 |
bool | calcFeatureGroup2 |
bool | calcFeatureGroup3 |
bool | calcFeatureGroup4 |
eBoundaryDefinition | boundaryDefinition |
the parameters for the class geometricFeatures
Boundary definition.
The boundary definition to be used (default: CentralBoundary).
CentralBoundary |
The central boundary is the line drawn from the center of each borderPoint to the center of the following borderPoint, and from the last one's center to the first one's (with sub-pixel accuracy, meaning that the length is the same as it were in continuous space). A single pixel has a central boundary length of 0 and an area of 0. A tiny rectangle with upper left corner at (0,0) and bottom right corner at (1,1) has an outer boundary length of 4 and an area of 1. Note: We define that objects with an area of 0 have the same COG as by the OuterBoundary definition. Disadvantages: Very large objects may lead to numerical problems in feature group 2 (and thus above). Formulas taken from: Carsten Steger: On the Calculation of Arbitrary Moments of Polygons; Technical Report FGBV-96-05, Forschungsgruppe Bildverstehen (FG BV), Informatik IX, Technische Universität München, October 1996 http://www9.informatik.tu-muenchen.de/people/steger/publications.html |
OuterBoundary |
The outer boundary delimits the borderPoints completely, ie a single pixel has an outer boundary length of 4 and an area of 1. A tiny rectangle with upper left corner at (0,0) and bottom right corner at (1,1) has an outer boundary length of 8 and an area of 4. I.e. the boundary is considered to be part of the object (completely). Disadvantages: By this definition, a square and a circle with equal side length resp. diameter have the same boundary length if the square is parallel to the coordinate axes. This contradicts intuition and renders features like compactness rather meaningless. Also, an object's boundary length is very susceptible to rotation. |
Approximation |
"Approximation" uses CentralBoundary for the calculation of feature group 4 and the bordersize, and OuterBoundary for all others. Disadvantages: This definition is mathematically inconsistent, e.g. especially very small objects may have a compactness greater than 1. |
lti::geometricFeatures::parameters::parameters | ( | ) |
default constructor
Reimplemented from lti::globalFeatureExtractor::parameters.
lti::geometricFeatures::parameters::parameters | ( | const parameters & | other | ) |
copy constructor
other | the parameters object to be copied |
Reimplemented from lti::globalFeatureExtractor::parameters.
lti::geometricFeatures::parameters::~parameters | ( | ) | [virtual] |
destructor
Reimplemented from lti::globalFeatureExtractor::parameters.
virtual functor::parameters* lti::geometricFeatures::parameters::clone | ( | ) | const [virtual] |
returns a pointer to a clone of the parameters
Reimplemented from lti::globalFeatureExtractor::parameters.
parameters& lti::geometricFeatures::parameters::copy | ( | const parameters & | other | ) |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from lti::globalFeatureExtractor::parameters.
const char* lti::geometricFeatures::parameters::getTypeName | ( | ) | const [virtual] |
returns name of this type
Reimplemented from lti::globalFeatureExtractor::parameters.
virtual bool lti::geometricFeatures::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::functor::parameters.
virtual bool lti::geometricFeatures::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::functor::parameters.
Type of boundary definition to use.
Default value: CentralBoundary
Toggle calculation of feature group 1.
Default is true
Toggle calculation of feature group 2.
Default is true
Toggle calculation of feature group 3.
Default is true
Toggle calculation of feature group 4.
Default is true