I am new to android and opencv,and I am going to develop a APP using this code with this link
here
http://geekoverdose.wordpress.com/category/computer-vision/
The sample project says that "you will have to get the opencv libraries precompiled" in here what I want to do for run this code correctly.please consider about this issue. in here it is wanted to consider about opencv installation for android or is there any special thing have to do? thank you
It will take a little more effort to "run this code" correctly. In short, JavaCV is a wrapper on top of OpenCV, and you have to compile the OpenCV and correctly move all the shared libraries (.so) to your Android development project etc. Like the original article suggested, you need to go to JavaCV homepage and read the installation instructions.
Related
I'm developing an Android app and I have to use the openCV library.
I was wondering if the openCV python sdk is equivalent to the openCV4Android? I already have some openCV code written in Python - everything that can be done using Python can also be accomplished with Java for Android?
Thanks.
Although I used OpenCV Java SDK for both Android and Java projects, I am not sure whether it supports all functionalities of python library. You can check which parts of the library is included in Java SDK from the documentation
If something is included but not have detailed description, you can check out c++/python equivalent for explanations.
OpenCVForAndroid usually only has the modules in the OpenCVMain repository:
https://github.com/opencv/opencv
If you want more than this, for example the OpenCV extra modules below, then you generally have to build from source. OpenCV extra modules
https://github.com/opencv/opencv_contrib
It is worth noting also that at the time of writing most of the official openCV Android documentation is based on using the Eclipse IDE, while most official Android documentation uses the newer Android Studio.
There are also two main ways to use OpenCV on Android - one is to use the Java SDK as you have noted and the other is to build your OpenCV functionality in c++ using the Android native NDE. The former is generally easier if the Java SDK covers the functionality you need.
I think it is fair to say that getting the latest release of OpenCV with the extra modules compiled and working with Android Studio is not trivial at this time - if you look on Stackoverflow you will see quite a few questions and discussions around this topic, for example look at this question and answers:
Reg. Adding OpenCV to Native C code through CMake on Android Studio
I'm planning to take a photo using the smartphone camera, then make some image processing. In case the Java SDK does not cover the functionality I need, a solution could also be sending the image to a remote server, do the processing (using Python) and send the processed image back to the application. Am I missing something? (of course I increase latency)
Is it possible to use google tesseract OCR in android through NDK?
So I have some C++ code which uses tesseract OCR and now I don't want to move it to Android because it is connected with code that uses openCV and I have this in c++.
Many thanks for advice and links and how can I use it and build it.
It is most certainly possible to use the Tesseract OCR library in your own Android application through the NDK. However, you will have to compile the Tesseract library along with another library called Leptonica Image Processing Library and they take considerable amount of time to compile.
A guy named Robert Theis created a GitHub project (named tess-two) that would allow you to call the Tesseract API using Java through the Android Java Native Interface (JNI). You can read a bit more about that here.
I recommend you to follow this particular tutorial written by Gautam Gupta on how to set things up.
On the same page of that tutorial, there's also an explanatory comment giving you a step-by-step list of instructions you need to follow in order to configure the Tesseract OCR library with your Android application in Android Studio.
Edit: The comment URL doesn't always seem to go directly to the comment, so the comment to look for is from user Matz (April 21, 2015) and starts with "For ANDROID STUDIO developers, here’s what I did on my Windows 8.1 machine."
I feel like there is a necessity to ask this question because of the migration of Android Development from Eclipse to Android Studio. A good number of libraries (e.g. AChartEngine for Graphing in Android, among other graphing libraries for Android) also made their libraries available for Maven Dependencies in addition to the the old .jar file libraries that were used for Eclipse.
However, the situation is not the same for Image Processing Libraries as most of them are still using jars and are a bit of a trouble when you need to import them to Android Studio.
A famous open source library for image processing is OpenCV. I managed to import it to my Android Studio project thanks to some Stack Overflow answers. However, it seems as if statically initializing OpenCV for Android Studio is not that straightforward. Also, the import guide of OpenCV to Android Studio seem to be "outdated" as some of them call to create a folder under your "app" folder in Android Studio but I can't seem to make that. The case simply is that OpenCV requires a lot of work to import to Android Studio. Another issue is that there seems to be a lack of tutorial/guides on how to develop applications using OpenCV in Android.
Another Library I found was AndroidFastImageProcessing. It is another library for Image Processing that is available in Android but I can't import it to Android Studio as I needed Android Support Repository which wasn't available in Android Studio's SDK Manager (I only had the Support Library). And I am once again stunted in my progress as I can't seem to properly import an Image Processing Library Properly.
Now, I may be doing things wrong in importing - so if there's a new and updated way of importing OpenCV to Android Studio, kindly do place that in the answers, I'd be grateful. The same goes for AndroidFastImageProcessing - if there's a way to import it successfully in Android Studio, I'd love to know.
My main question is this: is there an Image Processing Library that can be easily imported to Android Studio? A tutorial/great documentation will merit plus points.
There are many native image processing libs available for android, but problem is lack of examples and tutorials , but you can certainly find many libs:
List of few most used :
1. AndroidJniBitmapOperations
2. javacv
3. Opencv
If u wanna work on NDK
https://github.com/julienr/libpng-android
by far best is JAVACV - a java wapper for native opancv, this is growing well and with few useful tutorials and bunch of documentation you can start image processing like me in javacv ;)
https://github.com/bytedeco/javacv
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!
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
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!
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.
installed the Win-superpack?
I recommend getting the latest .tar, extract and use it. Worked for me.
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.
I have a rather simple question. I built the OpenCV library with the help of MacPorts. All the files are in my opt directory as they should be. I'd like to use the libopencv_core.2.2.0.dylib in my Android project in Eclipse. There is a method cvnorm() in that library which I want to use. I'm writing a simple little Android app which will need to use some of the methods from OpenCV. I can't seem to add this library to the project, it says it's invalid file type. Would appreciate any help you could give. Thanks!
There is a special OpenCV trunk for Android. Try this tutorial.
Even it's written for Windows, it worked like a charm in my MacBook Air.