0% found this document useful (0 votes)
8 views5 pages

OpenCV Tutorial

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

OpenCV Tutorial

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2019/7/11

OpenCV4Android

Pre-requirements

• JDK (Java Development Kit)


Introduction to
• Android SDK (Software Development Kit) and NDK
OpenCV4Android Library (Native Development Kit)
• Eclipse IDE (Integrated Development Environment)
• ADT and CDT plugins for Eclipse

Kohei Arai (Saga University)

OpenCV4Android OpenCV4Android

Manual setup
• Package that enables development of Android
Application using OpenCV library
• Download OpenCV4Android package from previously
stated URL
• Where to start?
http://docs.opencv.org/doc/tutorials/introduction/ • Create Directory and extract OpenCV SDK to your
android_binary_package/O4A_SDK.html desired place. Better without space in it, otherwise
you may have problems with ndk-build.

OpenCV4Android OpenCV4Android

Package
Structure 1. Start Eclipse and Choose the workspace

1
2019/7/11

OpenCV4Android OpenCV4Android

2. Import OpenCV library as well as samples into Important Notes


workspace
After initial import, on Mac OS system will still show build
errors for applications with native C++ code

Solution:
Open Project Properties -> C/C++ Build, and replace Build
command to “${NDKROOT}/ndk-build” (remove.cmd in
the end)

OpenCV4Android OpenCV4Android
Choose Existing Projects into Workspace -> Next button

OpenCV4Android OpenCV4Android
Click finish button to complete

OpenCV samples are If errors still happened


indeed dependent on
OpenCV library project
Solution:
so don’t forget to
import it to your Open Project Properties -> C/C++ Build -> Environment
workspace as well. Add new environment variable with name of variable
“NDKROOT” and Value is path to your NDK folder.

2
2019/7/11

OpenCV4Android OpenCV4Android

Usage Model
For End User

OpenCV4Android OpenCV4Android

3. Running application in Eclipse IDE


1. Connect your device with adb tool from
Android SDK or
Create an emulator with camera support.
2. Select project you want to start in Package
Explorer,
• Press Ctrl + F11
• Select option Run ‣ Run from the main
menu
• Click Run button on the toolbar
3. Eclipse will ask you about running mode
for your application:

OpenCV4Android OpenCV4Android

Often happened error at first time running:

Tap Yes, and it will open Google Play,


install OpenCV manager application

3
2019/7/11

OpenCV4Android OpenCV4Android

Implementation of Wavelet Transform in Android


Environment using OpenCV4Android Library

OpenCV4Android DB1

1D Wavelet Transform

2D Wavelet Transform

OpenCV4Android DB1

Transpose Function

4
2019/7/11

DB1

1D Inverse Transform

Thank you for your attention

2D Inverse Transform

Wavelet in Android

Image Processing in Android

Link on Youtube

Another example

You might also like