visageSDK
Properties | List of all members
AnalysisData Class Reference

Objective-C wrapper of the native VisageSDK::AnalysisData class. More...

#import <objc_AnalysisData.h>

Inherits NSObject, and <NSCopying>.

Properties

float age
 result of age estimation
 
bool ageValid
 boolean flag returning whether age estimation has been successful or not
 
int gender
 result of gender estimation
 
bool genderValid
 boolean flag returning whether gender estimation has been successful or not
 
NSArray * emotionProbabilities
 result of emotion estimation, see: VFAEmotionIndices
 
bool emotionsValid
 boolean flag returning whether emotion estimation has been successful or not
 

Detailed Description

Objective-C wrapper of the native VisageSDK::AnalysisData class.

The AnalysisData interface is used as a container for all face analysis results. It is passed as a parameter to the analyseImage() or analyseStream() method. Both methods store analysis results into the interface.

Members ageValid, genderValid and emotionsValid may be used to verify that analysis for those features was performed successfully, before checking the results. If an operation was not performed (turned off via options) or failed, the respective validity boolean will return false and estimations will contain the default value.

If the validity boolean for the respective operation is true, then the estimation succeeded and the results may be used. An example:

if (analysisData.ageValid)
{
print("Age: %f", analysisData.age);
}
if (analysisData.genderValid)
{
print("Gender: %d", analysisData.gender);
}
if (analysisData.emotionsValid)
{
print("Anger: ", analysisData.emotionProbabilities[VFAEmotionIndices.Anger.rawValue]);
print("Disgust: ", analysisData.emotionProbabilities[VFAEmotionIndices.Disgust.rawValue]);
print("Fear: ", analysisData.emotionProbabilities[VFAEmotionIndices.Fear.rawValue]);
print("Happiness: ", analysisData.emotionProbabilities[VFAEmotionIndices.Happiness.rawValue]);
print("Sadness: ", analysisData.emotionProbabilities[VFAEmotionIndices.Sadness.rawValue]);
print("Surprise: ", analysisData.emotionProbabilities[VFAEmotionIndices.Surprise.rawValue]);
print("Neutral: ", analysisData.emotionProbabilities[VFAEmotionIndices.Neutral.rawValue]);
}

Definition at line 46 of file objc_AnalysisData.h.


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