Editing Firmware to Only Capture Pixels in a Subwindow for Faster FPS

I would like to take a small subwindow of a frame using the OpenMV at the highest possible speed. For example, I would like to have the sensor set at VGA and capture the region defined by ROI = (0,0,8,8), or the top left 8x8 pixels.

I could do this with sensor.subwindowing, however, this function takes the entire VGA frame then crops the 8x8 pixels. This means that capturing a 8x8 subwindow takes the exact same time as the whole VGA frame. The FPS would be much higher if the camera only captures the 8x8 pixels instead of capturing the whole frame. Sensor.ioctl also does not just capture the 8x8 subwindow.

I’m trying to edit the firmware to enable this function. I’d like to edit the snapshot function in sensor.c so that it captures a subwindow and only that subwindow. What is the best way of doing this?

The OV5640 has support for this. See the sensor.ioctl SET_READOUT_WINDOW.

This can also be implemented on other cameras we support… I just haven’t done it.