-
Notifications
You must be signed in to change notification settings - Fork 931
Closed
Description
Dear author,
I used the opencv-python 4.7.0.72 in the raspberry 3b+.But the cap.read() function has a long time in each frame when I want to read the CSI camera in 1080p,30fps.
It takes about 0.1s-0.2s in the frame.
the code is:
cap=cv2.VideoCapture(0)
cap.set(3, 1920)
cap.set(4, 1080)
cap.set(5, 30)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*"MJPG"))
time.sleep(2)
while (cap.isOpened()):
start=time.time()
ret, frame = cap.read()
end=time.time()
print(end-start)
Is my code has some wrong?
please tell me how can fix it.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels