disable some logs
This commit is contained in:
15
cv.py
Normal file
15
cv.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import cv2
|
||||
import time
|
||||
cap = cv2.VideoCapture(2) # 0表示第一个摄像头
|
||||
start=time.time()
|
||||
while True:
|
||||
ret, frame = cap.read()
|
||||
if not ret: break
|
||||
end=time.time()
|
||||
diff=end-start
|
||||
print('cap img',1/diff)
|
||||
start=end
|
||||
###cv2.imshow('USB Camera', frame)
|
||||
if cv2.waitKey(1) == 27: break # 按ESC退出
|
||||
cap.release()
|
||||
cv2.destroyAllWindows()
|
||||
Reference in New Issue
Block a user