Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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:

image description

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:

image description

    //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");
click to hide/show revision 3
None

updated 2018-10-02 04:44:14 -0600

berak gravatar image

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");