I\'m trying to install openCV 2.4.2 (not the newest version but stable version compatible with newer OS X according to several sources) on Mac OS X 10.9 (Mavericks). I have
This may be related to the current issues with Qt on Mavericks.
See: https://github.com/mxcl/homebrew/pull/23793
I'd try installing the current patched homebrew keg for qt, and then installing opencv:
brew update
brew uninstall opencv
brew uninstall qt
brew install -v https://raw.github.com/cliffrowley/homebrew/patched_qt/Library/Formula/qt.rb --HEAD
brew install opencv
Caution to the wind: the qt build took me about an hour to complete
Run the following commands assuming you have brew installed.
brew tap homebrew/science
brew install opencv
You could disable ts module in CMakeCache.txt file:
//Include opencv_ts module into the OpenCV build
BUILD_opencv_ts:BOOL=OFF
I mean that there is no reason to modify existing code.
I think you really need to do a configuration and that is it.
I tried your problems and I think steps are as follow:
You can try to install opencv from homebrew, I met the same problem with cmake in my 10.9 and finally I found the solution from Chris Muktar. Here are the steps:
xcode-select --install
Xcode command line tools 5.0.1 are installed.brew install python
.pip update
pip install numpy
brew linkapps
export PYTHONPATH=/usr/local/Cellar/opencv/2.4.6.1/lib/python2.7/site-packages:$PYTHONPATH
to .bash_profile
in your home directorybrew install opencv
In the last step I came across the Error: No available formula for opencv
. In this case, you should first run the command brew tap homebrew/science
.
Good Luck
Use macports. Once you install macports, just run
sudo port install opencv
at the command prompt.
This other stackoverflow question is mostly correct for how to start using the macports version of opencv in Xcode.
Here are some more up-to-date instructions for using the macports version of OpenCV from Xcode 5: