


All compilation information is displayed in the BUILD tab below, as shown in the figureĦ. Since the downloaded OpenCV is generally a Release version, and the release of the application after the development of the APP is completed, the release method also needs to be compiled, so please set the compilation options as shown in the figureĥ. When the message appears, Xiaomi mobile phones also need to turn on the permission switch to install APP via USB)Ĥ. The compiled program will be automatically installed on the USB-linked Android phone (make sure the phone debugging switch is turned on, the new phone is opened by continuously clicking the Android version number in the system settings until it succeeds. Click the triangle button to compile and run at the same time. Open the C++ source code to edit your own program, as shown in the figureģ. Create a new project, as shown in the figureĢ. OpenCV Android SDK (The version must be compatible with NDK\SDK, you can download the Android compiled version of Release from GitHub)Īs mentioned above: This sample project uses omp (openmp and open multi-threads parallel multi-threaded parallel compilation support, which is included in opencv, but it needs to be manually added to CmakeList.txt when compiling the project.

Android SDK, the version must correspond to NDK.NDK (Native C++ Development Kit), must match the Cmake version.Cmake compilation configuration tool (when using Android Studio, since Gradle is used, AS built-in cmake must be used).
#ANDROID NDK STATIC LIBRARY HOW TO#
When using Android NDK for C++ native code development, how to configure the project to use the OpenCV static library and support NEON instruction set + OMP multithreading + OpenCL parallel?
