今天很happy因為下載下傳到了一本關于用Python調用OpenCV的書
《Programming Computer Vision with Python》,上個月Orielly才出版的,哈哈。happy。
然後寫出了第一個OpenCV+Python的“hello world”:展示lena.jpg
代碼:
這書一上來讓下載下傳Python Imaging Library ,安裝方式是,到官網下載下傳壓縮包解壓然後chmod再python setup.py build 和install,參看:
<a href="http://www.blogjava.net/stone2083/archive/2010/11/05/299946.html">http://www.blogjava.net/stone2083/archive/2010/11/05/299946.html</a>
調用攝像頭也和C++的版本差不多:
隻是這裡的ret,im=cap.read()一句話不懂。去掉ret,後代碼不能運作。。要好好學習python阿
學python,其實是繼續做條碼識别。