Ask Your Question

John Brewer's profile - activity

2015-12-16 04:37:35 -0600 received badge  Popular Question (source)
2013-05-14 11:38:32 -0600 received badge  Teacher (source)
2013-02-05 01:25:52 -0600 received badge  Necromancer (source)
2013-02-04 21:46:45 -0600 answered a question cvCalcOpticalFlowFarneback movement detection.

You'd probably be better off using the motion template example. It shows how to subtract out non-moving parts of a video feed in a way that highlights moving objects.

2013-02-04 09:51:40 -0600 received badge  Necromancer (source)
2013-01-23 17:29:35 -0600 asked a question Building MacOS X Framework

How do I build OpenCV as a Mac OS X framework? I can build OpenCV as a UNIX-style library fine, and I can also build it as a framework for iOS. However I don't see any CMake option for a Mac framework, nor do I see a build script like the one used for the iOS framework.

Am I missing something?

2012-12-19 07:24:10 -0600 received badge  Supporter (source)
2012-12-18 22:56:41 -0600 answered a question Library not found for -lstdc++ in Xcode

If you're using OpenCV 2.4.2 or earlier, you need to add libstdc++ to your project. To do this:

  • Click on the project in the Project Navigator.
  • Select the "Build Phases" tab.
  • In the "Link Binary with Libraries" section, click the "+" button.
  • Add "libstdc++.dylib" from the list that appears.
  • Rebuild.

If you're using OpenCV 2.4.3 or later, you need to do the same thing, but with libc++.dylib.

2012-12-03 02:29:53 -0600 received badge  Self-Learner (source)
2012-12-02 21:51:32 -0600 answered a question ios 6 and xcode 4.5 linker problems

It looks like your project is not linking against the C++ runtime library. To link against the runtime library:

  • Go to the "Build Phases" tab of the project .
  • Choose the "Link Binary With Libraries" section.
  • Click the "+" button at the bottom of the section.
  • From the list that appears, choose either "libc++.dylib" for OpenCV 2.4.3, or "libstdc++.dylib" for OpenCV 2.4.2 and before.

Rebuild, and everything should work.

2012-12-02 21:44:40 -0600 answered a question Link error for only CascadeClassifier under 2.4.3 for iOS

It turns out that even though I switched from libstdc++ to libc++, I was still compiling against libstdc++, so this lead to some of the method signatures not matching at link time. To fix this:

  • In the Build Settings tab for your project, scroll down to "Apple LLVM Compiler 4.1 - Language"
  • Set the setting "C++ Language Dialect" to "C++11 [-std=c++11]"
  • Set the setting "C++ Standard Library" to "libc++ (LLVM standard C++ library with C++11 support)"

(You'll also need to switch the C++ runtime library from libstdc++ to libc++ in the "Link Binary With Libraries" section of the "Build Phases" tab.)

2012-11-28 09:17:16 -0600 received badge  Student (source)
2012-11-27 23:12:04 -0600 received badge  Editor (source)
2012-11-27 23:03:07 -0600 asked a question Link error for only CascadeClassifier under 2.4.3 for iOS

I've been trying to get my project CVFunhouse to build under OpenCV 2.4.3. I'm using the drop-in opencv.framework downloaded from the opencv.org home page, replacing the older version of the framework.

I've already dealt with the libstdc++ to libc++ change.

Now I'm getting link errors for a single module, CascadeClassifier.

Undefined symbols for architecture armv7: "cv::CascadeClassifier::detectMultiScale(cv::Mat const&, std::vector<cv::rect_<int>, std::allocator<cv::rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)", referenced from: -[CVFFaceDetect processIplImage:] in CVFFaceDetect.o "cv::CascadeClassifier::load(std::string const&)", referenced from: -[CVFFaceDetect processIplImage:] in CVFFaceDetect.o

This is weird because CVFunhouse uses lots of other OpenCV modules, and all the code using other OpenCV modules links fine. Has something changed about CascadeClassifier in 2.4.3?

The complete source for CVFunhouse can be found at:

https://github.com/jeradesign/CVFunhouse

in case that helps.