Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Cvread Cascade on iOS failed

$
0
0
Platform: iOS, OpenCV 3.1 I am trying to implement object recognition on iOS devices using OpenCV but I have met some difficulties and there is lack of documents or examples of OpenCV for iOS so I need help. I installed opencv using iOS pod packages manager, just run the command "pod install OpenCV" I am using machine learning methods, train a Harr feature classifier. However, it failed because the cvRead cannot recognize the cascade file, and returned > "libc++abi.dylib: terminating with> uncaught exception of type> cv::Exception:> /Users/kyle/code/opensource/opencv/modules/core/src/persistence.cpp:4976:> error: (-2) The node does not> represent a user object (unknown> type?) in function cvRead" Even the origin cascade file 'haarcascade_eye.xml' from the github opencv source cannot be read successfully. And the code is simple as: > NSString *path = [[NSBundle mainBundle] pathForResource:@"haarcascade_eye" ofType:@"xml"];> if(!path)> {> NSLog(@"no cascade file found");> }> else> {> _cascade = (CvHaarClassifierCascade*)cvLoad([path cStringUsingEncoding:NSASCIIStringEncoding], NULL, NULL, NULL);> }

Viewing all articles
Browse latest Browse all 19555

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>