opencv python chapter1 开摄像头

import cv2 as cv
import numpy as np
import matplotlib.pyplot as plt

frameWidth = 640
frameHeight = 480
cap = cv.VideoCapture(0)
cap.set(3,frameWidth)
cap.set(4,frameHeight)
cap.set(10,130)
while True:
success ,img = cap.read()
cv.imshow("Video",img)
if cv.waitKey(1)& 0xFF ==ord('q'):
break
posted @ 2021-02-11 03:06  whatareyougiao  阅读(42)  评论(0)    收藏  举报