1. Slave;
2. Download eclipse from http://www.eclipse.org/downloads/
Classic version and decompress it;
3. Slave;
4. Open eclipse, help à install
New software ..., Click Add ..., Enter pydev in name, http://pydev.org/updatesin location, click OK, wait for download, select pydev
For eclipse à next, (I do not know why it will wait for a long time. To cancel this step, use the second method );
5. Slave;
6. Copy the pydev2.7.1/features and pydev2.7.1/plugins folders to the eclipse/dropins folder and restart eclipse;
7. Copy the content in pydev2.7.1/features to the eclipse/features folder, and copy the content in pydev2.7.1/plugins to the eclipse/plugins folder;
8. Restart eclipse, window --> preferences --> pydev --> editor --> Interpreter
-Python: click New ..., Interpreter name: python2.7.1, interpreter executable: D: \ python27 \ python.exe, and click OK to bring up selection
Needed dialog box --> select all, click OK, and click OK;
9. test whether the file is set up correctly: file --> New --> project... --> Select pydev under pydev.
Project --> next, Project name: testpython, project type: Python, grammar version: 2.7, Interpreter: python2.7.1, select create 'src' folder and add
It To thepythonpath, click Finish;
10. Select testpython, right-click --> New --> other... --> Select pydev under pydev.
& Module --> next --> name: Test --> finish; input a statement: Print "Hello World !" , Click Run --> RUN
As --> Python run, run correctly, and the configuration is successful;
11. Download and install opencv2.3.1: http://blog.csdn.net/fengbingchun/article/details/7288079;
12. Download numpy-1.6.2-win32-superpack-python2.7from https://sourceforge.net/projects/numpy;
13. copy all the files in the build --> Python --> 2.7 folder under opencv2.3.1 to D: \ python27 \ Lib \ Site-packages, and double-click D: \ soft \ opencv2.3.1 \ opencv \ samples \ drawing in the python folder. py file. If it runs correctly, the configuration is correct;
14. Final Test: Enter the following statement in the test. py file to run the test correctly.
# Show an image
Print"Cinterface"
Import cv2.cvas CV
Im = cv. LoadImage ("E :\\Python\ 1.JPG")
Cv. namedwindow ("Source")
Cv. showimage ("Source", Im)
Cv. waitkey (0)
Print"C ++ interface"
Import cv2
Im = cv2.imread ("E :\\Python\ 1.JPG")
Cv2.namedwindow ("Source")
Cv2.imshow ("Source", Im)
Cv2.waitkey (0)
References:
1. http://www.ourunix.org/post/320.html
2. http://pydev.org/manual_101_install.html
3. http://www.linuxso.com/linuxbiancheng/10600.htmll
4. http://www.cnblogs.com/huzhiwei/archive/2012/09/07/2674676.html
5. http://www.cr173.com/html/7367_1.html