Mac OSX installs the OpenCV

Source: Internet
Author: User

1. Installing homebrew

Many online methods, self-search

2. Installing CMake

sudo brew install CMake

3. Download OpenCV Source code

wget Https://github.com/Itseez/opencv/archive/2.4.13.zip

4. Unzip the installation

Unzip 2.4.13.ZIPCD opencv-2.4.13/mkdir BUILDCD build/cmake-d cmake_build_type=release-d cmake_install_prefix=/usr/ Local-d build_python_support=on-d Build_examples=on. Makesudo make Install

5. Link the cv2.so file to the Python site-packages directory

sudo ln-s/usr/local/lib/python2.7/site-packages/cv2.so/library/python/2.7/site-packages/

Test in 6.python

>>> Import cv2>>> Print cv2.__version__2.4.13

Another: Homebrew can be installed directly OPENCV, no test, here for reference only:

Brew updatebrew Tap Homebrew/homebrew-sciencebrew install OpenCV

Mac OSX installs the OpenCV

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.