latest version v1.9 - last update 10 Apr 2010 |
Description of the simpliest geometric features given by the rectangle surrounding the object, the object's area and the center of gravity. More...
#include <ltiGeometricFeatureGroup.h>
Public Member Functions | |
geometricFeatureGroup0 () | |
geometricFeatureGroup0 (const point &initMinX, const point &initMaxX, const point &initMinY, const point &initMaxY, const int initArea, const tpoint< float > &initCog) | |
geometricFeatureGroup0 (const geometricFeatureGroup0 &other) | |
Duplication | |
geometricFeatureGroup0 & | copy (const geometricFeatureGroup0 &other) |
geometricFeatureGroup0 & | operator= (const geometricFeatureGroup0 &other) |
Computation of the geometric features. | |
bool | addObjectPoint (int x, int y) |
bool | addObjectPoint (point p) |
bool | completeComputation () |
bool | operator+= (const geometricFeatureGroup0 &other) |
Comparison | |
bool | operator== (const geometricFeatureGroup0 &other) const |
bool | operator!= (const geometricFeatureGroup0 &other) const |
bool | isClose (const geometricFeatureGroup0 &other, const point &dist) const |
Input and Output | |
bool | read (ioHandler &handler, const bool complete=true) |
bool | write (ioHandler &handler, const bool complete=true) |
Public Attributes | |
point | minX |
point | maxX |
point | minY |
point | maxY |
int | area |
tpoint< float > | cog |
Description of the simpliest geometric features given by the rectangle surrounding the object, the object's area and the center of gravity.
Other geometric feature classes can be derived.
lti::geometricFeatureGroup0::geometricFeatureGroup0 | ( | ) |
default constructor
lti::geometricFeatureGroup0::geometricFeatureGroup0 | ( | const point & | initMinX, | |
const point & | initMaxX, | |||
const point & | initMinY, | |||
const point & | initMaxY, | |||
const int | initArea, | |||
const tpoint< float > & | initCog | |||
) |
constructor
lti::geometricFeatureGroup0::geometricFeatureGroup0 | ( | const geometricFeatureGroup0 & | other | ) |
copy constructor
bool lti::geometricFeatureGroup0::addObjectPoint | ( | point | p | ) |
Partially recomputes the geometric feature vector considering the new point.
This method assumes, that the center of gravity contains the sum of all added points' coordinates so far. To compute the center of gravity from the sum you must call completeComputation(). Use with care. Calls addObjectPoint(int x, int y).
bool lti::geometricFeatureGroup0::addObjectPoint | ( | int | x, | |
int | y | |||
) |
Partially recomputes the geometric feature vector considering the new point.
This method assumes, that the center of gravity contains the sum of all added points' coordinates so far. To compute the center of gravity from the sum you must call completeComputation(). Use with care.
bool lti::geometricFeatureGroup0::completeComputation | ( | ) |
Completes the computation of the geometric features, i.e.
sum attributes contain intermediate results during the computation process, which are replaced by the proper attributes value on call of this method. Use with care.
geometricFeatureGroup0& lti::geometricFeatureGroup0::copy | ( | const geometricFeatureGroup0 & | other | ) |
copy member
Reimplemented from lti::ioObject.
bool lti::geometricFeatureGroup0::isClose | ( | const geometricFeatureGroup0 & | other, | |
const point & | dist | |||
) | const |
Check whether this feature group is close to the given feature group, i.e.
if the two circumscribing rectangles overlap if one is extended by the given distance.
other | the geometric features to be tested with | |
dist | the allowed distance between close rectangles |
bool lti::geometricFeatureGroup0::operator!= | ( | const geometricFeatureGroup0 & | other | ) | const |
test for inequality
bool lti::geometricFeatureGroup0::operator+= | ( | const geometricFeatureGroup0 & | other | ) |
geometricFeatureGroup0& lti::geometricFeatureGroup0::operator= | ( | const geometricFeatureGroup0 & | other | ) |
alias for copy
Reimplemented from lti::ioObject.
bool lti::geometricFeatureGroup0::operator== | ( | const geometricFeatureGroup0 & | other | ) | const |
test for equality
bool lti::geometricFeatureGroup0::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
read the geometricFeatureGroup from the given ioHandler.
The complete flag indicates if the enclosing begin and end should be also be readed
Reimplemented from lti::ioObject.
bool lti::geometricFeatureGroup0::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) |
write the geometricFeatureGroup0 in the given ioHandler.
The complete flag indicates if the enclosing begin and end should be also be written or not
number of pixels covered by the object
center of gravity
the point on the object's contour with the biggest x-coordinate
the point on the object's contour with the biggest y-coordinate
the point on the object's contour with the smallest x-coordinate
the point on the object's contour with the smallest y-coordinate