add -fdloc for customize face detection/classifier files

This commit is contained in:
yorkie 2017-06-14 11:46:44 +08:00
parent e678fb19f9
commit 138c8bd463

View file

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