I’m using a Logitech C930e to do some aruco detection and pose estimation. But I dont understand why I cant render the camera feed for any higher resolution than 640x480 without the framerate dropping to the floor and making the feed completely useless. The camera is behaving super smooth at 1920x1080 when using Logitech’s software, but not when OpenCV is ‘controlling’ the camera? I really dont understand why that is.
I even tried removing all computations and just render the feed like this:
def vid():
cap = cv.VideoCapture(0)
cap.set(cv.CAP_PROP_FRAME_WIDTH, 1280)
cap.set(cv.CAP_PROP_FRAME_HEIGHT, 720)
if not cap.isOpened():
print("Cannot open camera")
exit()
while True:
# Capture frame-by-frame
ret, frame = cap.read()
# if frame is read correctly ret is True
if not ret:
print("Can't receive frame (stream end?). Exiting ...")
break
cv.imshow('frame', frame)
if cv.waitKey(1) == ord('q'):
break
# When everything done, release the capture
cap.release()
cv.destroyAllWindows()
As barebones as it can be? And still the feed is super laggy and impossible to use.