A simple tutorial to get OpenCV set up on Mac OS X. I get this done on my Macbook Pro with Mavericks OS. Luckily enough, you will success following the instructions blow.
You can download the source code from OpenCV Official Site, I prefer to pull the source using
git clone https://github.com/Itseez/opencv.git
I use Homebrew as my package manager, to install
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
After brew installed, get
brew install cmake
Build and Install OpenCV
Now the recipes are ready, let’s cook:
cd opencv mkdir build cd build cmake -G "Unix Makefiles" .. make -j8 sudo make install
Let’s rock by building a simple sample:
cd opencv/samples/cpp g++ edge.cpp -o edge `pkg-config --cflags --libs opencv` ./edge
You should see a window pop up and demo the
Canny edge detection.
Happy playing with OpenCV, drop me a line if you got problems.