Configuration of the Opencv4android SDK on the win 8.1 platform

Source: Internet
Author: User
Tags android sdk manager

This article primarily records the process of installing and configuring the Opencv4android SDK yourself. My installation environment is: win8.1 64-bit.

Of course, before doing OPENCV development, it is advisable to have some development experience, such as:
1. Java Development on Android
2. Java Native Interface (JNI): Techniques for running native code on Java virtual machines
3. Android activity and its life cycle, which is the essence of Android development
4. Knowledge about the development of Android camera.

There have been a lot of errors in configuring ADK, Eclipse, and ADT, despite the many tutorials that have been used online. The process of these tutorials is roughly the same, but there are a lot of errors in a build. Later, on the recommendation of the Forum, try using Nvidia's TADP (Tegra Android Development Pack) package, including the ADK, Eclipse, NDK, and OPENCV installation packages, All environment variables and related plug-ins are automatically configured during the installation process. TADP mainly includes the following content:

Android development:android SDK R24. 0. 2Android APIs Android NDK32 andNDK64 r10d Android Build Tools R21. 1. 2Android Platform Tools R21 android support Library R21 Android support Repository lbrary R9 Google USB Driver R11 Jdk1.7. 0_71 Eclipse4.3Cdt8.2. 0Adt24.0. 2Apache Ant1.8. 2Gradle2.2. 1Tegra Libraries andTools:tegra Graphics Debugger1.3(Win/osx/linux) Nsight Tegra2.1, Visual Studio Edition (Win) Tegra System Profiler2.2(Win/osx/linux) CUDA7.0Beta onNVIDIA Tegra X1 Devices (available onLinux x64 onSelect Devices only. See documentation forDetails.) CUDA6.5  onNVIDIA Tegra K1 Devices (available onLinux x64 onSelect Devices only. See documentation forDetails.) Perfkit4.3(Win/osx/linux) Perfhud ES2.2[NVIDIA? SHIELD? Support Requires OTA Update $+] OpenCV forTegra2.4. 8. 2PhysX3.3  forAndroid Google Nexus9Tablet Support forNVIDIA Tegra K1 --bit Mobile processor. Note:cuda is  notSupported onNexus9.Nvidia? SHIELD? Android TV support NVIDIA? SHIELD? Tablet support NVIDIA? SHIELD? Tools support NVIDIA? Tegra NOTE7Tools support Google Project Tango Tablet Development Kits Tools Supporttegra Samples, Docsand Devices support NVIDIA GameWorks OpenGL Samples2.1Tegra SDK Samples Tegra SDK documentation Tegra X1 --bit Based Device Support Tegra K1 --bit Based Device Support Google Project Tango Tablet development Kit Tools Support


Https://developer.nvidia.com/tegra-android-development-pack

Note: Nvidia's Tegra Android SDK includes features of some Nvidia Tegra platforms, but it is not limited to Tegra device usage. The official website mentions that TADP is suitable for 64-bit Windows, but in practice it is found that tadp download installs eclipse is a 32-bit version and cannot be compatible with 64-bit JDK, and an error occurred: Java was started but returned exit code=13. For my own errors, it is recommended that you download Eclipse 4.3 64-bit version +adt using a 64-bit system.

After preparing the TADP and self-downloaded Eclipse 4.3 64-bit version +adt, you can start the entire installation and configuration, open the Tadp-4.0r1-windows.exe, prompt to set the path and installation path of the download package:

Go to the Download installation screen, select the required components (do not tick Eclipse and ADT here), click Next to download automatically, you will be prompted to accept License during the installation process:

After the installation is complete, restart the computer, and the installation is complete except for Eclipse and ADT. Unzip the Eclipse 4.3 64-bit version into the TADP installation path, turn on Eclipse, set up a workspace, and the next step is to install ADT.

The ADT installation steps are as follows:
1.Eclipse menu bar, find: Help, Install New software

2. In the Install dialog box that appears, select "Add ...", name the ADT plugin in the popup dialog box, and specify the path to the ADT plug-in installation package:

3. After clicking "OK", pop up the list of ADT installation, tick all and click Next to install.

There may be warnings, direct pass~

4. After the installation is complete, restart Eclipse, and the following dialog box pops up, the installation is successful!

5. In the Eclipse menu bar, locate: Window---Preferences, click on the tab android to see the installed Android API.

6. Android SDK Manager and Android Virtual Device Manager cannot be found in eclipse at this time, so you need to set the path of ADK and enter it in the menu bar: Window--preferences- >android, select the path to the Android SDK (found in the TADP installation path):

7. In the popup dialog box, select: Use existing SDKs, and ensure that the existing location is the installation path for the Android SDK:

8. After completing a series of operations, restart Eclipse, which can be seen under the menu bar window:

The entire environment is now complete!

I'm a gorgeous split line.

The second part is a demonstration of the OPENCV Demo test development environment If there is still a problem. We're going to import the OpenCV library and examples into the workspace. The OPENCV library is packaged as an Android library project, available for Android projects, and quoted on the line. Each example is a generic Android project that references the OPENCV library, so open the example and don't forget the pilot inbound project. The steps are as follows:

1. Open Eclipse, menu bar found: file->import:

2. Open: General->existing Projects into Workspace->next:

3. In the following dialog box, click Finish to load all selected items into the workspace and start compiling:

4. Look at the problems window, a lot of errors ... There are many ways to solve these problems on the Internet, but here are just a few of my own solutions:

5. Problem Resolution steps:
A. Right-OpenCV the library project-android Tools–fix project Properties; then project–clean–clean all project;

B. Find an error in the Android project, will modify the project directory under the Project.Properties file content target=android-xx,xx part of the version of the Android SDK installed in your machine, these versions can be accessed through window- > View in Preferences->android.

C. As with other errors in the problems view, you can only continue to examine the code for additional questions.

6. After you complete step b, all the errors disappear and you can then run the instances of each OPENCV. If you have an Android phone, connect to your computer via USB, then right-click on an item and select "Android Application" in the "Run as" window.

7. The console then went wrong because the connection to ADB was down, and a severe error had occured. If there is no problem with the Adb.exe path, you can try: Help->check for update, check for updates, and then restart Eclipse. The problem is solved ...

8. When running the OPENCV project on your Android phone, make sure that your phone has OPENCV Manager installed, otherwise you will be prompted with the following information:

9.demo Run successfully! You can start opencv4android development!

Configuration of the Opencv4android SDK on the win 8.1 platform

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.