v3.6.1¶
v3.6.1 is a big release. It introduces the imu module (LSM6DS3), a
suite of new sensor getter APIs with IMU-driven auto-rotation, 4-point
perspective rotation_corr(), and brings up the Arduino Portenta H7 with
the HIMAX HM01B0 and OV7690 cameras. Several sensor / image
APIs changed and TensorFlow was dropped on the M7 — read the breaking changes
below.
Highlights¶
imumodule — accelerometer / gyro / temperature / roll / pitch on the LSM6DS3 (OpenMV 4 / Portenta).Sensor getters + auto-rotation —
get_pixformat()/get_framesize()/get_hmirror()/get_vflip()/get_windowing(),set_transpose()/set_auto_rotation(), and IMU-driven snapshot rotation.Perspective correction —
rotation_corr()gainsfovandcorners(4-point) keywords.New hardware — Arduino Portenta H7, HIMAX HM01B0, and OV7690 camera.
Breaking:
set_pixformat()/set_framesize()now returnNone,sensor.set_framerate()was removed, TensorFlow was dropped on the M7, andlens_corr()/linpolar()now require even dimensions — see the breaking changes.
New features¶
imu— a new IMU module:imu.acceleration_mg(),imu.angular_rate_mdps(),imu.temperature_c(),imu.roll(),imu.pitch(), andimu.sleep()(LSM6DS3 on OpenMV 4 / Portenta).Sensor getters — added
sensor.get_pixformat(),get_framesize(),get_hmirror(),get_vflip(),get_windowing(),set_transpose()/get_transpose(), andset_auto_rotation()/get_auto_rotation().Auto-rotation —
sensor.snapshot()uses the IMU to flip / mirror / transpose frames when auto-rotation is enabled.rotation_corr()— addedfovandcorners(4-point perspective) keywords, with perspective-correction examples.lcd.init()— added abgrkeyword argument.collections.deque— enabled in the MicroPython build.Added
sensor.OV7690andsensor.HM01B0id constants and a numpy-likeulabimage-filter example.
Other changes and improvements¶
Significantly optimized the image filters (median / mode / mean / …) and
find_circles()and lens correction;alloc_extra_fbcan now allocate any number of bytes; the person-detection model was rebuilt with a new average-pool op.
Bug fixes¶
Camera and sensors:
Fixed OV2640
sleep()(now uses the COM2 standby register instead of the power-down pin), the FSYNC pin configuration, the HM01B0 HSYNC/VSYNC polarities and I2C address/scanning, the Portenta sensor power-down GPIO and camera reset pin, and disabled auto-rotation when the IMU pitch is near 90°/270°.
Imaging and system:
Fixed an image-filter boundary-check bug, a hardfault when disabling the D-cache, booting on boards without an SD card, a
tf.load()load_to_fbbug, the person-detection stack overflow (H7 stack raised to ≥12 KB), and the USB descriptor offsets for high-speed mode on the OpenMV 4 Plus.
Hardware and board support¶
Arduino Portenta H7 — initial board bring-up (STM32H747 clock/OSC/HSE config, CMSIS headers, ADC, SDRAM, Arduino USB PID).
HIMAX HM01B0 — new monochrome camera driver (Bayer, external-oscillator clock).
OV7690 — new camera driver.
LSM6DS3 IMU — OpenMV 4 / Portenta.
Breaking API changes¶
User-visible API breaks between v3.6.0 and v3.6.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.
sensor.set_framerate() removed (minor)¶
The no-op sensor.set_framerate() stub was removed; calling it now raises
AttributeError. Remove the call and control frame timing via
framesize/exposure instead. (A working set_framerate() is re-introduced in
v4.0.2.)
Commits: 705e98f91
TensorFlow dropped on the OpenMV Cam M7 (minor)¶
TensorFlow (the tf module) was disabled on the OpenMV Cam M7 / OpenMV 3
(it no longer fits). import tf on the M7 fails — use an H7-class camera
for TensorFlow. (tf is re-enabled on the F7 in v3.6.3.)
Commits: 2ae875077
set_pixformat() / set_framesize() return None (behavior)¶
sensor.set_pixformat() and sensor.set_framesize() now return None
instead of True, and an unsupported pixel format now raises a
ValueError instead of an assertion. Code that checked the return value
(e.g. if sensor.set_pixformat(...):) must stop doing so, and code that
caught AssertionError for unsupported formats must catch ValueError.
Commits: f314ac4e7
lens_corr() / linpolar() / logpolar() require even dimensions (behavior)¶
image.lens_corr() and image.linpolar() / image.logpolar() now
require even image width and height and raise an error on odd dimensions.
Crop or resize the image to even dimensions before calling these methods.
Migration checklist¶
For a clean port to v3.6.1 the typical work is:
Remove
sensor.set_framerate()calls (the set_framerate removal).Move TensorFlow workloads off the OpenMV Cam M7 (the M7 TensorFlow change).
Stop relying on the return value of
set_pixformat()/set_framesize()and catchValueErrorfor unsupported pixel formats (the return-value change).Ensure even image dimensions before
lens_corr()/linpolar()/logpolar()(the even-dimension requirement).
All other scripts run unchanged.