OpenMV3 R2 and VGA image capture

We have the OpenMV3 R2 with the OV7725-M7 and I noticed that it is possible to capture grayscale images in VGA resolution but not color images. Is this intentional or a bug? If it’s intentional, what is the reason for this limitation?

Color VGA images are supported, but only in BAYER format (you can save as JPEG). What firmware version do you have ? you should update to the latest.

RGB565 VGA doesn’t fit in RAM. Grayscale does. To allow RGB VGA images we use a Bayer pattern, but, this means getting the RGB565 value per pixel requires interpolation… So, we disabled everything but saving jpegs in that situation.

When I try to save a VGA .jpg in RGB mode I just get 3 byte files that don’t contain any image information. I’m running firmware 2.5.0. The relevant parts of my code:

sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.VGA)
sensor.skip_frames(time = 500)

img=sensor.snapshot()
img.save(filepath,quality=imageCompression)

What is the value of filepath and imageCompression ? Please post the full script.

import sensor,pyb

filepath=“./test.jpg”
imageCompression=100

while(True):

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.VGA)
sensor.skip_frames(time = 500)

img=sensor.snapshot()
img.save(filepath,quality=imageCompression)
print(“image saved”)
pyb.delay(10000)

Is the “.” on the front of the path allowed? I remember MP having issues with that.

Um, anyway, this feature should work. We’ll get you running quickly sir.

Yep, it seems to be working fine with the “.” in front of the file path. (That same code works fine if I replace RG565 with GRAYSCALE).

Thanks for looking into this! :slight_smile:

Right so this feature was broken in r2.5 and I fixed it. It will be available in the next release, you can try the dev firmware images if you like.

How do I install one of the dev images? Is there a guide to manual image installs?

You just need to download the dev firmware image from github and upload it with the IDE:

https://github.com/openmv/openmv/tree/master/firmware/OPENMV3

Use OpenMV IDE to load the firmware.bin file onto the OpenMV Cam. If you brick your device load the OpenMV.dfu file to recover.

Hi again. I did this but now I cannot access UART3 anymore. Is this a known bug/feature for the new firmware? In the IDE I get an error message saying that UART(3) does not exist.

Thats a bug. We upgraded MP to 1.9.2. please post a bug on the GitHub and it will getting fixed.

Hi, I already fixed this as well, just needed to update the firmware images. Please download and flash the firmware again and it will work.

Thanks guys! :slight_smile: