In some cases, the running speed will decrease.
My device is openmv4p with 4.3.1 firmware.
In the following code, delete any 'sensor.alloc_ extra_ fb ‘related code, or deleting’ lcd. Init ', can increase the frame rate to 45, otherwise only 28.They should not be related.Is there any bug in memory
import sensor, image, time,lcd
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.B64X64)
clock = time.clock()
lcd.init(width=320,height=240,triple_buffer=True)
icon0=sensor.alloc_extra_fb(100,125,sensor.RGB565)
icon1=sensor.alloc_extra_fb(100,125,sensor.RGB565)
icon2=sensor.alloc_extra_fb(100,125,sensor.RGB565)
icon3=sensor.alloc_extra_fb(100,125,sensor.RGB565)
icon4=sensor.alloc_extra_fb(100,125,sensor.RGB565)
icon5=sensor.alloc_extra_fb(100,125,sensor.RGB565)
extra_fb = sensor.alloc_extra_fb(sensor.width(), sensor.height(), sensor.RGB565)
extra_fb.replace(sensor.snapshot())
while True:
clock.tick()
img = sensor.snapshot()
displacement = extra_fb.find_displacement(img)
extra_fb.replace(img)
print(clock.fps())