Java multi-thread cascade

asked 2013-09-02 10:11:29 -0500

Sen Jia gravatar image

updated 2013-09-06 06:37:20 -0500

Hi, I wrote a multi-thread program to run CascadeClassifier.detectmultiscale(). It works fine on my Linux OS, but it crashes on my Windows 7. I am using INTEL core cpu and OpenCV 246. I am new to JNI, could anyone tell me if the DLL is thread safe? How can I fix this?

Here is my exeception:

Corrupt JPEG data: 619 extraneous bytes before marker 0xd9 Invalid SOS parameters for sequential JPEG OpenCV Error: Null pointer (Hidden cascade has not been created. Use cvSetImagesForHaarClassifierCascade) in unknown function, file ..\..\..\src\opencv\modules\objdetect\src\haar.cpp, line 843 ..\..\..\src\opencv\modules\objdetect\src\haar.cpp:843: error: (-27) Hidden cascade has not been created. Use cvSetImagesForHaarClassifierCascade

It runs OK at the beginning, but crushes after running 5 or 10 mins. I used to think there is something wrong with my images, but they work fine in Linux OS. Is it safe that multi threads share the same CascadeClassifier?What is the difference between self-built .SO file in Linux and the prebuilt DLL for Windows?


edit retag flag offensive close merge delete



crashes how ? please be more explicit on this.

supplying offending pieces of code / error messages won't hurt here

berak gravatar imageberak ( 2013-09-02 16:53:06 -0500 )edit