v3.0.0

v3.0.0 is the major v2 → v3 release. It introduces the OpenMV Cam M7 (STM32F7) and the new nn CMSIS-NN neural-network module (replacing the old hard-coded find_number() / classify_object() methods), adds MT9V034 global-shutter and FLIR Lepton sensor support, the sensor.WVGA framesizes, and updates the core to MicroPython 1.9.4. Several image / sensor / WiFi behaviors changed — read the breaking changes below.

Highlights

  • OpenMV Cam M7 — new STM32F7 board.

  • nn module — CMSIS-NN inference: nn.load(), Net.forward(), Net.search(), with a model converter and examples.

  • New sensors — MT9V034 global-shutter (FSIN-triggered) and FLIR Lepton.

  • MicroPython 1.9.4 core update.

  • Breaking: the hard-coded image.find_number() / image.classify_object() were removed, sensor.sleep() now raises, WINC sockets return real byte counts, image.binary() returns a new image, and find_apriltags() is capped at 64K pixels — see the breaking changes.

New features

  • nn — a new CMSIS-NN neural-network module: nn.load(path), Net.forward(img, roi=, softmax=, dry_run=) (returns 0.0–1.0 floats), Net.search() for multi-scale/position detection, and Net.test(), plus a CMSIS-NN model converter (nn_convert.py / nn_quantizer.py), bundled CIFAR-10 / LeNet / smile models, and NN / NN-search example scripts.

  • Sensors — MT9V034 global-shutter support (FSIN-triggered snapshot) on the OpenMV 4, an updated FLIR Lepton driver with Lepton snapshot, and the new sensor.WVGA (720x480) / sensor.WVGA2 (752x480) framesizes.

  • Imagingimage.find_circles() gained r_min / r_max / r_step keywords (faster Hough), find_keypoints() and the Haar find_features() now accept RGB images, and image.compress() / JPEG encoding now supports binary (bitmap) images.

  • Bootboot.py now runs before USB init so it can override the USB mode (e.g. HID).

  • Examples — added small/high-res AprilTag examples, an I2C LIDAR-Lite V3 example, and dataset tooling (augment_images.py / make_patches.py).

Other changes and improvements

  • Updated the bundled MicroPython to 1.9.4 (with a pyexec parse/compile/exec revert and PendSV fix); clearer fb_alloc / xalloc out-of-memory error messages; suppressed nn printf noise during network loading; reorganized the repository (examples → scripts/, tools → tools/, Haar cascades → ml/). The nn module is unavailable on the OpenMV 2 (insufficient flash).

Bug fixes

Imaging:

  • Fixed fast_atan2f for x≤0 (previously always 0 — re-check blob / line / keypoint angles), find_apriltags() memory handling (dropped contents and a bad realloc on OOM), binary/bitmap per-bpp row pointers (corrupt binary results), find_edges(EDGE_CANNY) with an ROI, the TO_GS_PIXEL macro (integral / morph), bitmap/JPEG streaming for grayscale (bpp==0) frames, the keypoint/blob list pop_front, and match_descriptor results.

System and camera:

  • Fixed the USB HID interface/endpoint numbers, dynamically changing the XCLK frequency at runtime, Net.forward() returning the correct number of outputs, and a hardfault when interrupting script parsing.

Hardware and board support

  • OpenMV Cam M7 (STM32F7) — new board.

  • MT9V034 global-shutter sensor (OpenMV 4, FSIN-triggered).

  • FLIR Lepton — updated driver with snapshot support.

Breaking API changes

User-visible API breaks between v2.9.0 and v3.0.0. Scope: Python C-modules in modules/ and Python libraries in scripts/libraries/.

Each change is tagged with its impact:

  • major — affects most scripts that used the feature; you will need to port code.

  • 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.find_number() / image.classify_object() removed (major)

The hard-coded image.find_number() (LeNet) and image.classify_object() (CMSIS CNN) methods were removed in favor of the new nn module. Replace them with net = nn.load('/model.network'); out = net.forward(img).

Commits: d151f7e38

sensor.sleep() / sensor.reset() raise on failure (minor)

sensor.sleep() and sensor.reset() now raise an exception on failure instead of returning True / False. Code that checked the boolean return of sensor.sleep() must wrap the call in try / except instead.

Commits: 7d16d008f

WINC sockets return the real byte count (behavior)

The WINC1500 socket send / recv / sendto / recvfrom methods previously always returned 0; they now return the actual number of bytes transferred. Code that assumed a 0 return (or looped/blocked on it) must handle the real counts.

Commits: a07fb2f60

image.binary() returns a new image (behavior)

image.binary() gained to_bitmap / copy keywords and now returns a new image object instead of returning/mutating the source image in place. Code that relied on binary() mutating the original image should use the returned object (and pass copy=True for non-in-place behavior).

Commits: 8a44f0cd9

find_apriltags() capped at 64K pixels (behavior)

image.find_apriltags() now raises if the image (or ROI) exceeds 64K pixels and returns an empty list for images smaller than 4x4. Downscale large images (use a smaller framesize or pass an explicit roi) before calling find_apriltags().

Commits: bd77afbc0

Migration checklist

For a clean port to v3.0.0 the typical work is:

  1. Replace image.find_number() / image.classify_object() with the nn module (the nn migration).

  2. Wrap sensor.sleep() / sensor.reset() in try / except instead of checking a boolean return (the sensor.sleep change).

  3. Handle real byte counts from WINC socket send / recv (the WINC socket change).

  4. Use the image returned by image.binary() instead of expecting in-place mutation (the binary change).

  5. Downscale images before find_apriltags() to stay under 64K pixels (the find_apriltags cap).

All other scripts run unchanged.