Installing openCV 2.4.2 on Mac OS X 10.9 (Mavericks)

前端 未结 7 574
暗喜
暗喜 2020-12-04 16:06

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

7条回答
  •  孤街浪徒
    2020-12-04 16:45

    I think you really need to do a configuration and that is it.

    I tried your problems and I think steps are as follow:

    1. open terminal in mac
    2. in the terminal, check you have cmake and ccmake. If not, please type "brew install cmake"
    3. go to your downloaded opencv folder, make a new folder by typing "mkdir build", then "cd build"
    4. in this build folder, check you have gcc and g++ installed.
    5. 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!
    6. you should be in terminal again now! then please type "make"
    7. type "sudo make install", and now the opencv is installed, check it by type "brew list", and you should see the opencv there
    8. type "brew linkapps"
    9. do a test if you have python, by typing "import cv", and it should be working!

提交回复
热议问题