stasm icon indicating copy to clipboard operation
stasm copied to clipboard

Error after using make -> no type named 'CascadeClassifier' in namespace 'cv';

Open toniomg opened this issue 9 years ago • 4 comments

I'm trying to build stasm for iOS in my Mac, I followed the steps mentioned in the readme file:

  1. Patched the files
  2. Used "makefile ." in the stasm directory (I got an error because OpenCVConfig.cmake can't be found, I solved it with this line: export OpenCV_DIR=/Volumes/DATA/Users/xxx/ios/build/iPhoneOS-arm7s/). Everything worked fine.
  3. When trying to do "make" I get the error: /stasm/stasm/misc.h:460:5: error: no type named 'CascadeClassifier' in namespace 'cv'; did you mean 'CvHaarClassifier'? cv::CascadeClassifier& cascade, // out

Apart from a lot of them related to this one.

Is there any step I did wrong while making?

toniomg avatar Mar 03 '15 11:03 toniomg

Dear toniomg, The second problem is OpenCV related, nothing to do with makefile. I've recently built for iOS myself, and found that stasm was including deprecated OpenCV headers. Referring to CascadeClassifier with its fully qualified name cv::CascadeClassifier is the same that referring to it as CascadeClassifier, but previously putting a 'using namespace cv;'. My guess is that you need to check in which header CascadeClassifier class is defined and double check that STASM includes it. In addition, cvCascadeClassifier and CascadeClassifier are the same. The former is the C-like interface while the latter is the C++ interface. I hope this helps. Best, Juan

juan-cardelino avatar Mar 03 '15 11:03 juan-cardelino

Hello,

I fixed it using OpenCv 2.4.9 instead of 2.4.10.

But, I'm getting this while running make again:

ld: warning: directory not found for option '-L/Release' ld: framework not found CoreImage

Any clue?

Edit: Do you want me to create a new issue for this?

toniomg avatar Mar 04 '15 09:03 toniomg

How did you compiled for iOS? even if I managed to fix it, stasm libraries will be compiled for x86, but OpenCV will be compiled for armv7, so it will fail.

toniomg avatar Mar 04 '15 16:03 toniomg

Hi, I'm also trying to compile for iOS but all I do fails, can you explain me how you do it, I'm using OS X Yosemite, thanks.

aliasdoc avatar Jan 24 '16 15:01 aliasdoc