feat: 增加扫黑除暴假动作
This commit is contained in:
17
test/test_ocr_camera.py
Normal file
17
test/test_ocr_camera.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import cv2
|
||||
import time
|
||||
|
||||
cap = cv2.VideoCapture(20)
|
||||
cap.set(cv2.CAP_PROP_AUTOFOCUS, 0)
|
||||
cap.set(cv2.CAP_PROP_FOCUS, 280)
|
||||
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
|
||||
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
|
||||
|
||||
|
||||
while True:
|
||||
ret, frame = cap.read()
|
||||
if ret:
|
||||
cv2.imshow('src', frame)
|
||||
time.sleep(0.2)
|
||||
if cv2.waitKey(25) & 0xFF == ord('q'):
|
||||
break
|
||||
Reference in New Issue
Block a user