1 | initial version |
The web is full of general instructions for building OpenCV in Windows and if you can figure that out, you need to modify the Cmake script involved and add the modules in BUILD_LIST as below
cmake .. -DCMAKE_TOOLCHAIN_FILE=~/android_ndk/android-ndk-r19/build/cmake/android.toolchain.cmake -DANDROID_NDK=~/android_ndk/android-ndk-r19 -DANDROID_NATIVE_API_LEVEL=android-21 -DBUILD_JAVA=OFF -DBUILD_ANDROID_EXAMPLES=OFF -DBUILD_ANDROID_PROJECTS=OFF -DANDROID_STL=c++_shared -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=~/opencv/android_build/out -DANDROID_ABI=arm64-v8a -DBUILD_LIST=core,features2d,flann,imgcodecs,imgproc,stitching,objdetect,photo,java4
There may be some specifics, which I don't know, as I have done this in Linux. The API level you use should be the lowest your app supports - the app defines the real target.
As for NDK, I don't see why the latest wouldn't work. Personally, I used 19c, as Qt required that.