v3.6.4

v3.6.4 adds an RTSP video-server library, fully fixes the OV5640 imaging modes (Grayscale / RGB565 / Bayer / JPEG at every resolution), doubles sensor FPS with an optimized driver, and fixes a batch of Bayer / JPEG encode bugs. image.get_pixel() on Bayer images and sensor auto-rotation changed — read the breaking changes below.

Highlights

  • RTSP — a new RTSP video-server library with an example.

  • OV5640 — Grayscale / RGB565 / Bayer / JPEG now work at all resolutions, with a larger maximum JPEG transfer and doubled high-res readout.

  • Double FPS — the sensor driver was optimized for ~2× frame rate.

  • Fixes — Bayer edge/vflip, software JPEG (1-bpp and YCbCr grayscale), and buffer-overflow issues.

  • Breaking: image.get_pixel() now debayers Bayer images and auto-rotation now re-applies on sensor.reset() — see the breaking changes.

New features

  • RTSP — added an rtsp library and an rtsp_video_server.py example for RTSP video streaming.

Other changes and improvements

  • Optimized the sensor driver for roughly double the frame rate, doubled the OV5640 high-resolution readout for Bayer/Grayscale/JPEG, increased the maximum JPEG image transfer size, and updated cascade_convert.py to work with Python 3.

Bug fixes

Camera and imaging:

  • Fixed the OV5640 imaging modes so Grayscale / RGB565 / Bayer / JPEG work correctly at all resolutions, the Bayer vflip on OV7725 / OV7690, the right-edge Bayer conversion error, software JPEG encoding of 1-bpp images and YCbCr grayscale (the −128 subtraction), trailing data on JPEG images, and buffer-overflow issues.

Breaking API changes

User-visible API breaks between v3.6.3 and v3.6.4. Scope: Python C-modules in modules/ and Python libraries in scripts/libraries/.

Both breaking changes are behavior changes (same API, different results) — re-check affected scripts. Each commit hash links to its diff on GitHub.

image.get_pixel() debayers Bayer images (behavior)

image.get_pixel() on a Bayer-format image now debayers and returns an (r, g, b) tuple instead of the raw single-channel Bayer value. Scripts that read raw Bayer values via get_pixel() will now receive interpolated RGB tuples and must be updated.

Commits: bf16b6a4f

Auto-rotation re-applies on sensor.reset() (behavior)

Sensor auto-rotation is now (re-)triggered on sensor.reset(). Scripts that called sensor.reset() after configuring orientation, expecting rotation state to persist or not re-apply, may see a different orientation and should be re-checked.

Commits: 0d13a214b

Migration checklist

Update code that read raw Bayer values via image.get_pixel() to expect an (r, g, b) tuple (the get_pixel change), and re-check sensor orientation around sensor.reset() (the auto-rotation change). All other scripts run unchanged.