Sensor snapshot takes 0.02s, can't achieve >50 FPS

General discussion about topics related to OpenMV.
Posts: 26
Joined: Fri Nov 06, 2020 4:31 pm

Sensor snapshot takes 0.02s, can't achieve >50 FPS

Postby Jhc999 » Mon Nov 09, 2020 10:22 pm

This blog post suggests a default FPS of 75-150 FPS ( I've edited the helloworld code to time the sensor snapshot. The frame buffer on the IDE was disabled, and I have the latest firmware on my OpenMV H7 Plus (version 3.6.8).

Code: Select all

import sensor, image, time, utime

sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.

    start = (utime.ticks_ms())/1000
    img = sensor.snapshot()         # Take a picture and return the image.
    end = (utime.ticks_ms())/1000
    print("TIME", end-start)
The printed time varies between 0.20s- 0.21s. It's taking 0.2s to snap a single frame, so the maximum possible FPS is 50FPS. How do I achieve the default FPS in the blog post?
User avatar
Posts: 4851
Joined: Sun May 24, 2015 2:10 pm

Re: Sensor snapshot takes 0.02s, can't achieve >50 FPS

Postby kwagyeman » Tue Nov 10, 2020 10:50 am

The camera frame rate is variable depending on the lighting. Please improve your lighting.

That said, we don't actually have triple buffering support yet. So, the max frame rate doesn't hold once you start processing. We will be updating the camera driver to support triple buffering in a few months.

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest