adding to gitea repo
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
import cv2
|
||||
|
||||
cap = cv2.VideoCapture(2, cv2.CAP_V4L2) # try 0,1 + different backends
|
||||
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
|
||||
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
|
||||
cap.set(cv2.CAP_PROP_FPS, 60)
|
||||
|
||||
while True:
|
||||
ret, frame = cap.read()
|
||||
if ret:
|
||||
cv2.imshow('PS3 Eye Test - Should be 60fps', frame)
|
||||
print("Got frame!")
|
||||
else:
|
||||
print("No frame")
|
||||
|
||||
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||
break
|
||||
|
||||
cap.release()
|
||||
cv2.destroyAllWindows()
|
||||
Reference in New Issue
Block a user