PFaceMetaData Class Reference

Detailed Description

The PFaceMetaData class represents meta-data information (for example, gender) about a face.

This class stores results of various classifications done by PDescriber objects (gender, ethnicity, age group etc.) these classification are referred by classificationName (PString) parameter.

Each classification result is represented by a set of pairs (class name and confidence score). For example

className confidence
MALE 0.8
FEMALE 0.2

Note: All class members referring to "gender" classification explicitly are deprecated

Definition at line 40 of file PFaceMetaData.h.

#include <PFaceMetaData.h>

Member Enumeration Documentation

◆ EGenderType

The different genders available (deprecated)

Enumerator
E_GENDER_UNKNOWN 
E_GENDER_FEMALE 
E_GENDER_MALE 

Definition at line 45 of file PFaceMetaData.h.

Constructor & Destructor Documentation

◆ PFaceMetaData() [1/3]

PFaceMetaData::PFaceMetaData ( )

Constructs an unknown/empty PFaceMetaData.

(following behaviour is deprecated)

  • Gender is set to E_GENDER_UNKNOWN
  • Gender Confidence is set to -1

◆ PFaceMetaData() [2/3]

PFaceMetaData::PFaceMetaData ( EGenderType  gender,
double  genderConfidence 
)

Constructs a PFaceMetaData from a gender type and a gender confidence (deprecated)

◆ PFaceMetaData() [3/3]

PFaceMetaData::PFaceMetaData ( const PFaceMetaData other)

Constructs a shared copy of other.

◆ ~PFaceMetaData()

PFaceMetaData::~PFaceMetaData ( )
override

Destroys this object.

Member Function Documentation

◆ DeleteClassification()

PResult PFaceMetaData::DeleteClassification ( const PString classificationName)

Remove classification result.

◆ FromDescription()

static PFaceMetaData PFaceMetaData::FromDescription ( const PDescription description)
static

Gets the first face meta-data from description.

◆ GetClassConfidence()

PResult PFaceMetaData::GetClassConfidence ( const PString classificationName,
float &  confidence 
) const

Get class confidence.

◆ GetClassificationNames()

PStringList PFaceMetaData::GetClassificationNames ( ) const

Get available classifications.

◆ GetClassificationVector()

PResult PFaceMetaData::GetClassificationVector ( const PString classificationName,
PFloatVector classificationVector 
) const

Get classification vector.

◆ GetClassifierInfo()

PResult PFaceMetaData::GetClassifierInfo ( const PString classificationName,
PClassifierInfo classifierInfo 
) const

Get classifier info.

◆ GetClassIndex() [1/2]

PResult PFaceMetaData::GetClassIndex ( const PString classificationName,
int32 &  classIndex 
) const

Get class index (returns -1 for unknown class)

◆ GetClassIndex() [2/2]

PResult PFaceMetaData::GetClassIndex ( const PString classificationName,
int32 &  classIndex,
float &  confidence 
) const

Get class index (returns -1 for unknown class)

◆ GetClassLabel() [1/2]

PResult PFaceMetaData::GetClassLabel ( const PString classificationName,
PString classLabel 
) const

Get class label.

◆ GetClassLabel() [2/2]

PResult PFaceMetaData::GetClassLabel ( const PString classificationName,
PString classLabel,
float &  confidence 
) const

Get class label.

◆ GetGender()

EGenderType PFaceMetaData::GetGender ( ) const

Gets the estimated gender of the face (deprecated)

◆ GetGenderAsString()

PString PFaceMetaData::GetGenderAsString ( ) const

Gets the estimated gender of the face as a string (deprecated)

◆ GetGenderConfidence()

double PFaceMetaData::GetGenderConfidence ( ) const

Gets the confidence of the gender (deprecated)

◆ operator=()

PFaceMetaData& PFaceMetaData::operator= ( const PFaceMetaData other)

Performs a shared copy of other to this object.

◆ operator==()

bool PFaceMetaData::operator== ( const PFaceMetaData other) const

Returns true if this object is the same instance than other, false otherwise (deprecated use IsSame)

◆ SetClassification() [1/2]

void PFaceMetaData::SetClassification ( const PString classificationName,
const PClassifierInfo classifierInfo,
const PFloatVector classificationVector,
int32  classIndex = -2,
float  confidence = 0.f 
)

Set classification result.

◆ SetClassification() [2/2]

void PFaceMetaData::SetClassification ( const PString classificationName,
const PClassifierInfo classifierInfo,
int32  classIndex,
float  confidence 
)

Set classification result.

◆ ToStringOSD()

PString PFaceMetaData::ToStringOSD ( ) const

Returns face metadata as a string, formatted for On Screen Display (deprecated)