Exception in toCv while running the sample ofxFaceTracker program


I am getting an exception error while trying to run a sample application for faceTracking.

I have made OfxCv to work in iOS and ofxCv is working fine.

exception arises in :


Description of Exception ::

OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /Users/theo/Documents/CODE/__OPENFRAMEWORKS/gitOF/__BuildAllLibs/OpenCV-2.3.1-iPhone/modules/imgproc/src/color.cpp, line 2433

terminate called after throwing an instance of ‘cv::Exception’
what(): /Users/theo/Documents/CODE/__OPENFRAMEWORKS/gitOF/__BuildAllLibs/OpenCV-2.3.1-iPhone/modules/imgproc/src/color.cpp:2433: error: (-215) scn == 3 || scn == 4 in function cvtColor


I am not able to figure out why this arises an exception for iOS while the same statement works fine for Window OS.

Awaiting your reply :slight_smile:

Hi mayank !

If you use “opencvFaceExample” for iOS in real device ,you should uncomment the

#define USE_CAMERA

on top of testApp.h . This worked for me.

Sorry, You must have misunderstood, I am not using OpenCvFaceExample but I am trying to using it with OfxFaceTracker by KyleMcDonalds, which is an addon for OpenFrameWorks Library.

ahh yes…my mistake.