Merge pull request #202 from yorkie/add/fdloc

add -fdloc for customize face detection/classifier files
This commit is contained in:
Tadas Baltrusaitis 2017-06-14 15:11:48 -04:00 committed by GitHub
commit 34c81ee113

View file

@ -83,6 +83,14 @@ FaceModelParameters::FaceModelParameters(vector<string> &arguments)
i++;
}
if (arguments[i].compare("-fdloc") ==0)
{
string face_detector_loc = arguments[i + 1];
face_detector_location = face_detector_loc;
valid[i] = false;
valid[i + 1] = false;
i++;
}
if (arguments[i].compare("-sigma") == 0)
{
stringstream data(arguments[i + 1]);
@ -253,12 +261,7 @@ void FaceModelParameters::init()
reinit_video_every = 4;
// Face detection
#if OS_UNIX
face_detector_location = "classifiers/haarcascade_frontalface_alt.xml";
#else
face_detector_location = "classifiers/haarcascade_frontalface_alt.xml";
#endif
quiet_mode = false;
// By default use HOG SVM