--- **NOT SUITABLE FOR DEPLOYMENT OR PRODUCTION USE** --- # KleidiCV This project is in the early stages of development and is not ready for use except as a preview. KleidiCV is a library aiming to give high-performing image processing functions on Arm. It is designed to be simple to import into a wide variety of projects. The library provides a C interface. For details see [the C API documentation](https://intrinsiccv.sites.arm.com/intrinsiccv/). An adapter layer API is currently provided for: * OpenCV - [available functionality overview](adapters/opencv/doc-opencv.md) # Structure The directory `intrinsiccv` contains generic implementation of the library. Integration with other projects are stored in `adapters` folder. `test` contains API and unit tests for the library. `benchmark` contains benchmark source. `conformity` contains checks to compare the library output with different implementations. All supporting scripts are located in `scripts`. # Standalone build using CMake The library can be built using CMake: ``` cmake \ -S /path/to/intrinsiccv \ -B build-intrinsiccv \ cmake --build build-intrinsiccv --parallel ``` To target Android devices the following CMake flags are also required: ``` -DCMAKE_TOOLCHAIN_FILE=/path/to/android-ndk/build/cmake/android.toolchain.cmake \ -DANDROID_ABI=arm64-v8a ``` # Standalone build using the provided script Build scripts for Linux/macOS are provided for convenience. To build the library run: ``` scripts/build.sh ``` To target Android devices the following command can be used: ``` BUILD_ID=android \ CMAKE_TOOLCHAIN_FILE=/path/to/android-ndk/build/cmake/android.toolchain.cmake \ EXTRA_CMAKE_ARGS="-DANDROID_ABI=arm64-v8a" \ scripts/build.sh ``` The build artifacts are placed in the `build` directory. ## Build and run tests for Android To build all the tests use the target `intrinsiccv-test`, to also run them use `check-intrinsiccv` and set a proper `CMAKE_CROSSCOMPILING_EMULATOR`. To build all tests: ``` BUILD_ID=android \ CMAKE_TOOLCHAIN_FILE=/path/to/android-ndk/build/cmake/android.toolchain.cmake \ EXTRA_CMAKE_ARGS="-DANDROID_ABI=arm64-v8a" \ scripts/build.sh intrinsiccv-test ``` To run the tests: ``` BUILD_ID=android \ CMAKE_TOOLCHAIN_FILE=/path/to/android-ndk/build/cmake/android.toolchain.cmake \ ADB= \ CMAKE_CROSSCOMPILING_EMULATOR="/scripts/test_android.sh;/build/" \ EXTRA_CMAKE_ARGS="-DANDROID_ABI=arm64-v8a" \ scripts/build.sh check-intrinsiccv ``` For further options please refer to the documentation in `./scripts/build.sh` and `./scripts/test_android.sh`. # Building with OpenCV ## Install This library is compatible with [OpenCV](https://opencv.org) version 4.9. (OpenCV 5.x support is experimental.) Integration consists of the following steps: 1. Download OpenCV sources: ``` wget https://github.com/opencv/opencv/archive/refs/tags/4.9.0.tar.gz tar xf 4.9.0 cd opencv-4.9.0 ``` 2. Patch OpenCV: ``` patch -p1