kylemcdonald / ofxCv

Alternative approach to interfacing with OpenCv from openFrameworks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macOS crash when trying to run example-face

BenBergman opened this issue · comments

I just cloned ofxCV into a copy of OF 0.10.1. I ran the project generator on the example-face project and it crashes with the following error:

2019-06-24 14:42:09.854640-0500 example-face[64963:40507560] MessageTracer: load_domain_whitelist_search_tree:73: Search tree file's format version number (0) is not supported
2019-06-24 14:42:09.854672-0500 example-face[64963:40507560] MessageTracer: Falling back to default whitelist
[ error ] ObjectFinder::setup: Couldn't find ../../../data/haarcascade_frontalface_default.xml
2019-06-24 14:42:10.350867-0500 example-face[64963:40507514] [] CMIO_Unit_ScopeElement.h:200:SafeGetElement Throwing err: -67454
2019-06-24 14:42:10.351916-0500 example-face[64963:40507514] [] CMIOUnitFigBaseObjectImpl.c:246:CMIOUnitCreateFromDescription Invalid paramater
2019-06-24 14:42:10.367249-0500 example-face[64963:40507514] [] CMIO_Unit_Input_Device.cpp:244:GetPropertyInfo CMIOUInputFromProcs::GetPropertyInfo() failed for id 102, Error: -67456
OpenCV Error: Assertion failed (!empty()) in detectMultiScale, file /Users/travis/build/openframeworks/apothecary/apothecary/build/opencv/modules/objdetect/src/cascadedetect.cpp, line 1639
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Users/travis/build/openframeworks/apothecary/apothecary/build/opencv/modules/objdetect/src/cascadedetect.cpp:1639: error: (-215) !empty() in function detectMultiScale

The app did ask for camera permissions before the error showed up.

I am running macOS Mojave 10.14.5.

Solved it. bin/data/haarcascade_frontalface_default.xml was missing from the example directory. I copied it out of ../../../examples/computer_vision/opencvHaarFinderExample/bin/data/haarcascade_frontalface_default.xml and now all is working as expected.