![]() |
libmpix
The open imaging DSP library
|
Internal structure of libmpix.
SIMD brings image processing abilities to low power microcontrollers #1, #2, #3.
libmpix mixes SIMD instructions, hardware accelerators and software to process video data as efficiently as a chip permits, with RAM down to a few hundred kilobytes.
Color image sensors produce bayer data, which goes 3 times larger once converted to RGB. For instance in VGA (640x480) resolution: 640 * 480 * 1 (raw) + 640 * 480 * 3 (rgb) = 1 228 800 bytes, which is more than what most microcontrollers have.
By processing the image line by line, the large intermediate buffers are eliminated:
But as seen above operations require different number of input lines. Functions must be called different number of times per image: different number of times per image:
This becomes complex to manage manually, so libmpix automates this by providing an API for defining operations in a line-based fashion. Each operation (blue) define an input buffer (green), and push data to the next operation.
Performance-wise:
640 * 3 bytes for VGA resolution, considered low impact.This diagram presents everything that the pipeline does and that the developer does not need to manage anymore, as it is handled under the hood by libmpix, but helps understanding the entire flow in detail, which helps debugging when writing new operations.