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

lti::geometricFeatureGroup0 Class Reference
[Geometry Data Structures]

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>

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

List of all members.

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



geometricFeatureGroup0copy (const geometricFeatureGroup0 &other)
geometricFeatureGroup0operator= (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

Detailed Description

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.


Constructor & Destructor Documentation

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


Member Function Documentation

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.

Parameters:
other the geometric features to be tested with
dist the allowed distance between close rectangles
Returns:
true if the two feature groups are close
bool lti::geometricFeatureGroup0::operator!= ( const geometricFeatureGroup0 other  )  const

test for inequality

bool lti::geometricFeatureGroup0::operator+= ( const geometricFeatureGroup0 other  ) 

Recomputes the geometric feature vector by adding a second geometric feature vector.

Here both feature vectors are considered complete, i.e. both center of gravities are weighted according to their area.

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


Member Data Documentation

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


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

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