Re: [javacv] FaceRecognizer train() throws OpenCV error

546 views
Skip to first unread message

Samuel Audet

unread,
Jun 9, 2013, 1:41:54 AM6/9/13
to jav...@googlegroups.com
On 06/06/2013 10:23 AM, Oliver Wang wrote:
> Any idea what went wrong?

It looks like you are trying to pass a matrix/image with a size of 0,
and that won't work obviously. But this is just a guess...

Samuel

Jiawei Hu

unread,
Oct 28, 2014, 3:30:24 AM10/28/14
to jav...@googlegroups.com
I went to this same problem, actually I did not know why either. 

I think you have used FisherFaceRecognizer, try LBPHFaceRecognizer or EigenFaceRecognizer instead, maybe that will work. It does work for me, :-) 

On Thursday, June 6, 2013 9:23:35 AM UTC+8, Oliver Wang wrote:
Dear Samuel,

I am using FaceRecognizer train() method, and observe the following OpenCV errors:


06-06 09:11:51.876: E/cv::error()(14932): OpenCV Error: Assertion failed (0 <= _colRange.start && _colRange.start <= _colRange.end && _colRange.end <= m.cols) in cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&), file /home/saudet/projects/javacv-cppjars/opencv-2.4.5/modules/core/src/matrix.cpp, line 292
06-06 09:11:52.119: I/Choreographer(14932): Skipped 45 frames!  The application may be doing too much work on its main thread.
06-06 09:11:52.122: W/dalvikvm(14932): threadid=12: thread exiting with uncaught exception (group=0x410d1300)
06-06 09:11:52.150: E/AndroidRuntime(14932): FATAL EXCEPTION: Thread-3880
06-06 09:11:52.150: E/AndroidRuntime(14932): java.lang.RuntimeException: /home/saudet/projects/javacv-cppjars/opencv-2.4.5/modules/core/src/matrix.cpp:292: error: (-215) 0 <= _colRange.start && _colRange.start <= _colRange.end && _colRange.end <= m.cols in function cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)

and before this, there are whole bunch of messages such as:

06-06 09:11:50.162: E/dalvikvm(14932): Could not find class 'java.awt.image.BufferedImage', referenced from method com.googlecode.javacv.cpp.opencv_core$IplImage.getBufferedImage
06-06 09:11:50.162: W/dalvikvm(14932): VFY: unable to resolve new-instance 1655 (Ljava/awt/image/BufferedImage;) in Lcom/googlecode/javacv/cpp/opencv_core$IplImage;

Digging through earlier archives on this group, it was mentioned that these are harmless.


Any idea what went wrong?

thanks

Oliver
Reply all
Reply to author
Forward
0 new messages