FPS limitation on H7 plus

I don’t understand where is the bottleneck to the FPS on my new H7plus
Whatever I try (simple examples, down to QQQVGA), I’m ceiling to about 46.6 FPS on my new H7 plus with frame buffer disabled.
If I enable frame buffer, I got ~23.5 (half the speed) and if I do few blob detections it goes down to ~12 (quarter of the speed).
I got always those kind of FPS, no other ones.

import sensor, image, time

sensor.skip_frames(time = 2000)

clock = time.clock()

    img = sensor.snapshot()

It’s because of how frames are generated by the camera. The camera generates frames at about 50 FPS. If you miss a frame then you get 25 FPS, if you miss two frames then 12.5 FPS.

If you want it to be better than this you have to increase the frame rate. Use the SET_READOUT_WINDOW ioctl to reduce the field of view of the OV5640. This will result in a massive bump in frame rate. But, it will crop the image. By default, our firmware tries to give you the best field of view at expense of the frame rate.

If I understand you, it is the OV5640 that produces quite low FPS even if I set the sensor to QQQVGA. I would have better FPS with the OV7725 (H7) or with the MT9V034 (global shutter). There is nothing I can do with the OV5640 except by drastically cropping the image (SET_READOUT_WINDOW ioctl).

And cropping is something I wouldn’t like to do. For now, I would like to keep maximum of light from the sensor and then keep almost all the field of view.

Yeah, this is the tradeoff with large resolution sensors. The pixels are so small that each pixel covers less area and thus less FoV than lower res sensors.

So… oddly, a newer higher resolution sensor is not 100% better than older sensors.

Things that can improve this are pixel binning in the sensor hardware. We do enable that on the OV5640. But, it’s only in hardware for 2x vertical/horizontal binning. I haven’t seen any manufacturer that offers 4x/8x/16x pixel binning in the horizontal and vertical direction at the same time. This would then close the speed gap.

Thank you. I make some tests with the global shutter now.
I thought that when setting the framesize, the camera done some kind of binning (couldn’t remember the term) systematically. I didn’t know that binning has build-in limitations in cameras. And I had in mind that latest camera could have better sensitivity although I didn’t make any comparison.