v2.8.0

v2.8.0 is a massive release. It brings up the OpenMV Cam H7 (STM32H7) with a hardware JPEG encoder and H7 ADC/DAC, a huge image API overhaul (drawing thickness/fills, math/binary operations, many new filters, Otsu thresholding), MicroPython threading, and the omv version module. The Python argument-parsing order was locked and image.mask_ellipse() was removed — read the breaking changes below.

Highlights

  • OpenMV Cam H7 — new STM32H7 board with a hardware JPEG encoder and H7 ADC / DAC.

  • image overhaul — line thickness, shape fills, draw_arrow() / draw_image(), full math/binary ops, and many new filters.

  • Otsu thresholdinghistogram.get_threshold() and a Threshold object.

  • Threading — MicroPython _thread support.

  • omv module — version / board info.

  • Breaking: the Python positional-argument order is now strict and image.mask_ellipse() was removed — see the breaking changes.

New features

  • OpenMV Cam H7 — STM32H7 board support with a hardware JPEG encoder, H7 ADC, and H7 DAC.

  • Drawing — added line thickness, shape fill (rectangle / circle), text scale / kerning, a mono_space keyword on draw_string(), image.draw_arrow(), and image.draw_image() (sprite / mask drawing).

  • Math operations — added add(), sub(), mul(), div(), min(), max(), difference(), blend(), replace() (with hmirror / vflip / mask), and remove_shadows(); basic operations now accept a scalar/color value applied to all pixels.

  • Binary / morphology — a new binary image type and binary(); line ops and erode() / dilate() accept masks; added open() / close() / top_hat() / black_hat().

  • Filters — added cartoon, flood_fill, bilateral, laplacian, blur / gaussian_blur aliases, and adaptive histogram equalization (histeq(adaptive=, clip_limit=, mask=)).

  • Statisticsget_statistics() / get_histogram() accept a color threshold list and invert; added Otsu histogram.get_threshold() and a Threshold object.

  • CMSIS CNN — added image.classify_object() with a cnn.py example (superseded by the nn module in v3.0.0).

  • Threading — enabled the MicroPython _thread module.

  • omv module — added version info (version_string, arch, board_type, board_id); enabled the machine I2C4 bus and math special functions (erf, gamma, …); added motor-shield examples and many new example scripts.

Other changes and improvements

  • The H7 sensor external clock was lowered to 48 MHz (better image quality, lower FPS); low/high JPEG quality is now board-configurable (and tuned for the H7); added per-board imlib_config.h feature gating (all image functions remain enabled on stock firmware); updated the bundled MicroPython.

Bug fixes

Imaging:

  • Fixed image.save() without a file extension, the gain_db / gain_db_ceiling mapping for the OV2640 / OV7725 / OV9650 / MT9V034, excessive gain in sharpen(), morphological edge noise, a divide-by-zero in an image op, and a stack-smash crash on a too-large filter kernel size (now a clean error).

System:

  • Protected the USB VCP buffer with an atomic section (serial corruption, #313), fixed USB connectivity on Windows, mounting the internal flash filesystem if the SD card fails, the cpufreq set_frequency() PLLP value, and a bootloader firmware-flashing bug.

Hardware and board support

  • OpenMV Cam H7 (STM32H7) — new board with a hardware JPEG encoder and H7 ADC / DAC.

  • machine — enabled the I2C4 bus.

Breaking API changes

User-visible API breaks between v2.7.0 and v2.8.0. Scope: Python C-modules in modules/ and Python libraries in scripts/libraries/.

Both breaking changes are minor and only affect scripts that used the relevant feature. Each commit hash links to its diff on GitHub.

Python positional-argument order is now strict (minor)

Argument parsing across the Python C-modules (image / sensor / fir / gif / lcd / mjpeg) now reads positional arguments before keywords and locks the positional order. Combined with the new keyword arguments on the drawing methods (draw_line() / draw_rectangle() / draw_circle() / draw_string() / draw_cross() / draw_keypoints() gaining thickness / fill / scale / size), code that passed parameters out of order positionally — or passed a positional color after one of the new arguments — must use keyword arguments or the documented positional order.

Commits: e0e112468, fc74e70c3

image.mask_ellipse() removed (minor)

image.mask_ellipse() was removed. Scripts that called it must drop the call or use an explicit ROI / mask image instead.

Commits: d7159fba3

Migration checklist

Pass arguments by keyword (or in the documented positional order), especially color on the drawing methods (the argument-order change), and remove image.mask_ellipse() calls (the mask_ellipse removal). All other scripts run unchanged.