5

I'm having a hell of a time importing OpenCV into my Android project. I've already tried this tutorial:

http://opencv.itseez.com/doc/tutorials/introduction/android_binary_package/android_binary_package.html

and it did not work because Eclipse would not recognize the existing projects in the directory. So after much searching I came across this trunk:

https://code.ros.org/svn/opencv/trunk/opencv/

and was able to import it into my workspace in Eclipse. Eclipse now recognizes the sample projects, but now the problem is that there are no OpenCV library files. So all the calls to import different classes result in errors. Shouldn't there be a opencv.jar somewhere? I've seen various posts that mention having to build the library but unfortunately I don't have the slightest clue how to do that. I need something with step by step instructions. I'm running Windows 7 64-bit.

Thanks!

vince88
  • 3,269
  • 5
  • 27
  • 27

5 Answers5

4

You should download the latest OpenCV 4 Android here:

http://opencv.org/downloads.html

And read these tutorials to get you started (in this order roughly):

Introduction into Android Development

OpenCV4Android SDK

Android Development with OpenCV

OpenCV4Android Reference

Rui Marques
  • 8,567
  • 3
  • 60
  • 91
2

If you want to use OPEN CV in your android apps, for example if you need to read some strings from an image in your android and you are new in using OPEN CV. Then download the pre-built OpenCV library for Android from here:
http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.3/

After downloading, import OpenCV-2.3.1 into Eclipse using File-->Import...-->General-->Existing Project Into Workspace.

In your project's properties, Under Android, add the OpenCV2.3.1 library (press Add.. on the right and select OpenCV2.3.1).

            Good luck!
Pir Fahim Shah
  • 10,505
  • 1
  • 82
  • 81
  • could you please provide a sample code to extract some items from a image? I want to use openCV, I need to extract lottery numbers and lottery date from a lottery. Seeking your help! – TharakaNirmana Jun 25 '13 at 05:36
1

You might want to take a look at this project: https://github.com/billmccord/OpenCV-Android

I was able to run opencv applications on my android phone with the help of this port.

NewProggie
  • 1,015
  • 1
  • 10
  • 24
1

installed the Win-superpack? I recommend getting the latest .tar, extract and use it. Worked for me.

sschrass
  • 7,014
  • 6
  • 43
  • 62
0

I posted about this on a duplicate question. Make sure you have the android NDK installed! Or, consider using JavaCV instead. It is much easier to install.

Community
  • 1
  • 1
Brian Attwell
  • 9,239
  • 2
  • 31
  • 26