這篇文章主要介紹python如何讀取攝像頭數(shù)據(jù)并保存,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
如下所示:
import cv2 cap = cv2.VideoCapture(0) k = 0 while k != 27: # esc ret, img = cap.read(0) cv2.imshow(‘233', img) k = cv2.waitKey(20) & 0xff print( ‘begin to record images…' ) for ii in range(1000): ret, img = cap.read(0) cv2.imshow(‘233', img) cv2.imwrite(‘imaged%04d.jpg'%(ii), img) cv2.waitKey(20)python有哪些常用庫
python常用的庫:1.requesuts;2.scrapy;3.pillow;4.twisted;5.numpy;6.matplotlib;7.pygama;8.ipyhton等。
以上是“python如何讀取攝像頭數(shù)據(jù)并保存”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!