I ran a code which seems to have increased my frame rates from about 25fps to about 60fps, but I am not sure if I am getting true 60FPS. I feel I may be getting 60fps per second, but many of those frames are possible repeats? I am using an Elgato Video Capture device which uses USB and composite video on Windows 10.
from imutils.video import WebcamVideoStream
import imutils
import cv2
import time
# normalFPS = cv2.VideoCapture(0)
# This replaces cv2.VideoCapture(0)
fastFPS = WebcamVideoStream(src=0).start()
while True:
timea = time.time()
# _, normalFrame = normalFPS.read()
# This replaces ret, frame = cap.read()
fastFrame = fastFPS.read()
# cv2.imshow('normalFrame', normalFrame)
cv2.imshow('fastFrame', fastFrame)
key = cv2.waitKey(1) & 0xFF
timeb = time.time()
Latency = (timeb - timea)
print("Latency: ", Latency * 1000, "ms")
print("FPS: ", 1 / Latency)
if cv2.waitKey(25) & 0xFF == ord('q'):
break
# fastFPS.release()
cv2.destroyAllWindows()
fastFPS.stop()