标签:window atp def name mat div cap eth tcap
该方法只启动usb摄像头
import cv2 import numpy import matplotlib.pyplot as plot class Camera: cap = cv2.VideoCapture(0) @staticmethod def getCamera(): ret, frame = Camera.cap.read() return ret, frame @staticmethod def getCap(): return Camera.cap def main(): camera = Camera() while(1): ret, frame = camera.getCamera() cv2.imshow("capture", frame) if cv2.waitKey(1) & 0xFF == ord(‘q‘): break camera.cap.release() # cv2.destroyAllWindows() if __name__ == ‘__main__‘: main()
Jetson TX1使用usb camera采集图像 (2)
标签:window atp def name mat div cap eth tcap
原文地址:https://www.cnblogs.com/haiyang21/p/10708241.html