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

A Detector used to process a video file. This class opens a video file and will immediately start decoding and processing frames from the video file. More...

#include <VideoDetector.h>

Inheritance diagram for affdex::VideoDetector:
affdex::Detector

Public Member Functions

AFFDEXSDK VideoDetector (const double processFPS=DEFAULT_PROCESSING_FRAMERATE, const unsigned int maxNumFaces=DEFAULT_MAX_NUM_FACES, const FaceDetectorMode faceConfig=affdex::FaceDetectorMode::SMALL_FACES)
 Creates a Video Detector. More...
 
virtual AFFDEXSDK void start () override
 Initializes the VideoDetector and starts producing frames and results immediately. More...
 
AFFDEXSDK void process (const affdex::path &path)
 Open a video file

Parameters
pathPath to the video file to be processed.
More...
 
virtual AFFDEXSDK void stop () override
 Notifies the VideoDetector to stop processing frames. Immediately stops processing. More...
 
AFFDEXSDK void setProcessStatusListener (ProcessStatusListener *listener) override
 Sets the ProcessStatusListener listener. 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 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...
 
virtual AFFDEXSDK void enableAnalytics ()
 Enable Analytics. More...
 
virtual AFFDEXSDK void disableAnalytics ()
 Disable Analytics. More...
 

Additional Inherited Members

- Protected Member Functions inherited from affdex::Detector
 Detector (const float processFrameRate)
 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 used to process a video file. This class opens a video file and will immediately start decoding and processing frames from the video file.

Constructor & Destructor Documentation

AFFDEXSDK affdex::VideoDetector::VideoDetector ( const double  processFPS = DEFAULT_PROCESSING_FRAMERATE,
const unsigned int  maxNumFaces = DEFAULT_MAX_NUM_FACES,
const FaceDetectorMode  faceConfig = affdex::FaceDetectorMode::SMALL_FACES 
)

Creates a Video Detector.

Parameters
processFPSPeak frame-rate at which frames from the video will be processed. Frames occuring in excess of this rate will be dropped.
maxNumFacesThe max number of faces to be tracked.
faceConfigFace detector configuration.

Member Function Documentation

AFFDEXSDK void affdex::VideoDetector::process ( const affdex::path path)

Open a video file

Parameters
pathPath to the video file to be processed.

AFFDEXSDK void affdex::VideoDetector::setProcessStatusListener ( ProcessStatusListener listener)
overridevirtual

Sets the ProcessStatusListener listener.

Parameters
listenerThe listener.

Reimplemented from affdex::Detector.

virtual AFFDEXSDK void affdex::VideoDetector::start ( )
overridevirtual

Initializes the VideoDetector and starts producing frames and results immediately.

Reimplemented from affdex::Detector.

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

Notifies the VideoDetector to stop processing frames. Immediately stops processing.

Reimplemented from affdex::Detector.


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