I am running a simple python program using OpenCV on a Raspberry Pi 4. The problem is that when taking the first frame it takes up to 1 second, which seems very strange to me. The forms that I used were the following and in both, I had the same result.
camera = cv2.VideoCapture(0)
_, img = camera.read()
The other option is:
camera = cv2.VideoCapture(0, cv2.CAP_V4L2)
_, img = camera.read()
I am using a USB camera.
source https://stackoverflow.com/questions/70535763/capturing-first-frame-takes-up-to-1-second
Comments
Post a Comment