sequence_face_landmarks
Utility for sequence face landmarks
sfl::SequenceFaceLandmarks Class Referenceabstract

Interface for sequence face landmarks functionality. More...

#include <sequence_face_landmarks.h>

Public Member Functions

virtual const FrameaddFrame (const cv::Mat &frame, int id=-1)=0
 Add a frame to process. More...
 
virtual const std::list< std::unique_ptr< Frame > > & getSequence () const =0
 Get the frame sequence with all landmarks and bounding boxes for each detected face.
 
virtual std::list< std::unique_ptr< Frame > > & getSequenceMutable ()=0
 Get the frame sequence with all landmarks and bounding boxes for each detected face.
 
virtual void clear ()=0
 Clear all processed or loaded data.
 
virtual std::shared_ptr< SequenceFaceLandmarksclone ()=0
 Create a full copy, loaded face detector and landmark model will be shared.
 
virtual const std::string & getModel () const =0
 Get landmarks model file.
 
virtual float getFrameScale () const =0
 Get frame scale.
 
virtual const std::string & getInputPath () const =0
 Get source input path. More...
 
virtual FaceTrackingType getTracking () const =0
 Get the current type of tracking.
 
virtual void load (const std::string &filePath)=0
 Load a sequence of face landmarks from file.
 
virtual void save (const std::string &filePath) const =0
 Save current sequence of face landmarks to file.
 
virtual void setFrameScale (float frame_scale)=0
 Set frame scale.
 
virtual void setModel (const std::string &modelPath)=0
 Set landmarks model file.
 
virtual void setInputPath (const std::string &inputPath)=0
 Get source input path. More...
 
virtual void setTracking (FaceTrackingType tracking)=0
 Set tracking type [TRACKING_NONE | TRACKING_BRISK | TRACKING_LBP]. More...
 
virtual size_t size () const =0
 Get the number of the current frames.
 

Static Public Member Functions

static std::shared_ptr< SequenceFaceLandmarkscreate (const std::string &landmarks_path, float frame_scale=1.0f, FaceTrackingType tracking=TRACKING_NONE)
 Create an instance initialized with a landmarks model file. More...
 
static std::shared_ptr< SequenceFaceLandmarkscreate (float frame_scale=1.0f, FaceTrackingType tracking=TRACKING_NONE)
 Create an instance. More...
 

Detailed Description

Interface for sequence face landmarks functionality.

This class provide face landmarks functionality over a sequence of frames.

Member Function Documentation

virtual const Frame& sfl::SequenceFaceLandmarks::addFrame ( const cv::Mat &  frame,
int  id = -1 
)
pure virtual

Add a frame to process.

Parameters
frameThe frame to process [BGR|Grayscale].
idFrame id. If negative, an internal counter will be used instead.
static std::shared_ptr<SequenceFaceLandmarks> sfl::SequenceFaceLandmarks::create ( const std::string &  landmarks_path,
float  frame_scale = 1.0f,
FaceTrackingType  tracking = TRACKING_NONE 
)
static

Create an instance initialized with a landmarks model file.

Parameters
landmarks_pathPath to the landmarks model file or landmarks cache file (.pb).
frame_scaleEach frame will be scaled by this factor. Useful for detection of small faces. The landmarks will still be in the original frame's pixel coordinates.
trackingTracking type [TRACKING_NONE | TRACKING_BRISK | TRACKING_LBP].
static std::shared_ptr<SequenceFaceLandmarks> sfl::SequenceFaceLandmarks::create ( float  frame_scale = 1.0f,
FaceTrackingType  tracking = TRACKING_NONE 
)
static

Create an instance.

Parameters
frame_scaleEach frame will be scaled by this factor. Useful for detection of small faces. The landmarks will still be in the original frame's pixel coordinates.
trackingTracking type [TRACKING_NONE | TRACKING_BRISK | TRACKING_LBP].
virtual const std::string& sfl::SequenceFaceLandmarks::getInputPath ( ) const
pure virtual

Get source input path.

This was either loaded from file or set manually.

virtual void sfl::SequenceFaceLandmarks::setInputPath ( const std::string &  inputPath)
pure virtual

Get source input path.

The input path can be then saved and loaded from file.

virtual void sfl::SequenceFaceLandmarks::setTracking ( FaceTrackingType  tracking)
pure virtual

Set tracking type [TRACKING_NONE | TRACKING_BRISK | TRACKING_LBP].

This will keep the face ids consistent in the sequence.


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