Affdex SDK
Technical Reference (C++)
Public Member Functions | List of all members
affdex::PhotoDetector Class Reference

A Detector for processing still photographs. More...

#include <PhotoDetector.h>

Inheritance diagram for affdex::PhotoDetector:
affdex::Detector

Public Member Functions

AFFDEXSDK PhotoDetector (const unsigned int maxNumFaces=DEFAULT_MAX_NUM_FACES, const FaceDetectorMode faceConfig=FaceDetectorMode::SMALL_FACES)
 Initializes a new instance of the PhotoDetector class.

Parameters
maxNumFacesThe max number of faces to be tracked.
faceConfigMaximum processing framerate.
More...
 
virtual AFFDEXSDK ~PhotoDetector () override
 Destructor. More...
 
virtual AFFDEXSDK void start () override
 Initializes the PhotoDetector in preparation for handling photos subsequently pushed via PhotoDetector::process. More...
 
virtual AFFDEXSDK void stop () override
 Notifies the PhotoDetector that the last photo has been pushed via PhotoDetector::process, allowing it to deallocate resources. More...
 
virtual AFFDEXSDK void process (Frame photo)
 Processes a photo. More...
 
- Public Member Functions inherited from affdex::Detector
AFFDEXSDK Detector ()
 Constructor. More...
 
virtual AFFDEXSDK ~Detector ()
 Virtual destructor. More...
 
virtual AFFDEXSDK void reset ()
 Reset the processing state of the detector. This method enables an already initialized detector to begin processing a second video/camera feed. More...
 
virtual AFFDEXSDK bool isRunning ()
 Returns the state of the detector. More...
 
virtual AFFDEXSDK FaceDetectorMode getFaceDetectorMode () const
 Gets the face detector configuration in use More...
 
virtual AFFDEXSDK unsigned int getMaxNumberFaces () const
 Gets the max number of faces to be tracked. More...
 
AFFDEXSDK virtual DEPRECATED void setLicensePath (const affdex::path &licensePath)
 Sets the path to the license file used to verify the sdk. More...
 
AFFDEXSDK virtual DEPRECATED void setLicenseString (const char *licenseString)
 Sets the license string used to verify the sdk. More...
 
virtual AFFDEXSDK void setClassifierPath (const affdex::path &classifierPath)
 Sets the classifier path. More...
 
virtual AFFDEXSDK void setFaceListener (FaceListener *listener)
 Sets the FaceListener listener. More...
 
AFFDEXSDK FaceListenergetFaceListener ()
 Gets the current FaceListener. More...
 
virtual AFFDEXSDK void setImageListener (ImageListener *listener)
 Sets the image listener. More...
 
AFFDEXSDK ImageListenergetImageListener ()
 Gets the current ImageListener. More...
 
virtual AFFDEXSDK ProcessStatusListenergetProcessStatusListener ()
 Gets the current ProcessStatusListener. More...
 
virtual AFFDEXSDK void setProcessStatusListener (ProcessStatusListener *listener)
 Sets the Processing Status listener. More...
 
virtual AFFDEXSDK void setDetectAllExpressions (bool detectAllExpressions)
 Configure the detection state of all expressions. More...
 
virtual AFFDEXSDK void setDetectAllEmotions (bool detectAllEmotions)
 Configure the detection state of all expressions. More...
 
virtual AFFDEXSDK void setDetectAllEmojis (bool detectAllEmojis)
 Configure the detection state of all emojis. More...
 
virtual AFFDEXSDK void setDetectAllAppearances (bool detectAllAppearances)
 Configure the detection state of all appearances. More...
 
virtual AFFDEXSDK bool getDetectGender ()
 Gets the current state of gender detection. More...
 
virtual AFFDEXSDK void setDetectGender (bool activate)
 Configure the gender detection state. More...
 
virtual AFFDEXSDK bool getDetectGlasses ()
 Gets the current state of glasses detection. More...
 
virtual AFFDEXSDK void setDetectGlasses (bool activate)
 Configure the glasses detection state. More...
 
virtual AFFDEXSDK bool getDetectAge ()
 Gets the current state of age detection. More...
 
virtual AFFDEXSDK void setDetectAge (bool activate)
 Configure the age detection state. More...
 
virtual AFFDEXSDK bool getDetectEthnicity ()
 Gets the current state of ethnicity detection. More...
 
virtual AFFDEXSDK void setDetectEthnicity (bool activate)
 Configure the ethnicity detection state. More...
 
virtual AFFDEXSDK bool getDetectEngagement ()
 Gets the current state of engagement detection. More...
 
virtual AFFDEXSDK void setDetectEngagement (bool activate)
 Configure the engagement detection state. More...
 
virtual AFFDEXSDK bool getDetectLipCornerDepressor ()
 Gets the current state of lip corner depressor detection. More...
 
virtual AFFDEXSDK void setDetectLipCornerDepressor (bool activate)
 Configure the lip corner depressor detection state. More...
 
virtual AFFDEXSDK bool getDetectSmile ()
 Gets the current state of smile detection. More...
 
virtual AFFDEXSDK void setDetectSmile (bool activate)
 Configure the smile detection state. More...
 
virtual AFFDEXSDK bool getDetectAttention ()
 Gets the current state of attention detection. More...
 
virtual AFFDEXSDK void setDetectAttention (bool activate)
 Configure the attention detection state. More...
 
virtual AFFDEXSDK bool getDetectValence ()
 Gets the current state of valence detection. More...
 
virtual AFFDEXSDK bool getDetectJoy ()
 Gets the current state of joy detection. More...
 
virtual AFFDEXSDK void setDetectJoy (bool activate)
 Configure the joy detection state. More...
 
virtual AFFDEXSDK bool getDetectFear ()
 Gets the current state of fear detection. More...
 
virtual AFFDEXSDK void setDetectFear (bool activate)
 Configure the fear detection state. More...
 
virtual AFFDEXSDK bool getDetectDisgust ()
 Gets the current state of disgust detection. More...
 
virtual AFFDEXSDK void setDetectDisgust (bool activate)
 Configure the disgust detection state. More...
 
virtual AFFDEXSDK bool getDetectSadness ()
 Gets the current state of sadness detection. More...
 
virtual AFFDEXSDK void setDetectSadness (bool activate)
 Configure the sadness detection state. More...
 
virtual AFFDEXSDK bool getDetectAnger ()
 Gets the current state of anger detection. More...
 
virtual AFFDEXSDK void setDetectAnger (bool activate)
 Configure the anger detection state. More...
 
virtual AFFDEXSDK bool getDetectSurprise ()
 Gets the current state of surprise detection. More...
 
virtual AFFDEXSDK void setDetectSurprise (bool activate)
 Configure the surprise detection state. More...
 
virtual AFFDEXSDK bool getDetectContempt ()
 Gets the current state of contempt detection. More...
 
virtual AFFDEXSDK void setDetectContempt (bool activate)
 Configure the contempt detection state. More...
 
virtual AFFDEXSDK void setDetectValence (bool activate)
 Configure the valence detection state. More...
 
virtual AFFDEXSDK bool getDetectBrowRaise ()
 Gets the current state of eyebrow raise detection. More...
 
virtual AFFDEXSDK void setDetectInnerBrowRaise (bool activate)
 Configure the inner eyebrow raise detection state. More...
 
virtual AFFDEXSDK bool getDetectInnerBrowRaise ()
 Gets the current state of inner eyebrow raise detection. More...
 
virtual AFFDEXSDK void setDetectBrowRaise (bool activate)
 Configure the eyebrow raise detection state. More...
 
virtual AFFDEXSDK bool getDetectBrowFurrow ()
 Gets the current state of eyebrow furrow detection. More...
 
virtual AFFDEXSDK void setDetectBrowFurrow (bool activate)
 Configure the eyebrow furrow detection state. More...
 
virtual AFFDEXSDK bool getDetectNoseWrinkle ()
 Gets the current state of nose wrinkler detection. More...
 
virtual AFFDEXSDK void setDetectNoseWrinkle (bool activate)
 Configure the nose wrinkler detection state. More...
 
virtual AFFDEXSDK bool getDetectUpperLipRaise ()
 Gets the current state of upper lip raiser detection. More...
 
virtual AFFDEXSDK void setDetectUpperLipRaise (bool activate)
 Configure the upper lip raiser detection state. More...
 
virtual AFFDEXSDK bool getDetectChinRaise ()
 Gets the current state of chin raiser detection. More...
 
virtual AFFDEXSDK void setDetectChinRaise (bool activate)
 Configure the chin raiser detection state. More...
 
virtual AFFDEXSDK bool getDetectLipPucker ()
 Gets the current state of lip pucker detection. More...
 
virtual AFFDEXSDK void setDetectLipPucker (bool activate)
 Configure the lip pucker detection state. More...
 
virtual AFFDEXSDK bool getDetectLipPress ()
 Gets the current state of lip press detection. More...
 
virtual AFFDEXSDK void setDetectLipPress (bool activate)
 Configure the lip press detection state. More...
 
virtual AFFDEXSDK bool getDetectMouthOpen ()
 Gets the current state of mouth open detection. More...
 
virtual AFFDEXSDK void setDetectMouthOpen (bool activate)
 Configure the mouth open detection state. More...
 
virtual AFFDEXSDK bool getDetectLipSuck ()
 Gets the current state of lip suck detection. More...
 
virtual AFFDEXSDK void setDetectLipSuck (bool activate)
 Configure the lip suck detection state. More...
 
virtual AFFDEXSDK bool getDetectSmirk ()
 Gets the current state of smirk detection. More...
 
virtual AFFDEXSDK void setDetectSmirk (bool activate)
 Configure the smirk detection state. More...
 
virtual AFFDEXSDK bool getDetectEyeClosure ()
 Gets the current state of eye closure detection. More...
 
virtual AFFDEXSDK void setDetectEyeClosure (bool activate)
 Configure the eye closure detection state. More...
 
virtual AFFDEXSDK bool getDetectEyeWiden ()
 Gets the current state of eye widen detection. More...
 
virtual AFFDEXSDK void setDetectEyeWiden (bool activate)
 Configure the eye widen detection state. More...
 
virtual AFFDEXSDK bool getDetectCheekRaise ()
 Gets the current state of cheek raise detection. More...
 
virtual AFFDEXSDK void setDetectCheekRaise (bool activate)
 Configure the cheek raise detection state. More...
 
virtual AFFDEXSDK bool getDetectLidTighten ()
 Gets the current state of lid tighten detection. More...
 
virtual AFFDEXSDK void setDetectLidTighten (bool activate)
 Configure the lid tighten detection state. More...
 
virtual AFFDEXSDK bool getDetectDimpler ()
 Gets the current state of dimpler detection. More...
 
virtual AFFDEXSDK void setDetectDimpler (bool activate)
 Configure the dimpler detection state. More...
 
virtual AFFDEXSDK bool getDetectLipStretch ()
 Gets the current state of lip stretch detection. More...
 
virtual AFFDEXSDK void setDetectLipStretch (bool activate)
 Configure the lip stretch detection state. More...
 
virtual AFFDEXSDK bool getDetectJawDrop ()
 Gets the current state of jaw drop detection. More...
 
virtual AFFDEXSDK void setDetectJawDrop (bool activate)
 Configure the jaw drop detection state. More...
 

Additional Inherited Members

- Protected Member Functions inherited from affdex::Detector
 Detector (const bool useStaticClassifiers, const float processFrameRate, const unsigned int maxNumFaces, const FaceDetectorMode faceConfig)
 Initializes a new instance of the Detector class. More...
 
 Detector (const bool useStaticClassifiers, const float processFrameRate, const FaceDetectorMode faceConfig)
 Initializes a new instance of the Detector class. More...
 
- Protected Attributes inherited from affdex::Detector
std::shared_ptr< affdex::DetectorBase > mDetectorBase
 Smart pointer to underlying DetectorBase More...
 

Detailed Description

A Detector for processing still photographs.

Unlike video detectors ( VideoDetector, CameraDetector and FrameDetector), the PhotoDetector does not rely on temporal information and results may differ from those of video detectors.

Constructor & Destructor Documentation

AFFDEXSDK affdex::PhotoDetector::PhotoDetector ( const unsigned int  maxNumFaces = DEFAULT_MAX_NUM_FACES,
const FaceDetectorMode  faceConfig = FaceDetectorMode::SMALL_FACES 
)

Initializes a new instance of the PhotoDetector class.

Parameters
maxNumFacesThe max number of faces to be tracked.
faceConfigMaximum processing framerate.

virtual AFFDEXSDK affdex::PhotoDetector::~PhotoDetector ( )
overridevirtual

Destructor.

Member Function Documentation

virtual AFFDEXSDK void affdex::PhotoDetector::process ( Frame  photo)
virtual

Processes a photo.

Results will be processed synchronously and this method will block until the results callback returns. Subsequent calls to process will be processed independently.

Parameters
photoPhoto to be processed. Timestamp values are ignored and can be used to identify the photo.
virtual AFFDEXSDK void affdex::PhotoDetector::start ( )
overridevirtual

Initializes the PhotoDetector in preparation for handling photos subsequently pushed via PhotoDetector::process.

Reimplemented from affdex::Detector.

virtual AFFDEXSDK void affdex::PhotoDetector::stop ( )
overridevirtual

Notifies the PhotoDetector that the last photo has been pushed via PhotoDetector::process, allowing it to deallocate resources.

Reimplemented from affdex::Detector.


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