edit: The below turned out to not be very helpful – after many issues with the correct version of Python vs other compilation issues, I’ve gone back to trying to use the precompiled frameworks for OSX. It is available here: http://wiki.nuigroup.com/Installing_OpenCV_on_Mac_OS_X
I’ve been compiling OpenCV today for some face tracking software builds and ran into a few problems getting it to compile.
Required:
- XCode installed
- MacPorts installed
First, cmake must be installed
sudo port install cmake
And a few libraries that are required
sudo port install ilmbase +universal
port provides /opt/local/lib/libIlmImf.dylib
sudo port install zlib +universal
sudo port install openexr +universal
And now, grab from SVN, configure, compile and install
svn co https://code.ros.org/svn/opencv/trunk/opencv
cd opencv
mkdir build
cd build
cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C/CXX_FLAGS=-m32 -D WITH_FFMPEG=OFF -D BUILD_EXAMPLES=ON -D BUILD_LATEX_DOCS=ON ..
make -j2
sudo make install
Cross some fingers and
cd ../samples/python/ python camera.py