Skip to content

Instantly share code, notes, and snippets.

@haohcraft
Last active August 29, 2015 14:02
Show Gist options
  • Save haohcraft/3bcff42a1d4e2d16dc55 to your computer and use it in GitHub Desktop.
Save haohcraft/3bcff42a1d4e2d16dc55 to your computer and use it in GitHub Desktop.
How to install opencv in mac os 10.9
http://stackoverflow.com/questions/19707468/installing-opencv-2-4-2-on-mac-os-x-10-9-mavericks
----------------Approach 1---------------
I tried your problems and I think steps are as follow:
open terminal in mac
in the terminal, check you have cmake and ccmake. If not, please type "brew install cmake"
go to your downloaded opencv folder, make a new folder by typing "mkdir build", then "cd build"
in this build folder, check you have gcc and g++ installed.
now, doing configuration by type "ccmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++", type "c" first for configuration then exit by "e" then "g" for generating!
you should be in terminal again now! then please type "make"
type "sudo make install", and now the opencv is installed, check it by type "brew list", and you should see the opencv there
type "brew linkapps"
do a test if you have python, by typing "import cv", and it should be working!
----------------Approach 2 (highly recommended)------------------
brew tap homebrew/science
brew install opencv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment