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 new07-Sensor-Control/autofocus.pyexample was added.Anti-aliased line drawing —
draw_line()gained anti-aliasing.Custom SPI display controllers —
SPIDisplaynow accepts acontroller=keyword and exposes abus_writehook 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 capture —
sensor.JPEGcapture on Arduino Portenta/Nicla Vision/Giga, plusset_framerate()andset_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
rpcandvl53l1xlibraries were made portable (usemachine/timeinstead ofpyb), 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 onconnect().
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 RT —
sensor.JPEGcapture 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.
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.
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.
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:
Stop using
Image.div()/cartoon()/mul()(the removed methods).Import the display module as
displayand switchdsi_write/dsi_readtobus_write/bus_read(the display API change).Update
MQTTClientconstruction (portis required;ssl_params/callback) and anytf.regression()calls (the library API changes).Pass
awb()maxandgamma()gamma/contrast/brightnessas keyword arguments, and re-check YUV422/transpose and AP-mode security assumptions (the ISP/sensor changes).