Opencv on MAC (Xcode)

Setting up OpenCV on Mac could be annoying sometimes, atleast for people like me.

Here is a short and reliable guide to help you set up OpenCV on Mac.

This is a help from the internet I found and like to share with others.

This is OpenCV 2.1

The major changes since v2.0:

=============================

* tons of bug fixes, much better test coverage.

* TBB instead of OpenMP; dynamic SSE detection.

* SWIG-based Python bindings are no longer supported.

Python samples rewritten using the new interface.

* more complete support for 64-bit Win and Mac OSes, including highgui.

* better stereo correspondence algorithm (SGBM), see opencv/samples/c/stereo_match.cpp

* grabcut image segmentation algorithm. see opencv/samples/c/grabcut.cpp

... and more.

The detailed changelog is available at https://code.ros.org/svn/opencv/trunk/opencv/doc/ChangeLog.htm

Installation notes:

===================

For the list of prerequisities and more detailed installation guide,

please, see http://opencv.willowgarage.com/wiki/InstallGuide

Here is the procedure at glance:

--------------------------------

1. tar -xjf OpenCV-2.1.0.tar.bz2

2. mkdir opencv.build

3. cd opencv.build

4. cmake [<extra_options>] ../OpenCV-2.1.0 # CMake-way (You can just delete [<extra_options>] if you are not aware about the cmake options)

5. make -j 2

6. sudo make install

7. sudo ldconfig # linux only (ONLY LINUX USER)

Known problems:

===============

* On MacOSX 10.5 and earlier Cocoa and QTKit bindings do not compile and/or do not work, so it is recommended to pass WITH_CARBON=ON and WITH_QUICKTIME=ON to CMake.