1,
Download the latest notepad1_6.2.1installation from http://notepad-plus-plus.org;
2,
Slave;
3,
Open notepad ++, press F5 or run (r) --> Run (r )..., Pop up and run... Dialog box, set cmd
/K Python "$ (full_current_path)" & Echo. & pause & Exit enter in the edit box, click Save ..., In the displayed cut dialog box, enter the name as "run ".
Python (you can enter it as needed) and set the shortcut key (the only rule is, do not conflict with the already set, otherwise it will not take effect, this shortcut key can be modified), such as Ctrl + F5, click OK to close running... Window, click Cancel;
4,
Test whether the setting is successful: Print "Hello world! ", Then Ctrl + F5;
5,
Download and install opencv2.3.1: http://blog.csdn.net/fengbingchun/article/details/7288079;
6,
Download numpy-1.6.2-win32-superpack-python2.7from https://sourceforge.net/projects/numpy;
7,
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.
In notepad ++, create an empty file and enter the following statement:
# Show an image
Print "C interface"
# Import cv2.cv as CV
Import 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)
Save as test. py and run it to display an image.
References:
1,
Http://my.oschina.net/neo600/blog/81480
2,
Http://hi.baidu.com/hellosim/item/923df28669ee45c2ee083df3
3,
Http://www.colobu.com /? P = 123001
4,
Http://wenku.baidu.com/view/f877eee8aeaad1f346933faf.html
5,
Http://blog.csdn.net/nwpulei/article/details/7277511
6,
Http://blog.sina.com.cn/s/blog_75e063c10101bfj5.html
7,
Http://www.lfd.uci.edu /~ Gohlke/pythonlibs/# numpy
8,
Http://blog.csdn.net/bh20077/article/details/6946046