Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing openCV 2.4.2 on Mac OS X 10.9 (Mavericks)

Tags:

macos

opencv

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 tried installing from source and using homebrew but neither works. I get the following error when I try installing it:

build Marieke$ make
[ 25%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/precomp.cpp.o
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.cpp:1:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.hpp:2:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts.hpp:40:
/users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts_gtest.h:1657:13: fatal error: 
      'tr1/tuple' file not found
#   include <tr1/tuple>  // NOLINT
        ^
1 error generated.
make[2]: *** [modules/ts/CMakeFiles/opencv_ts.dir/src/precomp.cpp.o] Error 1
make[1]: *** [modules/ts/CMakeFiles/opencv_ts.dir/all] Error 2
make: *** [all] Error 2

I don't know how to solve this and I have tried several things already (I do now have newest versions of Xcode, cmake, ffmpeg, faac, faad, qt, ...) so if anybody can help me, that would be much appreciated, thanks!

like image 563
Marieke Avatar asked Oct 31 '13 13:10

Marieke


People also ask

Is OpenCV compatible with Mac?

Follow the below steps to install the Opencv 4 package on macOS using the setup.py file: Step 1: Download the latest source package of Opencv 4 for python3 from here. Step 2: Extract the downloaded package using the following command.

How do I tell what version of OpenCV is installed?

After installation, it is recommended that you can check the version of OpenCV that Python is using: import cv2 print cv2. __version__ # Should print 3.0.


1 Answers

Run the following commands assuming you have brew installed.

brew tap homebrew/science
brew install opencv
like image 133
zs2020 Avatar answered Nov 09 '22 02:11

zs2020