Anaconda Configuration OpenCV

Source: Internet
Author: User

When using the Python language for image processing, we often use anaconda. This software is powerful and integrates a lot of useful python dependencies including numpy,pandas,matplotlib and so on. In addition, the inside with the Jupyter visual editor is also very useful, strongly recommended, it is more interactive, convenient for us to debug the code. Of course, anaconda with graphics and image processing module pil,but It is not very good, for a image processing, OPENCV must be used, it is a good open source library. So, how to integrate the OpenCV in the Anaconda, the following I will tidy up the process for your reference:

1 Install Anaconda, this is good under the official net, the installment process is fool type.
Https://www.continuum.io/downloads

2 installation OpenCV, this installation is also very convenient, to the official website next package extracts the file can be.
Http://opencv.org/downloads.html
Remember, use OPENCV words in the computer's advanced settings, click on the environment variable, set OPENCV path, tell the computer where to find this library.

3 Copy paste Cv2.pyd file
Find Anaconda This path C:\Anaconda2\Lib\site-packages, each computer is not the same, which contains Python to call the package, so we want to import cv2, obviously, also want to put the corresponding file here
Then find the OpenCV corresponding path C:\opencv\build\python\2.7\x64 (note 64-bit and 32-bit different), Then copy the Cv2.pyd file, paste it into the Anaconda path above, restart the computer (if it is the first time set OPENCV environment variables), try the DOS inside can invoke the command:

Import Cv2 

If you can, prove OK.

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.