I installed opencv on four computers using these steps and it works like a charm. These are instructions for windows. Check out this link for complete instructions on windows, linux, and mac.
Estimated time to complete this tutorial: 1.5 hours
Part I: Installing OpenCV for Android
Parts of this tutorial borrow explanations from the OpenCV website ( http://opencv.org/platforms/android.html ).
Download and install Android NDK
Android NDK allows us to compile and run native C / C ++ code on Android.
Update Tools in Android SDK
The inclusion of some additional tools in the Android SDK will simplify the development of native applications later.
In Eclipse, click Help> Install New Software. Then click "Add."
In the Add Repository dialog box, enter โADT Pluginโ for the name and the following URL for the location and click โOKโ: https://dl-ssl.google.com/android/eclipse/
In the Available Software dialog box, select all of the listed components. Click Next. Accept all license agreements. Click Finish.
Reboot Eclipse after all the tools have been downloaded and installed.
Download and install OpenCV SDK
Now we are ready to download and install the OpenCV SDK.
Download version 2.4.4 (or higher) of the SDK from this website: http://sourceforge.net/projects/opencvlibrary/files/opencv-android/
Unzip the downloaded file to a place without spaces in the path, for example: C: \ OpenCV4Android \ OpenCV-2.4.4-android-sdk
In Eclipse, choose File> Switch Workspace> Other. Specify the location associated with OpenCV projects, for example: C: \ OpenCV4Android
Right-click in the Package Explorer pane and select Import> General> Existing Projects in Workspace. Select "Specify the root directory" and enter the location where the contents of the SDK were unpacked, for example: C: \ OpenCV4Android \ OpenCV-2.4.4-android-sdk
After viewing the OpenCV library and sample projects in the Projects window, click Finish. All downloaded and initialized projects may take a minute. After that, you have the projects imported into the workspace, as shown in Figure 2.
Magicdream
source share