How to only send self-allocated framebuffer to OpenMV IDE?

Hi,

I met the same problem to this: python - How to only send self-allocated framebuffer to OpenMV IDE? - Stack Overflow

I want to show my own image for debugging purpose. However, it seems OpenMV sends my framebuffer and camera framebuffer alternatively. Currently, I have to use an LCD to show the framebuffer I want, but the LCD is slow and inconvenient.

Is there a way to disable OpenMV sending camera framebuffer? I’ve attached a sample code which flashes framebuffer viewer in IDE

Thanks.

import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)

clock = time.clock()
invImg = sensor.alloc_extra_fb(sensor.width(), sensor.height(), sensor.RGB565)

while(True):
    clock.tick()
    img = sensor.snapshot()
    invImg.replace(img)
    invImg.invert()
    print(invImg.compressed_for_ide(), end="")
    print(clock.fps())

Hi, if you don’t need the snapshot you could just overwrite it :

import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()

while(True):
    clock.tick()        
    img = sensor.snapshot()
    img.invert()
    print(clock.fps())

If you still need it, you could copy the inv image back to img:

while(True):
    clock.tick()        
    img = sensor.snapshot()
    invImg.replace(img)
    invImg.invert()
    img.replace(invImg)
    print(clock.fps())