#include <qgarlib/Maer.H>
Compute a MAER from a given list of points, typically supposed to determine the contour of an image component. See [Freeman and Shapira, 1975]
Y
^
|
1 - + + + + MAER = (1,1) (1,1) (5,1) (5,1)
|
+--|--|--|--|--|--->
0 1 2 3 4 5 X
In both cases, the MAER area is equal to 0.
The computing is performed using double numbers, and the MAER features are also stored as double numbers.
Definition at line 108 of file Maer.H.
Public Member Functions | |
Constructors | |
| Maer (const std::list< DPoint > &aPtList) | |
| Default constructor.Create from a list of points having double coordinates. | |
| template<class T> | |
| Maer (const std::list< GenPoint< T > > &aPtList) | |
| Create from a list of points having a coordinate type different from double. | |
| Maer (const FreemanChain &aCh) | |
| Create from a Freeman chain (representing the contour of an image component). | |
| Maer (const Maer &aMaer) | |
| Copy constructor. | |
Destructor | |
| ~Maer () | |
| Non-virtual destructor: The class is not supposed to be derived. | |
Access | |
| const std::list< DPoint > & | accessVertices () const |
| Get the list including the 4 corners of the MAER. | |
| std::list< DPoint > | vertices () const |
| Get a copy of the list including the 4 corners of the MAER. | |
| double | area () const |
| Get area. | |
Operators | |
| Maer & | operator= (const Maer &aMaer) |
| Assignment. | |
Protected Attributes | |
MAER features | |
| std::list< DPoint > | _vertices |
| The four corners. | |
| double | _area |
| The area. | |
Private Member Functions | |
| void | PRIVATEcomputeMaer (const std::list< DPoint > &aPtList) |
| Auxiliary function to compute the MAER from a list of points having double coordinates. | |
Auxiliaries | |
| template<class T> | |
| GenPoint< double > | PRIVATEtoDPoint (const GenPoint< T > &aPt) |
| To convert a point having coordinates of any type into a point having double coordinates. | |
|
|
Default constructor.Create from a list of points having double coordinates.
Definition at line 66 of file Maer.C. References PRIVATEcomputeMaer(). |
|
||||||||||
|
Create from a list of points having a coordinate type different from double.
Definition at line 75 of file Maer.C. References PRIVATEcomputeMaer(), and PRIVATEtoDPoint(). |
|
|
Create from a Freeman chain (representing the contour of an image component).
Definition at line 89 of file Maer.C. References PRIVATEcomputeMaer(), and qgar::FreemanChain::toDPointList(). |
|
|
Copy constructor.
|
|
|
Non-virtual destructor: The class is not supposed to be derived.
|
|
|
Get the list including the 4 corners of the MAER.
Definition at line 130 of file Maer.C. References _vertices. Referenced by qgar::Component::PRIVATEcomputeMaer(). |
|
|
Get area.
Definition at line 292 of file Maer.H. References _area. |
|
|
Assignment.
|
|
|
Auxiliary function to compute the MAER from a list of points having double coordinates.
Definition at line 175 of file Maer.C. References _area, _vertices, qgar::GenConvexHull< T >::accessPivot(), qgar::GenConvexHull< T >::accessVertices(), qgar::Math::QG_2PI, and qgar::GenConvexHull< T >::size(). Referenced by Maer(). |
|
||||||||||
|
To convert a point having coordinates of any type into a point having double coordinates. To be used as a functor in STL algorithms (see function qgar::Maer::Maer(const std::list< GenPoint<T> >&) for example).
Definition at line 307 of file Maer.H. Referenced by Maer(). |
|
|
Get a copy of the list including the 4 corners of the MAER.
Definition at line 138 of file Maer.C. References _vertices. |
|
|
The area.
Definition at line 230 of file Maer.H. Referenced by area(), operator=(), and PRIVATEcomputeMaer(). |
|
|
The four corners.
Definition at line 225 of file Maer.H. Referenced by accessVertices(), operator=(), PRIVATEcomputeMaer(), and vertices(). |