April 2017
Beginner to intermediate
250 pages
6h 28m
English
An implementation of the face-tracking algorithm can be found in the face_tracker class (see face_tracker.cpp and face_tracker.hpp). The following code is a snippet of its header that highlights its primary functionality:
class face_tracker{ public: bool tracking; //are we in tracking mode? fps_timer timer; //frames/second timer vector<Point2f> points; //current tracked points face_detector detector; //detector for initialisation shape_model smodel; //shape model patch_models pmodel; //feature detectors face_tracker(){tracking = false;} int //0 = failure track(const Mat &im, //image containing face const face_tracker_params &p = //fitting parameters face_tracker_params()); //default tracking parameters void reset(){ ...Read now
Unlock full access