Detailed Description
The PFeatureMap class represents a collection of PFeaturePoint's or PFeatureRectangle's.
Definition at line 35 of file PFeatureMap.h.
#include <PFeatureMap.h>
Constructor & Destructor Documentation
◆ PFeatureMap() [1/3]
PFeatureMap::PFeatureMap | ( | ) |
Constructs an empty feature map.
◆ PFeatureMap() [2/3]
PFeatureMap::PFeatureMap | ( | const PFeatureMap & | other | ) |
Constructs a shared copy of other.
◆ PFeatureMap() [3/3]
PFeatureMap::PFeatureMap | ( | const PStringMap & | mapFeaturePoints, |
const PStringMap & | mapFeatureRectangles | ||
) |
Constructs a feature map from a map of feature points and a map of feature rectangles.
◆ ~PFeatureMap()
|
virtual |
Destroys this object.
Member Function Documentation
◆ Add() [1/2]
void PFeatureMap::Add | ( | const PFeaturePoint & | p | ) |
DEPRECATED, use AddPoint() instead.
Adds the specified feature point to this feature map. If a feature point with the same name already exists then, it is replaced by the new one.
◆ Add() [2/2]
void PFeatureMap::Add | ( | const PFeatureRectangle & | p | ) |
DEPRECATED, use AddRectangle() instead.
Adds the specified feature rectangle to this feature map. If a feature rectangle with the same name already exists then, it is replaced by the new one.
◆ AddPoint()
void PFeatureMap::AddPoint | ( | const PFeaturePoint & | p | ) |
Adds the specified feature point to this feature map.
If a feature point with the same name already exists then, it is replaced by the new one.
◆ AddRectangle()
void PFeatureMap::AddRectangle | ( | const PFeatureRectangle & | p | ) |
Adds the specified feature rectangle to this feature map.
If a feature rectangle with the same name already exists then, it is replaced by the new one.
◆ Clear()
void PFeatureMap::Clear | ( | ) |
Clears this feature map (remove all feature points).
- See also
- IsEmpty()
◆ FeaturePointSize()
papillon::int32 PFeatureMap::FeaturePointSize | ( | ) | const |
Returns the number of PFeaturePoint in this feature map.
- See also
- IsFeaturePointEmpty()
◆ FeatureRectangleSize()
papillon::int32 PFeatureMap::FeatureRectangleSize | ( | ) | const |
Returns the number of PFeatureRectangle in this feature map.
- See also
- IsFeatureRectangleEmpty()
◆ GetBoundingBox()
PRectanglef PFeatureMap::GetBoundingBox | ( | ) | const |
Returns the minimum bounding axis-parallel rectangle of all the features specified in the feature map.
◆ GetBoundingPolygon() [1/2]
PPolygonf PFeatureMap::GetBoundingPolygon | ( | ) | const |
Returns the minimum bounding polygon (convex hull) of all the features specified in the feature map.
◆ GetBoundingPolygon() [2/2]
PPolygonf PFeatureMap::GetBoundingPolygon | ( | const PStringList & | listFeatures | ) | const |
Returns the minimum bounding polygon (convex hull) of the specified sub-set of feature contained in this feature map.
◆ GetCentreOfMass() [1/2]
PPoint2Df PFeatureMap::GetCentreOfMass | ( | ) | const |
Returns the centre of mass of all the feature points (ONLY feature points) or PPoint2Df::Bad() if there are no points.
- See also
- GetCentreOfMass(const PStringList&)
◆ GetCentreOfMass() [2/2]
PPoint2Df PFeatureMap::GetCentreOfMass | ( | const PStringList & | listFeatures | ) | const |
Returns the centre of mass of the specified sub-set of feature points AND feature rectangles.
WARNING: PPoint2Df::Bad() if the specified list is empty OR if none of the specified points exist.
- See also
- GetCentreOfMass()
◆ GetFaceRectangle()
PFeatureRectangle PFeatureMap::GetFaceRectangle | ( | ) | const |
Returns the FACE feature rectangle if it exists or an invalid rectangle otherwise.
◆ GetFeaturePointByName() [1/2]
bool PFeatureMap::GetFeaturePointByName | ( | const PString & | name, |
PFeaturePoint & | o_featurePoint | ||
) | const |
DEPRECATED, use GetFeaturePointByName(const PString& name) instead.
Returns true if the feature points exists with the specified name, or false otherwise.
◆ GetFeaturePointByName() [2/2]
PFeaturePoint PFeatureMap::GetFeaturePointByName | ( | const PString & | name | ) | const |
If a feature point exists with the specified name, then returns the point otherwise returns an invalid point (see PFeaturePoint::IsValid())
◆ GetFeaturePointNames()
PStringList PFeatureMap::GetFeaturePointNames | ( | ) | const |
Returns the name of all features points contained in this feature map.
◆ GetFeaturePoints() [1/2]
PList PFeatureMap::GetFeaturePoints | ( | ) | const |
Returns the list of all feature points contained in this feature map.
◆ GetFeaturePoints() [2/2]
bool PFeatureMap::GetFeaturePoints | ( | PStringMap & | featurePoints | ) | const |
Returns the map of all feature points and true if this map is not empty.
◆ GetFeatureRectangleByName() [1/2]
bool PFeatureMap::GetFeatureRectangleByName | ( | const PString & | name, |
PFeatureRectangle & | o_featureRectangle | ||
) | const |
DEPRECATED, use GetFeatureRectangleByName(const PString& name) instead.
Returns true if the feature rectangle exists with the specified name, or false otherwise.
◆ GetFeatureRectangleByName() [2/2]
PFeatureRectangle PFeatureMap::GetFeatureRectangleByName | ( | const PString & | name | ) | const |
If a feature rectangle exists with the specified name, then returns the rectangle otherwise returns an invalid rectangle.
◆ GetFeatureRectangleNames()
PStringList PFeatureMap::GetFeatureRectangleNames | ( | ) | const |
Returns the name of all features rectangles points contained in this feature map.
◆ GetFeatureRectangles() [1/2]
PList PFeatureMap::GetFeatureRectangles | ( | ) | const |
Returns the list of all feature rectangles contained in this feature map.
◆ GetFeatureRectangles() [2/2]
bool PFeatureMap::GetFeatureRectangles | ( | PStringMap & | featureRectangles | ) | const |
Returns the map of all feature rectangles and true if this map is not empty.
◆ GetInterocularDistance()
float PFeatureMap::GetInterocularDistance | ( | ) | const |
Returns the number of pixels between the centres of the eyes if this PFeatureMap handles feature points for a face, returns 0.0f otherwise.
◆ GetLeftEyeCentre()
PPoint2Df PFeatureMap::GetLeftEyeCentre | ( | ) | const |
Returns the centre of the left eye.
If it doesn't exist as a specific point, then it will be computed from "Eye-Corners" or other eye points.
◆ GetMidEyeCentre()
PPoint2Df PFeatureMap::GetMidEyeCentre | ( | ) | const |
Returns the midpoint between the centres of the eyes - i.e.
between the points returned by GetLeftEyeCentre() and GetRightEyeCentre()
◆ GetMouthCentre()
PPoint2Df PFeatureMap::GetMouthCentre | ( | ) | const |
Returns the centre of the mouth.
This doesn't exist as a specific point, so it will be computed as the centre-of-mass of all available mouth points. Possible mouth points include 'Right Mouth Corner', '50', '51', 'Top of Lips', '53', '54', 'Left Mouth Corner', '56', '57', 'Bottom of Lips', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68' Currently FaceDetector2 has all these points and FaceDetector5 only has the two mouth corners.
◆ GetPoints()
PPoint2DfList PFeatureMap::GetPoints | ( | ) | const |
Returns the list of all points contained in this feature map.
◆ GetRightEyeCentre()
PPoint2Df PFeatureMap::GetRightEyeCentre | ( | ) | const |
Returns the centre of the right eye.
If it doesn't exist as a specific point, then it will be computed from "Eye-Corners" or other eye points.
◆ IsFeaturePointEmpty()
bool PFeatureMap::IsFeaturePointEmpty | ( | ) | const |
Returns true if this feature point map is empty, false otherwise.
- See also
- FeaturePointSize()
◆ IsFeatureRectangleEmpty()
bool PFeatureMap::IsFeatureRectangleEmpty | ( | ) | const |
Returns true if this feature rectangle map is empty, false otherwise.
- See also
- FeatureRectangleSize()
◆ operator=()
PFeatureMap& PFeatureMap::operator= | ( | const PFeatureMap & | other | ) |
Performs a shared copy of other to this object.
◆ Remove()
bool PFeatureMap::Remove | ( | const PString & | name | ) |
Removes the feature point with the specified name, and returns true if success, false if there is no feature point with the specified name.
◆ Scale()
void PFeatureMap::Scale | ( | float | scale | ) |
Scale all points and rectangles of this map by specified value.
◆ Translate() [1/2]
void PFeatureMap::Translate | ( | float | x, |
float | y | ||
) |
Translates all points and rectangles of this map by the specified (x,y) values.
◆ Translate() [2/2]
void PFeatureMap::Translate | ( | const PPoint2Df & | value | ) |
Translates all points and rectangles of this map by specified value.