v4.5.1¶
v4.5.1 adds image orientation/aspect drawing hints, loading images directly
from a file path, a GC2145 wide field-of-view ioctl, and a new backlight
controller API. It also reworks the Image() constructor, display
APIs, and module argument parsing — read the breaking changes below.
Highlights¶
Drawing hints —
draw_image()gained orientation (HMIRROR/VFLIP/TRANSPOSE,ROTATE_90/180/270) and aspect-scaling (SCALE_ASPECT_KEEP/EXPAND/IGNORE) hints.Load images from disk —
draw_image()/display.write()accept a file-path string.Backlight control — new
DACBacklight/PWMBacklightclasses and a displaybacklight=argument.Breaking: the
Image()constructor,displayAPIs, and module argument parsing changed — see the breaking changes.
New features¶
draw_image()orientation hints —image.HMIRROR,image.VFLIP,image.TRANSPOSE, plus convenienceimage.ROTATE_90/ROTATE_180/ROTATE_270.draw_image()aspect hints —image.SCALE_ASPECT_KEEP/SCALE_ASPECT_EXPAND/SCALE_ASPECT_IGNOREfor fit / expand / stretch.Palette constants —
image.PALETTE_RAINBOWandimage.PALETTE_IRONBOW(moved into the image module).Wide field of view — new
sensor.IOCTL_SET_FOV_WIDE/IOCTL_GET_FOV_WIDEioctls (on the GC2145, up to 5x sensor scaling).Load from disk —
draw_image()anddisplay.write()accept a source-image file-path string, loading it from storage directly.Backlight controllers — new
DACBacklightandPWMBacklightclasses (importable fromdisplay), and a keyword-onlybacklight=argument on the SPI/parallel display constructors.
Other changes and improvements¶
The ST7701 DSI display driver moved into its own
st7701.pymodule (still importable viafrom display import *) and is frozen on Arduino Giga; thelsm9ds1IMU driver was frozen on the Arduino Nano 33 BLE Sense.MT9V022 / MT9V034 (global-shutter) cameras now apply row-noise correction for better image quality.
The i.MX RT USB mass-storage volume is now labelled as an OpenMV disk.
Bug fixes¶
Camera and sensors:
Fixed corner detection (
find_keypoints()FAST/AGAST) on images taller than 480 rows — the per-row buffer is now sized to the image height.Added FSYNC-pin support for frame-synchronized
snapshot()on i.MX RT (OpenMV RT1060), and fixed swapped SPI4 MOSI/MISO pins on the RT1060.
Display and video:
Corrected the
SPIDisplayconstructor argument order (bgr,byte_swap,triple_bufferwere applied to the wrong parameters).Fixed TV-shield image corruption when drawing an image with a specified rectangle, and incorrect MJPEG frame bounds when recording scaled frames.
Networking:
WINC WiFi AP mode no longer enforces the obsolete WEP-only restriction — open and WPA AP modes work with proper PSK handling.
Hardware and board support¶
OpenMV RT1060 — FSYNC pin and corrected SPI4 pins.
Arduino GIGA — QSPI reliability workaround; ST7701 display frozen in.
Arduino Nano 33 BLE Sense —
lsm9ds1IMU driver frozen in.
Breaking API changes¶
User-visible API breaks between v4.5.0 and v4.5.1. 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.
Image() constructor and display APIs (minor)¶
The image.Image constructor was reworked to keyword arguments
(height, pixformat, buffer=, copy_to_fb=); it can now build an
image from an existing bytearray/buffer, and a buffer is required for
compressed formats. display.write() was reworked: x_scale/y_scale
now take a float (scale ratio) or int (target size in pixels) and the separate
x_size/y_size keywords were removed. The WINC.connect() first
positional argument was renamed essid → ssid, and WINC WiFi scan
results changed to (ssid_bytes, bssid_bytes, channel, rssi, security, N)
(SSID/BSSID are now bytes; BSSID is no longer a formatted MAC string).
Backlight range, scaling, and keyword-only arguments (behavior)¶
Display.backlight() now takes a 0–100 intensity (0 = off, 100 = full)
instead of 0–255, raising ValueError out of range. Integer
x_scale/y_scale values are now treated as a multiplicative scale
factor (the same as floats) rather than a target pixel dimension — this
affects fir.snapshot()/draw_ir(), tof.snapshot()/
draw_depth(), display, and tv scaling. Argument parsing across the
sensor, fir, tof, tv, mjpeg, gif, imageio,
tf, and audio modules was unified, making several previously-positional
options keyword-only (names, defaults, and behavior are otherwise unchanged).
Commits: 391ec443f, 8bd25d6cd, 477312656, 08bf62a32, a4c0f20bf, 9b411a66d, 3d679f5a6, d15fc6b8d, 555e67ecd
Migration checklist¶
For a clean port to v4.5.1 the typical work is:
Update
Image()construction to the new keyword form, switchdisplay.write()offx_size/y_size, and renameWINC.connect()essid→ssid(handle the new bytes-based scan tuples) (the constructor/display/WINC changes).Rescale
Display.backlight()calls to 0–100, re-check any integerx_scale/y_scaleusage, and pass formerly-positional module options as keywords (the behavior changes).