v4.5.3

v4.5.3 is a large release: OV5640 autofocus, anti-aliased line drawing, a mainlined hardware JPEG decoder, big i.MX RT (RT1060) capability gains, and a broad set of camera/ISP fixes. Several rarely-used image methods were removed and some ISP/display APIs changed — read the breaking changes below.

Highlights

  • OV5640 autofocus — enabled on OpenMV 4 / 4 Plus / RT1060 (sensor.ioctl(sensor.IOCTL_TRIGGER_AUTO_FOCUS)), with an example.

  • Anti-aliased draw_line() and a mainlined STM32 hardware JPEG decoder (faster JPEG decompression).

  • OpenMV RT1060 gained ulab, ISP ops, set_framerate() / set_frame_callback(), a much larger frame buffer, and the CAN driver.

  • Breaking: Image.div() / cartoon() / mul() were removed and some ISP/display APIs changed — see the breaking changes.

New features

  • OV5640 autofocus — autofocus firmware is enabled on OPENMV4, OPENMV4P, and OPENMV RT1060; trigger it with sensor.ioctl(sensor.IOCTL_TRIGGER_AUTO_FOCUS). A new 07-Sensor-Control/autofocus.py example was added.

  • Anti-aliased line drawingdraw_line() gained anti-aliasing.

  • Custom SPI display controllersSPIDisplay now accepts a controller= keyword and exposes a bus_write hook for custom init/command sequences.

  • Image.ccm() upgrade — now accepts nested 3x3 / 4x3 / 3x4 / 4x4 matrices and ulab arrays (with an optional per-channel offset row); added a color-correction example.

  • i.MX RT JPEG capturesensor.JPEG capture on Arduino Portenta/Nicla Vision/Giga, plus set_framerate() and set_frame_callback() on the mimxrt port.

  • TFLite model validation — models now carry an operator-order hash and operator-set size.

  • WiFi — added CYW43 security-mode constants; new i.MX RT board-control example scripts (Pin/ADC/CAN/I2C/PWM/SPI/UART/…).

Other changes and improvements

  • MicroPython updated to 1.22; CMSIS updated to 5.9.0.

  • Mainlined STM32 hardware JPEG decoder — faster JPEG decompression on the on-chip codec.

  • Optimized Image.invert() / negate() and binary/math image operations (CMSIS intrinsics).

  • The rpc and vl53l1x libraries were made portable (use machine / time instead of pyb), so they run on non-STM32 ports.

  • DMA-accelerated frame-buffer memcpy on OpenMV H7 / H7 Plus / Pro / Pure Thermal and Arduino Giga / Nicla Vision / Portenta H7; STM32 now scans I2C devices once per scan for faster boot.

Bug fixes

Camera and sensors:

  • Fixed STM32 camera XCLK to a true 50% duty cycle and a bug when the camera clock frequency is set to zero; fixed Bayer crop+transpose, YUV422 color shift, and set_windowing() on the mimxrt port.

  • Fixed the GC2145 chip-ID probe and hmirror/vflip on rotated mounts; fixed PAJ6100 on the RT1062 and a PixArt PAJ7620/PAW3902 SPI buffer overflow.

Image processing:

  • Fixed find_rects() roi clipping, morph() fractional offset truncation, image.gamma() contrast/brightness defaults, get_threshold() A/B offsets on RGB565, and JPEG decoding of dimensions not a multiple of 8.

System and libraries:

  • machine.LED.value() with no argument now returns the LED state instead of clearing it; fixed SPI SSEL deinit on a shared bus, machine.deepsleep() on the RT1062, a TF crash on missing operators, and WINC1500/ninaw10 NIC auto-activation on connect().

Hardware and board support

  • OpenMV RT1060 — ulab and ISP ops enabled, larger frame buffer (10M→20M) / fb_alloc (2M→11M), CAN driver restored, more heap.

  • Arduino GIGA — GC2145 camera support, with GC2145/OV5640 auto-detection (they share an I2C address).

  • i.MX RTsensor.JPEG capture support.

Breaking API changes

User-visible API breaks between v4.5.2 and v4.5.3. Scope: Python C-modules in modules/ and Python libraries in scripts/libraries/.

Each change is tagged with its impact:

  • minor — narrow API; only affects scripts that used it.

  • behavior — same API, different results; re-check tuned scripts.

Changes are grouped by impact in that order. If you just want to port your code, jump to the migration checklist at the end. Each commit hash links to its diff on GitHub.

Removed image methods (minor)

Image.div(), Image.cartoon() (and its example), and Image.mul() were removed.

Commits: 7c932602e, 055a468b8, 4fe7fb63b

Display module API (minor)

The legacy udisplay module-name fallback was removed — the module is registered only as display. The DSI-only dsi_write() / dsi_read() methods were replaced by bus_write() / bus_read(), which are now available on all display controllers.

Commits: 7df6694c3, 7d1f378a0

MQTT and tf.regression API changes (minor)

The mqtt library’s MQTTClient was reworked: port is now required, new ssl_params / callback constructor keywords and a timeout argument on connect() were added, the old ssl= / port=0 defaults were removed, and check_msg() is now non-blocking. tf.regression() was rewritten — its signature is now regression(model, array) and it handles 1D/2D/3D and quantized (int8) models.

Commits: d12874c63, c5ec576c1

ISP / sensor behavior changes (behavior)

Image.awb() was reworked — gray-world (default) vs white-patch (max=True) is now explicit, and the max argument plus Image.gamma()’s gamma / contrast / brightness arguments are now keyword-only (positional calls must be updated). Image transpose is now disabled for YUV422 (it previously produced incorrect output) and the YUV422 color shift was corrected to match Bayer. The STM32 JPEG path now raises an error on a JPEG geometry mismatch instead of producing a corrupt image, and WiFi AP mode now applies a default security mode on the STM32 and i.MX RT ports.

Commits: 36d5cecbd, 00500ccde, c1eeaefd6, 333fb2b5f, 55cab8733, c7d40f6af

Migration checklist

For a clean port to v4.5.3 the typical work is:

  1. Stop using Image.div() / cartoon() / mul() (the removed methods).

  2. Import the display module as display and switch dsi_write/ dsi_read to bus_write/bus_read (the display API change).

  3. Update MQTTClient construction (port is required; ssl_params/callback) and any tf.regression() calls (the library API changes).

  4. Pass awb() max and gamma() gamma/contrast/ brightness as keyword arguments, and re-check YUV422/transpose and AP-mode security assumptions (the ISP/sensor changes).