Cause of unknown exception in detectMultiScale

asked 2016-08-10 03:30:03 -0600

I use OpenCV in Java. With this call:

faceDetector.detectMultiScale(m2, faceDetections, 1.3, 4, 0, new Size(
                10, 10), new Size(200, 200));

I get the following error:

Exception in thread "UserDetection" java.lang.Exception: unknown exception
    at org.opencv.objdetect.CascadeClassifier.detectMultiScale_0(Native Method)
    at org.opencv.objdetect.CascadeClassifier.detectMultiScale(CascadeClassifier.java:94)
    at test.hmi.FaceDetection.detect(FaceDetection.java:103)

The problem is that, without code changings, the error appered and stayed then until computer restart. After that I was unable to reproduce the error.

Therefore I want to ask what could be causes of this error message in the detectMultiScale function.

edit retag flag offensive close merge delete

Comments

We must simply love these unknown exceptions ... are you in debug mode or in release mode? Because in debugging mode you might get more information on the actual issue. For the moment it can be about everything inside the complex detectMultiScale function

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-10 04:08:27 -0600 )edit

@StevenPuttemans: thanks. I use release mode. Debug mode is a good idea for the next time. But with no idea for reproducing the error I have to wait for it to happen again. I hopped there are some common causes for this kind of error.

Stegosauria gravatar imageStegosauria ( 2016-08-10 04:31:03 -0600 )edit

Well the cause will only be definable if we know where it went wrong. There are a million things that can get detectMultiScale to crash, so no real beginning here.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-10 08:45:32 -0600 )edit