Skip to content

alifsemi/alif_image-processing-lib

Repository files navigation

Alif Image Processing Library

Alif Image processing library is available as a prebuilt library and as a CMSIS pack. Visit releases page.

Supported features

Formats:

  • ALPHA8
  • ARGB8888
  • ARGB4444
  • ARGB1555
  • RGBA8888
  • RGBA4444
  • RGBA5551
  • BGR888
  • RGB565
  • YV12
  • I420
  • I422
  • I444
  • I400
  • NV21
  • NV12
  • YUY2
  • UYVY

Basic operations:

  • Crop
  • Flip
  • Resize
  • Rotate

Color correction:

  • Color correction using a matrix
  • White balance
  • Lookup Table channel transformation

Bayer filters that can be decoded into any supported image format:

  • RGGB
  • GRBG
  • BGGR
  • GBRG

Video memory allocation and cache management functions

The library relies on video memory allocation functions:

  • aipl_video_alloc
  • aipl_video_free

and on cache management functions:

  • aipl_cpu_cache_clean
  • aipl_cpu_cache_invalidate

These functions have the default implementations which can be turned on by setting AIPL_CUSTOM_VIDEO_ALLOC and AIPL_CUSTOM_CACHE to 0 AIPL config. The default implementation rely on Alif Ensemble CMSIS package and default malloc/free functions.

AIPL as static library does not include these default functions and they must be defined by the user.

CMSIS package requirements

This CMSIS pack requires some packs to be installed and added to the project:

How to create and install CMSIS package

  1. Make sure CMSIS Toolbox installed. Check packchk is available (add CMSIS Toolbox utils path to PATH if necessary):
packchk -V
  1. Set CMSIS_PACK_ROOT environment variables to cmsis-packs installation directory:
export CMSIS_PACK_ROOT=<your pack root>
  1. Run the generating script:
./gen_pack.sh
  1. Install generated CMSIS pack:
cpackget add ./output/AlifSemiconductor.AIPL.1.3.2.pack

How to build the library

ARM Compiler

ARM Compiler can be obtained from the ARM website. Make sure that ARM Compiler's bin/ directory is added to PATH before proceeding.

Build

  1. Create and set up aipl_config.h and place it under config/ directory. If the file is not provided aipl_config_template.h is copied.
  2. Set up CMake:
cmake -B ./build/ -S . --toolchain ./cmake/toolchains/arm-armclang.cmake -DTARGET_CPU="cortex-m55" -DCMAKE_BUILD_TYPE=Release
  1. Build with CMake:
cmake --build build/
  1. libaipl.a can be found inside the build/ directory.

About

Alif Semiconductor image processing library that uses D/AVE2D and Helium acceleration

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages