Taking a subwindow instead of the full frame should result in higher FPS since the camera isn’t capturing the whole image. However, the OpenMV H7 Plus is not able to achieve higher FPS by setting a smaller region of interest.
import sensor, image, utime, omv
omv.disable_fb(True)
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.HD)
ROI1 = (0,0,200,200)
ROI2 = (0,0,600,600)
ROI3 = (0,0,1200,600)
sensor.set_windowing(ROI1)
#sensor.ioctl(sensor.IOCTL_SET_READOUT_WINDOW, ROI1)
sensor.skip_frames(time = 2000)
while(True):
Stime = utime.ticks_ms()/1000
img = sensor.snapshot()
Etime = utime.ticks_ms()/1000
print("FPS", 1/(Etime-Stime), Etime-Stime)
I’ve tried three different region of interests using two different methods, sensor.set_windowing and sensor.ioctl. The results are summarized below.
___________________________Using Set_windowing___Using Ioctl
ROI1 = (0,0,200,200)_____________28.6 FPS__________37.7 FPS
ROI2 = (0,0,600,600)__28.6 FPS__________37.7 FPS
ROI3 = (0,0,1200,600) 28.6 FPS__________37.7 FPS
Full frame/No ROI________________28.6 FPS__________28.6 FPS
Clearly, reducing the ROI isn’t doing anything. The FPS stays the same regardless of the size of the frame being portioned. Just calling sensor.ioctl is increasing the FPS, but the FPS for all the ROIs are still the same.