|
| 1 | +.. _changelog_v4_8_0: |
| 2 | + |
| 3 | +v4.8.0 |
| 4 | +====== |
| 5 | + |
| 6 | +v4.8.0 is a major feature release. Headlining it: a brand-new class-based |
| 7 | +:mod:`csi` camera module with multi-camera support, the **OpenMV N6** |
| 8 | +(STM32N6) board with a Neural-ART NPU, an NPU inference backend, GenX320 |
| 9 | +event-camera RAW event mode, a new :mod:`crc` module, a reorganized ML |
| 10 | +post-processing library, and MicroPython 1.26. It also removes a few legacy |
| 11 | +APIs — the ``buzzer`` module and the :mod:`fir` module's FLIR Lepton control — so |
| 12 | +read the breaking changes below. |
| 13 | + |
| 14 | +.. contents:: On this page |
| 15 | + :local: |
| 16 | + :depth: 1 |
| 17 | + |
| 18 | +Highlights |
| 19 | +---------- |
| 20 | + |
| 21 | +- **New** :mod:`csi` **camera module.** A class-based :class:`csi.CSI` API with |
| 22 | + support for multiple simultaneous cameras, introduced alongside the legacy |
| 23 | + ``sensor`` module. |
| 24 | +- **OpenMV N6.** The STM32N6 board, with a Neural-ART NPU, triple buffering, |
| 25 | + Soft-CSI, and a ToF module. |
| 26 | +- **NPU inference.** A ST Neural-ART (STAI) backend for hardware-accelerated |
| 27 | + model inference. |
| 28 | +- **GenX320 event mode.** RAW event output plus |
| 29 | + :meth:`~image.Image.draw_event_histogram` for event-camera rendering. |
| 30 | +- **Reorganized ML post-processing** — vendor subpackages |
| 31 | + (:mod:`ml.postprocessing.ultralytics`, :mod:`~ml.postprocessing.mediapipe`, |
| 32 | + :mod:`~ml.postprocessing.edgeimpulse`, :mod:`~ml.postprocessing.darknet`) |
| 33 | + with new BlazeFace / BlazePalm / hand- and face-landmark detectors. |
| 34 | +- **New** :mod:`crc` **module** — hardware-accelerated CRC-16 / CRC-32. |
| 35 | +- **MicroPython updated to 1.26.0.** |
| 36 | +- **Breaking:** the ``buzzer`` module and the ``fir`` module's Lepton control |
| 37 | + were removed (the Lepton is now a regular camera). See |
| 38 | + :ref:`the fir/Lepton change <v4_8_0_fir>` and |
| 39 | + :ref:`the buzzer removal <v4_8_0_buzzer>`. |
| 40 | + |
| 41 | +New features |
| 42 | +------------ |
| 43 | + |
| 44 | +- **The new** :mod:`csi` **camera module** — a class-based :class:`csi.CSI` |
| 45 | + object with multiple simultaneous cameras (up to three on the N6), |
| 46 | + non-blocking snapshot, custom ``(w, h)`` frame sizes, and an informative |
| 47 | + ``print()`` / repr. It is introduced alongside the legacy ``sensor`` module |
| 48 | + (not a drop-in replacement). |
| 49 | +- :mod:`crc` — :func:`crc.crc16` and :func:`crc.crc32`, hardware-accelerated |
| 50 | + with a software fallback, on the OpenMV N6 and AE3. |
| 51 | +- :meth:`image.Image.draw_image` gained a ``transform=`` keyword (a 2-D float |
| 52 | + ``ndarray`` matrix for affine/perspective warps, GPU-accelerated on STM32 and |
| 53 | + Alif); the same transform is available in image conversion. |
| 54 | +- :meth:`~image.Image.draw_event_histogram` — render event-camera histograms. |
| 55 | +- **GenX320 RAW event mode** — :data:`csi.IOCTL_GENX320_SET_MODE` with |
| 56 | + :data:`csi.GENX320_MODE_HISTO` / :data:`csi.GENX320_MODE_EVENT`, |
| 57 | + :data:`csi.IOCTL_GENX320_READ_EVENTS`, :data:`csi.IOCTL_GENX320_CALIBRATE`, |
| 58 | + event-type constants, and new example scripts. |
| 59 | +- **ML** — a ST Neural-ART (STAI) NPU inference backend; :class:`ml.Model` |
| 60 | + gained a ``postprocess=`` keyword (the post-processor now runs automatically |
| 61 | + inside ``predict()`` even without a callback); :mod:`ml.postprocessing` was |
| 62 | + reorganized into vendor subpackages — |
| 63 | + :mod:`ml.postprocessing.ultralytics` (``YoloV5``, ``YoloV8``), |
| 64 | + :mod:`ml.postprocessing.darknet` (``YoloV2``, ``YoloLC``), |
| 65 | + :mod:`ml.postprocessing.edgeimpulse` (``Fomo``), and |
| 66 | + :mod:`ml.postprocessing.mediapipe` (``BlazeFace``, ``BlazePalm``, |
| 67 | + ``HandLandmarks``, ``FaceLandmarks``) — the old snake_case names remain as |
| 68 | + aliases; :func:`ml.utils.draw_keypoints` and :func:`ml.utils.draw_skeleton` |
| 69 | + were added; bundled ROMFS models grew (BlazeFace, YOLO-LC, YOLOv8n, |
| 70 | + palm/hand/face landmarks). |
| 71 | +- :mod:`audio` — MDF digital-microphone input on the STM32N6. |
| 72 | +- **Display** — an SSD1351 OLED driver and example; ``SPIDisplay`` controllers |
| 73 | + can override their init commands; the SPI display constructor gained |
| 74 | + ``hmirror`` / ``vflip`` keywords. |
| 75 | +- **On-device profiler** — SysTick + Armv8.1-M PMU cycle/event counters with |
| 76 | + function-level instrumentation, readable over the debug link |
| 77 | + (``pyopenmv`` gained profiling and ELF-symbol support). |
| 78 | +- **New sensor support** — PixArt PS5520; FLIR BOSON on the OpenMV H7 Plus; |
| 79 | + GenX320 auto-detect. |
| 80 | + |
| 81 | +Other changes and improvements |
| 82 | +------------------------------ |
| 83 | + |
| 84 | +- **MicroPython updated to 1.26.0.** |
| 85 | +- **Camera startup** — the sensor clock was decoupled from CSI state, camera |
| 86 | + detection at boot is faster (the most common config is tried first), and the |
| 87 | + OpenMV 3 OV7725 default clock was corrected. |
| 88 | +- **Image quality** — software ISP gamma correction (Alif and STM32) and |
| 89 | + bad-pixel correction (STM32) are on by default; the PAG7936 and PS5520 |
| 90 | + sensors gained auto-white-balance controls. |
| 91 | +- **Performance** — :meth:`image.Image.to_ndarray` is accelerated with Helium |
| 92 | + SIMD and the FOMO post-processor was vectorized with ulab. |
| 93 | +- **FLIR Lepton driver rewritten** to receive frames asynchronously in the |
| 94 | + background — rotation/``transpose`` now works, drawing upscales bilinearly, |
| 95 | + and reset is faster. |
| 96 | +- **Capture throughput** — the i.MX RT1062 CSI now uses full DMA offload, and |
| 97 | + the STM32 N6 has a hardware-GPU :meth:`~image.Image.draw_image`. |
| 98 | + |
| 99 | +Bug fixes |
| 100 | +--------- |
| 101 | + |
| 102 | +Camera and sensors: |
| 103 | + |
| 104 | +- Fixed RGB565 / GRAYSCALE / BAYER / YUV422 modes across the STM32 sensors, |
| 105 | + PAJ6100 on the OpenMV H7 / H7 Plus, OpenMV 2 QVGA RGB565, and the N6 CSI |
| 106 | + mono / RGB-YUV configuration; the software test camera now resets |
| 107 | + deterministically. |
| 108 | +- Auto-white-balance no longer turns the image green at low or variable frame |
| 109 | + rates (a 250 ms moving average replaces the every-100-frames sample), and |
| 110 | + PS5520 luminance flicker is fixed. |
| 111 | + |
| 112 | +Image processing: |
| 113 | + |
| 114 | +- Fixed a draw-line rendering glitch; :meth:`image.Image.flush` now flushes the |
| 115 | + JPEG buffer of the image it was called on; :class:`~ml.preprocessing.Normalization` |
| 116 | + now applies mean/stdev to float inputs; image-from-file allocation is fixed. |
| 117 | + |
| 118 | +Camera capture: |
| 119 | + |
| 120 | +- Fixed severe image corruption on non-JPEG transfers (the frame interrupt is |
| 121 | + now enabled only in JPEG mode), JPEG mode-3 support, and DMA line-size and |
| 122 | + small-buffer lockups on STM32; VOSPI / Lepton synchronization is more |
| 123 | + reliable, notably on the N6. |
| 124 | + |
| 125 | +Misc: |
| 126 | + |
| 127 | +- :func:`omv.board_id` returns the correct UID on RT1060; ``YoloV2`` no longer |
| 128 | + crashes when constructed without explicit anchors. |
| 129 | + |
| 130 | +Hardware and board support |
| 131 | +-------------------------- |
| 132 | + |
| 133 | +- **OpenMV N6** — STM32N6 with a Neural-ART NPU, triple buffering, SPI LCD/TV |
| 134 | + output, Soft-CSI, the :mod:`tof` module, and bundled ROMFS models. |
| 135 | +- **Arduino GIGA** — MIPI DSI display output. |
| 136 | +- **New sensors** — PixArt PS5520; FLIR BOSON on the OpenMV H7 Plus; GenX320 |
| 137 | + auto-detect. |
| 138 | +- **OpenMV Pure Thermal** — the FLIR Lepton is now a regular (secondary) |
| 139 | + camera sensor. |
| 140 | +- **Alif AE3** — software ISP gamma correction, the :mod:`crc` module, and SPI |
| 141 | + fixes. |
| 142 | + |
| 143 | +Breaking API changes |
| 144 | +-------------------- |
| 145 | + |
| 146 | +User-visible API breaks between v4.7.0 and v4.8.0. Scope: Python C-modules in |
| 147 | +``modules/`` and Python libraries in ``scripts/libraries/``. |
| 148 | + |
| 149 | +Each change is tagged with its impact: |
| 150 | + |
| 151 | +- *major* — most scripts that used it need edits. |
| 152 | +- *minor* — narrow API; only affects scripts that used it. |
| 153 | +- *behavior* — same API, different results; re-check tuned scripts. |
| 154 | +- *tooling* — only affects host tools / building from source. |
| 155 | + |
| 156 | +Changes are grouped by impact in that order — *major* first, then *minor*, |
| 157 | +*behavior*, and *tooling*. If you just want to port your code, jump to the |
| 158 | +:ref:`migration checklist <v4_8_0_migration>` at the end for a condensed to-do |
| 159 | +list. Each commit hash links to its diff on GitHub. |
| 160 | + |
| 161 | +.. _v4_8_0_fir: |
| 162 | + |
| 163 | +FLIR Lepton moved off the ``fir`` module *(major)* |
| 164 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 165 | + |
| 166 | +The FLIR Lepton is now driven as a regular camera sensor instead of through the |
| 167 | +:mod:`fir` module. Lepton control was removed from :mod:`fir`: the |
| 168 | +``FIR_LEPTON`` type and the ``radiometric()``, ``register_vsync_cb()``, |
| 169 | +``register_frame_cb()``, ``get_frame_available()``, and ``trigger_ffc()`` |
| 170 | +methods are gone. Capture the Lepton like any other camera (it appears as a |
| 171 | +secondary sensor on the OpenMV Pure Thermal); the Pure Thermal example was |
| 172 | +rewritten to the new API. The non-Lepton :mod:`fir` sensors (Grid-EYE, MLX, |
| 173 | +AMG8833) are unchanged. |
| 174 | + |
| 175 | +*Commits:* `bacfb7aeb <https://github.com/openmv/openmv/commit/bacfb7aeb>`__, |
| 176 | +`117710566 <https://github.com/openmv/openmv/commit/117710566>`__, |
| 177 | +`592a22902 <https://github.com/openmv/openmv/commit/592a22902>`__, |
| 178 | +`1a614202e <https://github.com/openmv/openmv/commit/1a614202e>`__ |
| 179 | + |
| 180 | +.. _v4_8_0_buzzer: |
| 181 | + |
| 182 | +``buzzer`` module removed *(minor)* |
| 183 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 184 | + |
| 185 | +The ``buzzer`` module was removed from the STM32 and i.MX RT ports. Drive the |
| 186 | +buzzer with :class:`machine.PWM` instead; a Pure Thermal buzzer example using |
| 187 | +PWM was added. |
| 188 | + |
| 189 | +*Commits:* `ccb947924 <https://github.com/openmv/openmv/commit/ccb947924>`__, |
| 190 | +`444120f2d <https://github.com/openmv/openmv/commit/444120f2d>`__ |
| 191 | + |
| 192 | +.. _v4_8_0_omv_fb: |
| 193 | + |
| 194 | +``omv.disable_fb()`` removed *(minor)* |
| 195 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 196 | + |
| 197 | +The ``omv.disable_fb()`` function was removed; frame-buffer streaming is |
| 198 | +controlled through the camera API now. The legacy RPC desktop scripts that |
| 199 | +relied on it were also removed. |
| 200 | + |
| 201 | +*Commits:* `84c3db58a <https://github.com/openmv/openmv/commit/84c3db58a>`__, |
| 202 | +`6fe99051c <https://github.com/openmv/openmv/commit/6fe99051c>`__ |
| 203 | + |
| 204 | +.. _v4_8_0_csi: |
| 205 | + |
| 206 | +``csi`` is new — its API is not yet frozen *(minor)* |
| 207 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 208 | + |
| 209 | +The :mod:`csi` module is introduced in v4.8.0 and its API evolved during the |
| 210 | +release: ``csi.fb()`` was removed, and :meth:`csi.CSI.snapshot` ``(image=...)`` |
| 211 | +now requires a *mutable* image and draws/scales the captured frame into it |
| 212 | +instead of doing a raw deep copy. Early adopters of the new module should |
| 213 | +re-test; the legacy ``sensor`` API is unaffected. |
| 214 | + |
| 215 | +*Commits:* `0bc0385eb <https://github.com/openmv/openmv/commit/0bc0385eb>`__, |
| 216 | +`8cd7a309f <https://github.com/openmv/openmv/commit/8cd7a309f>`__ |
| 217 | + |
| 218 | +.. _v4_8_0_imageio: |
| 219 | + |
| 220 | +``image.ImageIO`` stream mode and ``close()`` *(minor)* |
| 221 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 222 | + |
| 223 | +:class:`image.ImageIO` — the ``mode`` argument now accepts only lowercase |
| 224 | +``'r'`` / ``'w'`` (uppercase is rejected with an updated error message), and |
| 225 | +opening with ``'w'`` always truncates/recreates the file instead of |
| 226 | +preserving an existing stream. ``ImageIO.close()`` is now idempotent (closing |
| 227 | +an already-closed stream no longer raises) and returns ``None`` instead of the |
| 228 | +stream object. |
| 229 | + |
| 230 | +*Commits:* `715c4cbba <https://github.com/openmv/openmv/commit/715c4cbba>`__, |
| 231 | +`21ceec422 <https://github.com/openmv/openmv/commit/21ceec422>`__ |
| 232 | + |
| 233 | +.. _v4_8_0_blaze: |
| 234 | + |
| 235 | +BlazeFace / BlazePalm return value *(minor)* |
| 236 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 237 | + |
| 238 | +The :class:`~ml.postprocessing.mediapipe.BlazeFace` and |
| 239 | +:class:`~ml.postprocessing.mediapipe.BlazePalm` post-processors (new in this |
| 240 | +release) now return a single bounding-box list instead of the full per-class |
| 241 | +list — callers index the result directly rather than ``[0]``. |
| 242 | + |
| 243 | +*Commit:* `75e16b573 <https://github.com/openmv/openmv/commit/75e16b573>`__ |
| 244 | + |
| 245 | +.. _v4_8_0_mlcb: |
| 246 | + |
| 247 | +ML post-processor callback receives raw tensors *(behavior)* |
| 248 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 249 | + |
| 250 | +A :class:`ml.Model` ``predict()`` post-process callback now receives the raw |
| 251 | +(quantized) output-tensor references instead of pre-converted float |
| 252 | +``ndarray``\ s — this avoids memory exhaustion on large models. If no callback |
| 253 | +is supplied, the float ``ndarray`` is still returned. Custom callbacks must |
| 254 | +dequantize the tensors themselves (the built-in post-processors already do). |
| 255 | + |
| 256 | +*Commit:* `84e6ee650 <https://github.com/openmv/openmv/commit/84e6ee650>`__ |
| 257 | + |
| 258 | +.. _v4_8_0_clock: |
| 259 | + |
| 260 | +Camera clock decoupled from CSI state *(behavior)* |
| 261 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 262 | + |
| 263 | +The sensor clock is now independent of CSI state. ``set_clock`` / |
| 264 | +``set_frequency`` only reconfigures the clock when the requested frequency |
| 265 | +differs by more than a tolerance, and ``get_clk_frequency`` takes a boolean to |
| 266 | +return the exact (rather than nominal) frequency. The default clock is 24 MHz |
| 267 | +on the OpenMV N6 and AE3, so no explicit ``set_clock()`` is needed at boot. |
| 268 | +Scripts that toggled the clock for timing-sensitive captures should re-check |
| 269 | +their assumptions. |
| 270 | + |
| 271 | +*Commits:* `2040a0a00 <https://github.com/openmv/openmv/commit/2040a0a00>`__, |
| 272 | +`09c0052df <https://github.com/openmv/openmv/commit/09c0052df>`__, |
| 273 | +`66ade9aea <https://github.com/openmv/openmv/commit/66ade9aea>`__, |
| 274 | +`7e0a251bc <https://github.com/openmv/openmv/commit/7e0a251bc>`__, |
| 275 | +`e6f43f3ca <https://github.com/openmv/openmv/commit/e6f43f3ca>`__ |
| 276 | + |
| 277 | +.. _v4_8_0_tooling: |
| 278 | + |
| 279 | +USB debug protocol and firmware targets *(tooling)* |
| 280 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 281 | + |
| 282 | +None of this affects MicroPython scripts. Obsolete USBDBG commands |
| 283 | +(``SCRIPT_SAVE``, ``TEMPLATE_SAVE``, ``DESCRIPTOR_SAVE``, ``ATTR_READ``, |
| 284 | +``ATTR_WRITE``, ``TX_INPUT``, ``SET_TIME``) were removed and unsupported |
| 285 | +commands from older IDEs are now flushed instead of crashing TinyUSB boards on |
| 286 | +connect; the legacy STM32 UVC firmware target was removed. Old host tools |
| 287 | +should update; see the |
| 288 | +`firmware repository <https://github.com/openmv/openmv>`__ history for detail. |
| 289 | + |
| 290 | +*Commits:* `90bd11e93 <https://github.com/openmv/openmv/commit/90bd11e93>`__, |
| 291 | +`657c9a632 <https://github.com/openmv/openmv/commit/657c9a632>`__, |
| 292 | +`35182f035 <https://github.com/openmv/openmv/commit/35182f035>`__ |
| 293 | + |
| 294 | +.. _v4_8_0_migration: |
| 295 | + |
| 296 | +Migration checklist |
| 297 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 298 | + |
| 299 | +For a clean port to v4.8.0 the typical work is: |
| 300 | + |
| 301 | +#. If you used the FLIR Lepton through :mod:`fir`, switch to capturing it as a |
| 302 | + camera sensor (:ref:`the fir/Lepton change <v4_8_0_fir>`). |
| 303 | +#. Replace any ``buzzer`` use with :class:`machine.PWM` |
| 304 | + (:ref:`the buzzer removal <v4_8_0_buzzer>`). |
| 305 | +#. Remove ``omv.disable_fb()`` calls |
| 306 | + (:ref:`the omv.disable_fb() removal <v4_8_0_omv_fb>`). |
| 307 | +#. For :class:`image.ImageIO`: use lowercase ``'r'``/``'w'`` and expect |
| 308 | + ``'w'`` to truncate (:ref:`the ImageIO change <v4_8_0_imageio>`). |
| 309 | +#. For custom ML post-process callbacks: dequantize the raw tensor references |
| 310 | + yourself, or rely on the default float path |
| 311 | + (:ref:`the callback change <v4_8_0_mlcb>`). |
| 312 | +#. Re-check any script that drove the sensor clock for timing-sensitive |
| 313 | + captures (:ref:`the clock change <v4_8_0_clock>`). |
0 commit comments