Reputation: 11
I am using a SOM that is running a cortex A5 @500MHz and am trying to maximise the frame rate received from a USB camera. My camera supports video capture with YUYV and MJPEG.
Other posts suggested forcing opencv to read MJPEG frames from the camera, however this slowed down the frame rate.
I can currently get about 18 fps reading YUYV format and about 10 fps reading MJPEG's at 640x480. Currently I am just grabbing frames and am not doing any other processing. I am getting the CAP_PROP_FOURCC format each loop to ensure that opencv is setting the capture format correctly.
I am currently running opencv 4 and python3.5
Any ideas why this may be happening?
EDIT: Capture code:
# Repeatedly capture current image
while True:
ret, image = cap.read()
if image is None:
time.sleep(0.5)
continue
codec = cap.get(cv2.CAP_PROP_FOURCC)
print(codec)
# Print the framerate.
text = '{:.2f}, {:.2f}, {:.2f} fps'.format(*fps.tick())
print(text)
Upvotes: 1
Views: 4103
Reputation: 4450
Please provide the exact SOM and the camera that you are using.
There are many factors, for example the format of the images captured by the camera, how they are transferred and how they are received and managed by the SOM.
Transferring them shouldn't be the problem in terms of bandwidth.
I am assuming that the settings in opencv only apply to the SOM and won't change the format of the camera capture and therefore the SOM has more processing to do, hence the frame rate drops.
[EDIT] I cannot comment yet so I hope you read this ... your camera link is dead :/
Upvotes: 0