Recently learning Python, and if you have image processing, try to use the OpenCV library under Python, and here are some things to note about configuration installation:
(If you've already installed OpenCV 2, and Python2.7)
1. What do you think of your OPENCV version to support Python version, go to OPENCV installation directory to view: such as my D:\Program files\opencv2.4.8\opencv\build\python\ 2.7, is the version that supports Python2.7.
2. Use OpenCV also need to install numpy, download and python version consistent numpy, Opencv2 need numpy1.8.1, use 1.6.1 will error, I do not know why.
numpy1.8.1 Download Connection: Click to open link
3. Be sure to unify the 32-bit or 64-bit, 32-bit will be loaded 32-bit, Python
4. The final step requires a simple configuration: OpenCV folder, build->python->2.7 copy 2.7 under the Cv2.pyd to ... \python27\lib\site-packages, you can.
Note: The x86 is 32 bits and the x64 is 64 bits, same as the corresponding version of the front.
To test whether the installation was successful:
1. Enter the. Directory: \opencv2.3.1\samples\python Double-click drawing.py or CD to directory and then Python drawing.py
2. Write a small program to read the display image yourself:
Import cv2 img = Cv2.imread ("./faces.jpg") cv2.imshow ("Image", img) </span>
Included: Using Python and OpenCV to detect the barcode on the image, including the source code, for everyone to learn click to open the link
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Windows OpenCV 2.x.x Python 2.7.x Configuration