Ask Your Question
0

detectMultiScale hangs on Mac / Xcode / OpenCV 3.1.0

asked 2016-04-19 14:45:58 -0600

ndyr gravatar image

I am trying to do some research with OpenCV and testing out some of the tutorial code for face detection I got through OpenCV website.

I am new to OpenCV but I was able to install it ( not through homebrew, put downloaded it and extracted it), MacPorts, cmake / make commands to build it out, etc... I have been able to get it running and tried some other sample stuff to make sure it was in fact working properly

With the face/eye detection sample, the video window opens but takes a bit, then hangs when the camera loads. In XCode it highlights the line face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2, 0, Size(80, 80) ); (Thread 1: signal SIGABRT) and hangs. Nothing is really spit in to any console that I can see.

I haven't found much information on this, a lot of answers pointed to weird builds / installations, but for what I can tell everything built properly. I have even rebuilt with out using OpenCL, but no luck.

edit retag flag offensive close merge delete

Comments

I'm having the same issue. Pretty much identically actually. Still looking for a solution I'll post it here if i find anything.

btraquair gravatar imagebtraquair ( 2016-10-08 03:09:36 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-10-08 03:30:36 -0600

I'm afraid I cant tell you why but I have found a solution. Th problem has to do with the classifier functions. I was calling the haar cascades files and got the exact same error. When I changed the path to point at the haarcascades_cuda files the program works as expected (opencv-master/data/haarcascades_cuda/haarcascade_frontalface_alt.xml). I would assume this has to do with the formatting but I couldn't tell you exactly, yet. Hope this helps.

edit flag offensive delete link more

Comments

That's interesting - if you can reproduce it. What OS version are you running? So does it gives a segmentation fault or does it just quit.

atv gravatar imageatv ( 2016-10-08 03:38:35 -0600 )edit

If the cuda models are working for you on CPU, than it means you have still an OLD opencv version running. The master branch has had several fixes related to this in the last year to solve issues with backend changing and models not able to cope with that!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-10-10 04:42:22 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-19 14:45:58 -0600

Seen: 395 times

Last updated: Oct 08 '16