版本暂存
This commit is contained in:
14
test/test_capture.py
Normal file
14
test/test_capture.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import cv2
|
||||
|
||||
|
||||
cap = cv2.VideoCapture(20)
|
||||
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter.fourcc('M','J','P','G'))
|
||||
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 960)
|
||||
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 540)
|
||||
|
||||
while True:
|
||||
ret, frame = cap.read()
|
||||
if ret:
|
||||
cv2.imshow("frame",frame)
|
||||
cv2.waitKey(1)
|
||||
cv2.destroyAllWindows()
|
||||
Reference in New Issue
Block a user