I am working on school project and part of it should be about current situation about computer vision libraries for Android. I went to it with large enthusiasm because computer vision seems like fascinating subject but I have been searching for more then a week and I did not find much. I would like to be able to provide information about libraries themselves and about comparison between them.
I will share what I found so far.
OpenCV
seems like the most advanced one and the most popular.
provide the biggest number of functions
it had problem with backward compatibility
is fast(at least so I heard but I have zero information about it)
- does have biggest amount of books about it(at least for C++ version)
JavaCV
- is wrapper for few other libraries including opencv
FastCv
- new with Qualcomm behind it.
Wikitude
- this is more for augmentedreality but in its core is still computer
vision.
As you can see I have a little information about it and doing my own tests for every library is far beyond my current computer vision skills.
Kind regards, Peter.
Basically there are two options: OpenCV and FastCV
OpenCV is a more mature library with a lot more functionality than FastCV. For many computer vision tasks you can find only the most basic functionality in FastCV, whereas you can have almost all popular alternatives available in OpenCV. Check the available feature detectors for instance. OpenCV has Harris, SURF, SIFT, FAST, etc. FastCV, on the other hand, has only Harris and FAST. OpenCV contains hardware optimizations for different HW including desktop computers and mobile computing devices. The ability to use OpenCV in desktop provides you a more flexible development option, as you can tweak and test the code on a fast desktop computer before you start working the mobile development. Also OpenCV is considered as part of a Khronos Computer Vision Group Proposal. So, if this gets approved OpenCV can become the standard API for computer vision. As far as I can see, FastCV provides superior optimizations for Snapdragon CPUs. This might play an important role in the decision in the short term, but I'm sure OpenCV will close the gap very fast, if any.
If you choose the OpenCV path, then there are two sub-paths: OpenCV with Android NDK vs. JavaCV with Android SDK. JavaCV is a wrapper around OpenCV based on JavaCpp. JavaCV mostly wraps C API, although OpenCV provides an Object Oriented C++ API as well. The C++ API handles releasing of unused memory automatically, for instance. However, C API (hence JavaCV) requires you to handle releasing of unused imagery manually. Also when you face a problem in JavaCV, it is difficult to tackle the problem, because there are too many indirections to check. Problems are easier to locate when you use OpenCV directly. However, in case of Android, the added difficulty of NDK should not be forgotten.
If available OpenCV functionality is necesary for the specific application, and no custom pixel level processing code is needed, JavaCV is the way to go. However, if a considerable amount of custom image processing code is required, Java code will slow you down, and you will need to switch to NDK, anyway. In the latter case, OpenCV is the alternative to choose.
I would use OpenCV as it is the best computer vision library right now. You'll program your functions in C++, and then you compile the Android aplication using the JNI library. You have information on how to do that on the official documentation.
I have worked with this configuration and OpenCV performance in android is really nice. You will notice benefits if you make some functions in fixed-point arithmetic. Good luck
For a android based project, it is easy to start with JavaCV. It contain almost all the functions that are available on OpenCV.
But there are no rich documentation on JavaCV, but OpenCV has. So you can find the relevant methods from OpenCV documentation and use those in JavaCV(same method names).
There is a complete document at here. That is discuss about how to setup JavaCV on eclipse - android environment.
vizier answered quite nicely but I am under the impression that his analysis has a mistake. I think he is not aware that Opencv has a version for android called OpenCV4Android. It is Java wrappers for the c++ functionality, meaning you can avoid using Android NDK and program everything in Java. This would make JavaCV "non-official" library redundant except for the fact that this one, besides wrapping opencv, also wraps a lot of other nice CV libraries.
Edit:
This doesn't change vizier conclusions about recommending OpenCV, it actually adds more points towards choosing it.
There's a new option for CV on Android, the Google Mobile Vision API. The API is exposed through com.google.android.gms.vision
and lets you detect various types of objects (faces, barcodes, and facial features) given an arbitrary image bitmap.
Start with OpenCV, and then port important functions such as feature tracking, convolutions, dilate/erode, and maybe SVM. In the case of compiling for android wrap those calls with #ifdef __ANDROID__ then just call the FastCV equivalent. Abstraction is your friend.