OpenCV and Xcode

Uncategorizedon June 26th, 2009

OpenCV is really awesome. I’ve been using the library extensively in my summer research. For those who don’t know what OpenCV is, this is from the main website:

OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real time computer vision.

Example applications of the OpenCV library are Human-Computer Interaction (HCI); Object Identification, Segmentation and Recognition; Face Recognition; Gesture Recognition; Motion Tracking, Ego Motion, Motion Understanding; Structure From Motion (SFM); Stereo and Multi-Camera Calibration and Depth Computation; Mobile Robotics.

Cameo – Reid Draper: roommate and programmer extraordinaire.

I wasted a lot of time trying to get the library to compile on OS X. Don’t make the same mistake! Download the pre-compiled Universal Binary from this site. Currently, it is version 1.2, but a huge 2.0 release is coming in August.

Back to the framework. Don’t waste your time try to add build phases and whatnot. I never managed to get that to work. Just copy OpenCV.framwork to /Library/Frameworks. Do not add it to ~/Library/Frameworks, but the root Library.

After that, when adding “existing framework to application” just navigate to it. Everything will link just fine. Now, do something awesome.