1.. _external_module_libmpix: 2 3libmpix 4####### 5 6Introduction 7************ 8 9The `libmpix`_ project provides a library for working with image data on microcontrollers. 10It supports pixel format conversion, debayer, blur, sharpen, color correction, resizing and more. 11 12It pipelines multiple operations together, eliminating intermediate buffers. 13This allows larger image resolutions to fit in constrained systems without compromising performance. 14 15Features 16******** 17 18* Simple zero-copy, pipelined engine with low runtime overhead 19* Reduces memory overhead (for example processes 1 MB of data with only 5 kB of RAM) 20* POSIX support (Linux/BSD/MacOS) and Zephyr support 21 22Usage with Zephyr 23***************** 24 25To pull in libmpix as a Zephyr module, either add it as a West project in the :file:`west.yaml` 26file or pull it in by adding a submanifest (e.g. ``zephyr/submanifests/libmpix.yaml``) file 27with the following content and run :command:`west update`: 28 29.. code-block:: yaml 30 31 manifest: 32 projects: 33 - name: libmpix 34 url: https://github.com/libmpix/libmpix.git 35 revision: main 36 path: modules/lib/libmpix 37 38Refer to the ``libmpix`` headers for API details. A brief example is shown below. 39 40.. code-block:: c 41 42 #include <mpix/image.h> 43 44 struct mpix_image img; 45 46 mpix_image_from_buf(&img, buf_in, sizeof(buf_in), MPIX_FORMAT_RGB24); 47 mpix_image_kernel(&img, MPIX_KERNEL_DENOISE, 5); 48 mpix_image_kernel(&img, MPIX_KERNEL_SHARPEN, 3); 49 mpix_image_convert(&img, MPIX_FORMAT_YUYV); 50 mpix_image_to_buf(&img, buf_out, sizeof(buf_out)); 51 52 return img.err; 53 54References 55********** 56 57.. target-notes:: 58 59.. _libmpix: https://github.com/libmpix/libmpix 60