Nicla vision & sensor.JPEG


I want to acquire a full resolution image. but, due to lack of RAM, I can’t. and I didn’t find any way to get a binning image. HW JPEG compression can be a solution.

STM32H747 of nicla vision support HW JPEG encoding on DMCI interface (file:///home/skumy/Downloads/an5020-digital-camera-interface-dcmi-on-stm32-mcus-stmicroelectronics.pdf)
Any way to enable this feature on OpenMV ?


Hi, the camera sensor doesn’t support that. That feature is only for the OV5640 which can output a JPEG image. The Galaxy Core sensor doesn’t support that.

Given the RAM limits and lack of JPEG support output from the camera module on the Nicla there is no way to actually capture the maximum resolution from the camera.

That said, if you want a larger FoV we added a flag you can set to make that happen: sensor — camera sensor — MicroPython 1.20 documentation (

Just turn that on before calling snapshot via sensor.ioctl(sensor.IOCTL_SET_FOV_WIDE, True). You’ll get a frame rate drop but the FoV will increase by a very large amount.

Great !
yes it’s for FoV

I try this with last firmware (4.5.2) and basic sample but no change in IDE

import sensor
import time

sensor.reset()  # Reset and initialize the sensor.

sensor.set_pixformat(sensor.RGB565)  # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.VGA)  # Set frame size to QVGA (320x240)
sensor.skip_frames(time=2000)  # Wait for settings take effect.
clock = time.clock()  # Create a clock object to track the FPS.

while True:
    clock.tick()  # Update the FPS clock.
    sensor.ioctl(sensor.IOCTL_SET_FOV_WIDE, True)    
    img = sensor.snapshot()  # Take a picture and return the image.
    print(clock.fps())  # Note: OpenMV Cam runs about half as fast when connected
    # to the IDE. The FPS should increase once disconnected.

any idea ?

Not work for VGA
only less resolution (QVGA, HVGA)

Bug or limitation ?


VGA has a maximum FoV. But, you can’t really store a VGA sized image in RAM with RGB565. Our driver will try to switch to BAYER for that resolution but the Galaxy Core camera doesn’t like to output BAYER images except at particular resolutions.

OK for VGA output in RGB565

Sorry but no for FoV.
FoV in QVGA & IOCTL_SET_FOV_WIDE is better (realy better) than VGA

It’s very strange. Great Fov to Less Fov :

I just test with IDE

I think I don’t understand something…

Here’s the logic. It does it’s best: openmv/src/omv/sensors/gc2145.c at master · openmv/openmv (

It’s likely because VGA is an even division ratio and the camera outputs corrupted BAYER images if you use an even division ratio so we don’t allow that.

E.g. remove this and you can use any scale: openmv/src/omv/sensors/gc2145.c at master · openmv/openmv (

But, then sensor.BAYER images will be corrupted. Note that we cannot store VGA RGB565 given the RAM available so the sensor driver is silently changing the image format to sensor.BAYER.

OK thanks,
I will try with firmware modification but it’s longer than in script :slight_smile: