Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

(OpenCv Java) FaceMark: Exception: bad allocation during using FaceMark for loadModel

// detect faces Hi I am facing exception when I trying to load FaceLandMark Model using loadModel, Can you please help here,

Code: cascade.detectMultiScale(img, faces); // setup landmarks detector Facemark fm = Face.createFacemarkKazemi(); fm.loadModel("C:\Users\Jayashree\Desktop\Faces_Oct18th\model\flandmark_model.dat");

Exceptions as below: Exception in thread "main" java.lang.Exception: std::exception: bad allocation at org.opencv.face.Facemark.loadModel_0(Native Method) at org.opencv.face.Facemark.loadModel(Facemark.java:49) at opencv3433.FaceLandMark1.main(FaceLandMark1.java:61)

click to hide/show revision 2
None

updated 2018-10-20 03:20:50 -0600

berak gravatar image

(OpenCv Java) FaceMark: Exception: bad allocation during using FaceMark for loadModel

// detect faces Hi I am facing exception when I trying to load FaceLandMark Model using loadModel, Can you please help here,

Code: Code:

    cascade.detectMultiScale(img, faces);
     // setup landmarks detector
     Facemark fm = Face.createFacemarkKazemi();
        fm.loadModel("C:\Users\Jayashree\Desktop\Faces_Oct18th\model\flandmark_model.dat");

fm.loadModel("C:\\Users\\Jayashree\\Desktop\\Faces_Oct18th\\model\\flandmark_model.dat");

Exceptions as below: below:

Exception in thread "main" java.lang.Exception: std::exception: bad allocation
 at org.opencv.face.Facemark.loadModel_0(Native Method)
 at org.opencv.face.Facemark.loadModel(Facemark.java:49)
 at opencv3433.FaceLandMark1.main(FaceLandMark1.java:61)

opencv3433.FaceLandMark1.main(FaceLandMark1.java:61)