Global Shutter Camera Module with higher fps for small ROI


I’m playing with the Global Shutter Camera Module + OpenMV Cam H7. I’d like to have a higher fps, more than 200 fps, with maintaining the spatial resolution. I tried the example code in github: openmv/scripts/examples/28-Global-Shutter/ with sensor.VGA, sensor.QVGA, and sensor.QQVGA options. I was able to get a high fps with QQQVGA but the spatial resolution is degraded. The fields of view are the same between VGA and QQVGA. So, I guess that the QQVGA mode is realized by pixel binning. However, I’d like to avoid the pixel binning, since this results in the spatial resolution reduction. I’d prefer to do windowing or setting ROI. So, I tested the windowing by using the function sensor.set_windowing() with VGA framesize. However, the frame rate is low, the same fps as the VGA without windowing.

Is there a way to achieve higher fps with original spatial resolution? Any suggestions?

Hi, yes, but our driver doesn’t support it. You have to manually do register writes to the camera for this. You can do this all through the Python API but you need to read the sensor data sheet to achieve what you want.

Please go the product page and see the sensor data sheet. Then find the mt9v034.c file in our code repo. Under the set frame size method you can see how we set the image read out size and turn pixel binning on as you lower the resolution.

So, you just need to run the set frame size code that you’d execute like normal and then after do a series of register writes to move the ROI of the camera readout to what you want to look at. This will give you a very high fps without any binning.

If you get this working please share the code and we my and an example to the IDE for this.

Thank you very much. I’ll try it!

I’ve managed to implement higher fps operation.
Thanks a lot.

Until recently it may seems to work properly (Still I was improving the code to get much higher fps though)
However, after updating my IDE (from 2.4 to 2.6) and firmware (to 3.6.7. I forgot the prior version number ), my code is not working properly.
Previously, if I change the image readout size and call sensor.snapshot() I got only one image. (There seemed to be the minimum read out size). Now, sensor.snapshot() results in the multiple images with the defined size. For example, if I set the image read out size as w160 * h120, then I’ll get 16 images with only one call of the sensor.snapshot(). As a result, the fps is low because the sensor takes multiple images per call. Is it a intended behavior? How can I fix it?

Hi, I’m not sure what’s happening. We actually improved the sensor driver to make the FPS readout faster. Like, without any modifications to the sensor driver the readout should be fast. So, maybe disable your custom sensor changes.

Thank you for reply.

I followed your advice.
I’m using the global shutter camera module. And the default frame rate is ~ 60hz. I checked it now.
I found the new functionality, sensor.IOCTL_SET_READOUT_WINDOW to get much higher fps. But, I think it is only for OV5640, is it right?
Is there a way to boost up the fps of the global shutter model?

The global shutter sensors set_frame size method automatically reduces the readout window size as you make the resolution lower. So, just set a resolution of QQVGA or QQQVGA.

Thank you. I just want to make clear my situation, here.
Previously, the QQVGA setting resulted in the pixel binning, which I’d like to avoid.
That’s why I posted the original question in this thread. So, following your advice, I made a custom code to reduce the field of view without binning to get higher fps.
In the code, I used sensor.__write_reg() method to change the field of view.
But, after the update, my custom code is not working properly. I can get the image of the narrowed field of view still. However, snapshot() method results in multiple images filling the 680*480.
So, the question is how to get higher fps without pixel binning in the global shutter model?

Your suggestion is

  1. set_frame size method to change the readout window size
  2. call ensor.__write_reg() method to change the field of view
    is my understanding correct?

Hmm, so, the camera driver was definitely changed. Did you set the resolution to QQVGA and then modify the register settings of the camera afterwards? The new sensor driver code will keep grabbing pixels until it receives the expected frame size.


I always use VGA setting.
I will try to use QQQVGA setting. However, currently i downgraded the firmware and started to reuse my old code. After a while, I’ll re-upgrade the firmware, follow your advice, and post the result here.


I’m facing the same issue with need for resolution without binning and high FPS and a lesser FOV (cropping), using Global shutter and H7 Plus . Where you able to solve this and run with the current latest firmware ? I will highly appreciate if you could share your findings working with the mt9v034 !

Thanks a lot!

  • Althaf

Hi, it’s on the todo list. I just have to implement the same functionality I did for the OV5640 for the MT9V034.