-
This project provides the slim build of OpenCv library for the Android, Windows and ARM Linux platforms.
-
Currently there're binary packages for OpenCv 2.4.13.7 , 3.4.20 and 4.8.1.
-
The OpenCvSlim only build basic OpenCv operators and common image processing functions.
-
cv::imread
andcv::imwrite
are reimplemented using stb for smaller size.
module | note |
---|---|
opencv_core | Mat, matrix operations ... |
opencv_imgproc | resize, cvtColor, warpAffine, HoughLines, erode ... |
opencv_highgui | imread, imwrite, imdecode, imencode ... |
opencv_features2d | keypoint feature and matcher ... |
opencv_photo | inpaint , fastNlMeansDenoising ... |
opencv_video | opticalflow, KalmanFilter ... |
- you can get more details in head file within directory of opencv2 .
- Extract Zip to
<project dir>/app/src/main/jni/
- Modify
<project dir>/app/src/main/jni/CMakeListst.txt
to link OpenCv
set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/OpenCvSlim-x.x.x-android/sdk/native/jni)
find_package(OpenCV REQUIRED)
target_link_libraries(target ${OpenCV_LIBS})
- Extract Zip to
<project dir>/
- Modify
<project dir>/CMakeListst.txt
to link OpenCv - Set
-DOpenCV_STATIC=ON
to cmake option for windows build
set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/OpenCvSlim-x.x.x-armlinux/aarch64-linux-gnu/lib/cmake/opencv2)
find_package(OpenCV REQUIRED)
target_link_libraries(target ${OpenCV_LIBS})