error: (-215) u != 0 in function void cv::Mat::create(int, const int*, int)

545 views
Skip to first unread message

ANZ DB

unread,
Nov 21, 2017, 6:58:29 AM11/21/17
to javacv
Hello Samuel & All,


I am facing a fatal exceptions alternately (For Example: 2nd run,4th run,6th run,....and so on ).This is observed when application is resumed for 2nd run :-

1> While debugging i got to know that ,DetectMultiscale() is throwing that exception, Following is my code :-

opencv_core.Size minimumSize = new opencv_core.Size(30, 30);
opencv_core.Size maximumSize = new opencv_core.Size();

cascadeClassifier.detectMultiScale(testImage, faces, 1.1, 2,CASCADE_FIND_BIGGEST_OBJECT | CASCADE_SCALE_IMAGE, minimumSize, maximumSize);

Then i call testImage.release(), when my job is done with it.
Can anyone please tell, what else can i do to resolve this exception?? Thanks in Advance.


Following is the LogCat for the same:-

E/AndroidRuntime: FATAL EXCEPTION: Camera Background
                                                                                       Process: com.example.darshana.faceauthentication, PID: 27377
                                                                                    java.lang.RuntimeException: /home/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/android-arm/opencv-3.2.0/modules/core/src/matrix.cpp:433: error: (-215) u != 0 in function void cv::Mat::create(int, const int*, int)                                                                                        
                                                                                             at org.bytedeco.javacpp.opencv_objdetect$CascadeClassifier.detectMultiScale(Native Method)
                                                                                             at com.example.darshana.faceauthentication.LBPHFaceRecognizer.preprocessTheImage(LBPHFaceRecognizer.java:196)
                                                                                             at com.example.darshana.faceauthentication.LBPHFaceRecognizer.predictLabel(LBPHFaceRecognizer.java:122) 


Regards,
ANZ-DB






Samuel Audet

unread,
Nov 22, 2017, 11:39:36 PM11/22/17
to javacv
Could you show a bit more of your code? How are you initializing "faces"?

2017/11/21 20:58 "ANZ DB" <darshna...@gmail.com>:
--

---
You received this message because you are subscribed to the Google Groups "javacv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javacv+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ANZ DB

unread,
Nov 22, 2017, 11:47:10 PM11/22/17
to javacv
Hello Samuel & All,

I resolved the issue by using cascadeClassifier.deallocate(). I need to use this function only when i use lpbhcascade_improved cascade file. The exception details slightly misguided,as The problem was with classifier and not with DetectMultiscale(). Thank you for your response.

Regards,
ANZ-DB
To unsubscribe from this group and stop receiving emails from it, send an email to javacv+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages