Ask Your Question
0

Cascade Classifier tutorial runtime crash

asked 2015-03-11 19:46:18 -0600

updated 2015-03-12 04:54:15 -0600

I've been playing around with the Cascade Classifier tutorial. I'm encountering a runtime crash on the second detectMultiScale call. That is to say, the detectMultiscale call to find faces works fine, and the whole thing will run and draw the figure as expected without the call to find eyes. However calling it to find the eyes crashes it.

I only have limited experience with OpenCV (just a few projects), and it's quite possible I'm missing something obvious. Does anyone know what could be wrong?

First I considered the issue might be with the "haarcascade_eye_tree_eyeglasses.xml" file, but that came with the package. So I'm guessing either I'm linking something I shouldn't be or missing something I should be. Either that or it's the beta package, but I have more faith in whomever threw that together!

Unhandled exception at 0x027A3423 in OpenCV project 1.exe: 0xC0000005: Access violation reading location 0x423F4924. Which I realize isn't very helpful. The Call Stack points to "OpenCV project 1.exe!cv::HaarEvaluator::OptFeature::calc(const int * ptr) Line 393." Well outside my own code.

Microsoft Visual Studio Ultimate 2013 (v 12.0.30501.00 Update 2)
OpenCV 3.0.0 beta
Windows 7 64bit

Linking the following in debug:

IlmImfd.lib
ippicvmt.lib
libjasperd.lib
libjpegd.lib
libpngd.lib
libtiffd.lib
libwebpd.lib
opencv_calib3d300d.lib
opencv_core300d.lib
opencv_features2d300d.lib
opencv_flann300d.lib
opencv_highgui300d.lib
opencv_imgcodecs300d.lib
opencv_imgproc300d.lib
opencv_objdetect300d.lib
opencv_ml300d.lib
opencv_photo300d.lib
opencv_shape300d.lib
opencv_stitching300d.lib
opencv_superres300d.lib
opencv_ts300d.lib
opencv_video300d.lib
opencv_videoio300d.lib
opencv_videostab300d.lib
zlibd.lib
comctl32.lib
VFW32.lib

Just the opencv_* files didn't cut it, but I don't think they were supposed to, so I linked the rest, thinking it couldn't do much harm. Also had to link comctl32.lib and VFW32.lib to get things to work after some googling (I'm still not exactly clear why). Happens in both x86 or x64, debug and release. I've done my due diligence in looking around for solutions, but I've exhausted my options. Does anyone have any advice on how to proceed?

edit retag flag offensive close merge delete

Comments

2

The reason of needing those extra includes is because you are building openCV statically to include it completely in your project. Building it dynamically resolves the need for all those dependencies. As to the crash, probably you are using a prebuilt release package... to be able to get usefull debug information, you need to build OpenCV yourself locally to get the pdb debug files.

As to the crash, give me a second, will try the interface here and verify if it works, 3.0 branch has some hickups lately.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-12 04:56:13 -0600 )edit
2

Just checked, using the latest master branch from github (because that has less bugs and using the absolute paths for the models) made it work just fine for me.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-12 05:19:55 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-29 21:30:52 -0600

I'm new to OpenCV so I can't speak as to the reason of the crash, but after running into the same problem and playing around with the code I found that it worked if I replaced "haarcascade_eye_tree_eyeglasses.xml" with "haarcascade_eye.xml"

edit flag offensive delete link more

Comments

that is because some models had defaults and errors. When you pull latest 2.4 and 3.0 branch, this is all fixed by now :) See this issue tracker.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-31 01:33:13 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-11 19:40:47 -0600

Seen: 712 times

Last updated: Mar 29 '15