v2.5.0¶
v2.5.0 is a feature-rich imaging release: it adds find_rects(),
find_circles(), get_regression() (line/regression fitting),
find_number() (LeNet digits), the ImageWriter / ImageReader
stream classes, sensor.flush() / width() / height(), and
pyb.RTC support. Image loading is now framebuffer-backed — read the
breaking changes below.
Highlights¶
image.find_rects()— rectangle / quad detector with corner output.image.find_circles()— Hough circle detection.image.get_regression()— least-squares and robust (Theil-Sen) line fitting.image.find_number()— LeNet digit recognition.ImageWriter/ImageReader— record and play back image streams.pyb.RTCsupport, plussensor.flush()/sensor.width()/sensor.height().Breaking: image loading is now framebuffer-backed and raises if the image is too large — see the breaking changes.
New features¶
Feature detection — added
image.find_rects()(AprilTag quad detector; rect objects withx/y/w/h/corners/magnitude),image.find_circles()(Hough),image.get_regression()(least-squares + Theil-Sen robust line fitting), andimage.find_number()(LeNet digit recognition), each with example scripts.Result corners — added a
cornersattribute to the QR-code / AprilTag / data-matrix / barcode result objects.Image streams — added the
image.ImageWriter/image.ImageReaderclasses (16-byte-aligned chunk format) withimage_writer.py/image_reader.pyexamples.Sensor — added
sensor.flush()(push the framebuffer to the IDE without a snapshot) andsensor.width()/sensor.height().pyb.RTC— enabled RTC support with anrtc.pyexample.Added a cat-face Haar cascade and a Servo-Shield (PCA9685) example; the
openmv-cascade.pyhost tool gained support for the new OpenCV XML cascade format.
Other changes and improvements¶
The framebuffer was refactored so
copy_to_fbimage methods update the IDE preview;HaarCascade()paths no longer require a leading/(built-in vs. file is auto-detected); GIF/MJPEG recording now supports VGA (and BAYER GIFs); the built-inREADME.txtwas updated and theopenmv.infdriver file is no longer created on a fresh filesystem.
Bug fixes¶
Imaging:
Fixed
find_circles()vote accumulation,get_regression()rho offset with an ROI and a memory leak,find_lines()segment merging,find_blobs()angle averaging and default (least-restrictive) color bounds, ORB keypoint sort stability / descriptor ordering and the matched-flag, and Haar cascade buffered loading (unaligned reads).
System:
Enabled
pybServo 3 (P9) (#256), fixed the RTC init, increased the UART character timeout (#240), and fixed the uninitialized sensor framebuffer “enabled” flag.
Hardware and board support¶
Breaking API changes¶
User-visible API breaks between v2.4.1 and v2.5.0. Scope: Python C-modules in
modules/ and Python libraries in scripts/libraries/.
The breaking change is a behavior change (same API, different result) — re-check affected scripts. Each commit hash links to its diff on GitHub.
Image loading is framebuffer-backed (behavior)¶
image.Image / image loading now copies the loaded image into the main
framebuffer and raises an exception if the image is too large to fit. Loads
that previously succeeded into a heap buffer may now fail — ensure loaded
images fit the framebuffer (or handle the new error).
Commits: 87d53385a
Migration checklist¶
Ensure loaded images fit the framebuffer (or catch the new “image too large” error) where you previously relied on heap-backed image loads (the image-load change). All other scripts run unchanged.