Friday, 27 August 2010

OpenCV setup in MAC OSX

Install macports - > http://www.macports.org/install.php

Open terminal type sudo port -v selfupdate

type sudo port install opencv

Once the installation is successful. Include OpenCV in XCode by following the steps below.

These instructions were written for Xcode 3.1.x
Create a new XCode project using the Command Line Utility/Standard Tool template
Select Project -> Edit Project Settings
Select the Build tab
Set Configuration to All Configurations
In the Architectures section, double-click Valid Architectures and remove all the PPC architectures
In the Search Paths section set Header Search Paths to /usr/local/include/opencv
Close the Project Info window
Select Project -> New Group and create a group called OpenCV Frameworks
With the new group selected, select Project -> Add to Project…
Press the "/" key to get the Go to the folder prompt
Enter /usr/local/lib
Select libcxcore.dylib, libcvaux.dylib, libcv.dylib, libhighgui.dylib, and libml.dylib.
Click Add
Uncheck Copy Items… and click Add
Now you should be able to include the OpenCV libraries, compile, and run your project

No comments:

Post a Comment