Ask Your Question

burstasia's profile - activity

2018-10-02 14:34:32 -0600 received badge  Student (source)
2018-10-02 07:41:31 -0600 commented answer FacemarkLBF Params model_filename error

To anyone checking this in the future, make sure you're using the same version for opencv and opencv_contrib! That was m

2018-10-02 07:40:26 -0600 marked best answer FacemarkLBF Params model_filename error

Hi there OpenCv community!

I'm brand new to OpenCV and I've been trying to build a real time face tracking app using Landmark (from the OpenCV contrib)

And when I try to create my facemark ptr, I give it a FacemarkLBF::Params variable. The issue is that the model_filename variable in the Params struct has an error of "Error reading characters of string" when I create the params. Therefore if I try to access the model_filename the program crashes with a read access violation error.

Is this a known issue? I am using OpenCV 3.4.3 and the latest version of the OpenCV contrib from Github.

Here is the code:

    //create instance of lbf facemark model
cv::face::FacemarkLBF::Params params{};
params.n_landmarks = 68; // number of landmark points
params.initShape_n = 10; // number of multiplier for make data augmentation
params.stages_n = 5; // amount of refinement stages
params.tree_n = 6; // number of tree in the model for each landmark point
params.tree_depth = 5; //he depth of decision tree
std::string name{ "lbfmodel.yaml" };
params.model_filename = name.c_str(); //path name to saved lbf facemark model
cv::Ptr<cv::face::Facemark> facemark = cv::face::FacemarkLBF::create(params);

facemark->loadModel("lbfmodel.yaml");
2018-10-02 07:40:26 -0600 received badge  Scholar (source)
2018-10-02 05:52:26 -0600 commented answer FacemarkLBF Params model_filename error

Ah okay, is there a way I can DM you? Because I'm running into another issue and I don't think it belongs on this thread

2018-10-02 05:43:47 -0600 commented answer FacemarkLBF Params model_filename error

Thank you so much for your answer, I'm going to test it out now! I'm somewhat surprised that you need absolute paths?

2018-10-02 04:50:03 -0600 commented question FacemarkLBF Params model_filename error

As far as I understand I need the parameters to create the facemark variable?

2018-10-02 04:47:08 -0600 commented question FacemarkLBF Params model_filename error

Nope, the lbfmodel is trained I believe. So I'm just trying to use the trained model to create the landmarks on the face

2018-10-02 04:44:46 -0600 commented question FacemarkLBF Params model_filename error

Done, replaced the image with text! :)

2018-10-02 04:43:57 -0600 received badge  Editor (source)
2018-10-02 04:43:57 -0600 edited question FacemarkLBF Params model_filename error

FacemarkLBF Params model_filename error Hi there OpenCv community! I'm brand new to OpenCV and I've been trying to buil

2018-10-02 04:29:09 -0600 asked a question FacemarkLBF Params model_filename error

FacemarkLBF Params model_filename error Hi there OpenCv community! I'm brand new to OpenCV and I've been trying to buil

2018-10-02 03:40:24 -0600 commented answer LBF Facemark Tutorial Issue

Hey! so I tried using your solution for my project and the functions 'setFaceDetector' and 'getFaces' does not exist - i