Which SVM library to use on Android? - java

We are trying to have an online handwritten text recognizer for the Android platform. The inbuilt Gesture Recognition in android uses (from what I gather from the code) a K-NN checking of points, most probably the control points of a smoothed Bezier curve.
Instead of that we'll get some standard feature data from the points generated by the user on the touchscreen and then train an SVM for about 50 character classes (initially) to check how well our feature selection is working.
So considering that this SVM will have to run on a mobile phone which may not be state of the art in terms of processing power, which library should be used? Also to be considered is which library will be most easily integrated into development on the Android SDK using Eclipse IDE?
I have LibSVM in mind, but anyone with experience of using such on mobile platform should be able to give an educated guess of what to go for.
Thanks in advance.

I gather that what you need to do on the Android device is only evaluating the SVM on new data and not training. In that case, you really don't need any library. You just need to output the model (the weights) from LIBSVM or whatever library/method you plan to use, into your source code (whatever it is) and evaluate it on new data as your Android application requires.

Related

Java 3D plot of axis

I am looking for some simple way how to plot on android in 3 dimensions 4 points and 3 lines in real time. I'd like to create a visualization of a coordinate system from arduino setup with 9axis accelerometer, I want to see on the screen how the object rotates.
Something like https://www.youtube.com/watch?v=fOSTOnQzZCI
The values of the points are in a fixed range, do you know some simple library that can be used for this?
I recommend this book, it contains all the info you need to create 3D visualizations in Java (including source code that you could use for the visualization you described, with only a small amount of adaptation):
http://eu.wiley.com/WileyCDA/WileyTitle/productCd-EHEP000909.html
This book was my main reference for developing a 3D chart library (Orson Charts) in pure Java (I deliberately did not want to use OpenGL for this project). I also ported the library to Android (mostly this just involves mapping the Java2D graphics API calls to the equivalent in Android), you can see the demo on Google Play to get an idea of how the "pure Java" (well, not really Java on Android) rendering performs - I'm pretty sure it will handle your task just fine.

Java Sample Face Recognition

I'm trying to develop a system whereby somebody can take a picture of somebody's face and, after the image has been sent to a remote server, the client will be able to read information about the person.
I have, previously, experimented with JavaCV, however, I have found it too inaccurate for my purpose. I have tried these JavaCV algorithms so far:
Fisher Face Recognition
Eigen Face Recognition
LBPH Face Recognition
However, I need to build a facial recognition system. This will be 'standalone' and will not be run on Android (for example). I need some help in choosing the correct java sdk/library (and also whether commercial solutions, such as 'Cybula', 'NeuroTechnology' and 'Sensible Vision' can be avoided).
Any help would be much appreciated!
Thanks,
Matt
Face recognition is only the last step in the process. To solve this problem, you first have to find the face in the picture (face detection) and then in the detected face you will have to extract the characteristics of the face depending on the quality of the picture, light/flash used, facial/sideways, ... (feature extraction).
Process chain:
face detection -> feature extraction -> face recognition
There are probably a hundred publications for each of these topics. It's up to you to assemble something.
Also notable: this is not the kind of problem that has one global best solution. The chosen approach is at most optimal for the one special problem that you are trying to solve.
Other keywords that you might want to consider:
face tracking
pose estimation
facial feature tracking
emotion recognition
holistic templates
feature geometry
Also noteable: most SDKs that say they do face recognition in reality only do face detection (and sometimes (rarely) feature extraction). To do face recognition you need a huge database of known faces (face features), which of course most "vendors" don't have (not talking about all those agencies though... LOL).
Try Face++ API for Java,see here.Face++ SDK for Java, can be used in Android project.
It is recommended that Face++ free APIs are easy to use.Enjoy it :)

Video - sound - sensor capture in Java

I would like to develop an application which would be able to capture video from a webcam, capture sound from a mic and capture movement if a proximity sensor is available.
Initially I want it to run on windows but if able I might want to make it work on android later on.
I'm looking for something pretty straight forward and easy to understand.
My research has led me to Java Media Framework but it is too old and abandoned.
FMJ seems also old.
JavaCV appears to have poor documentation available.
My goal is to make a home detection app which uses the camera imagery, mic sound and sensors to detect and analyze home invasion.
I might take a leap and do it in .NET or other object oriented programming languages if
easier solutions present themselves.
How should I approach this, what are your suggestions?
One Solution is use JavaCV. So you can develop your desktop application using java and later can be ported in to android with fewer changes. As you said JavaCV haven't rich documentation. But JavaCV is just a wrapper to a OpenCV. So you can read OpenCV documentaion and find the relevant method(function) names. The methods in JavaCV has almost same names as OpenCV. So you can try those methods in JavaCV.
Next solution is use .NET to develop the system. There you can use
AForge.NET a rich library for .NET or Emgu CV .NET wrapper
for OpenCV. But you will be facing a problem when creating the
android app. Because you have to build it from scratch.

Building a music visualiser

I am interested in building a music visualiser using fractal patterns for my final year project. I have googled quite a lot on it and I know a bit about fractals, however I was wondering what software would be used to 'animate' the graphics.
I know Java has a drawing API (AWT and Swing), but it's probably not the best for the animation factor. On the other hand there is also Flash that has new capabilities within as3 to produce such an effect, but if this app was to traverse into mobile development Flash wouldn't be a great choice. So there still exists a gray patch in my head regarding actual app development. Can anyone give me a head's up on where to start looking?
I would suggest that you first define what it is you want to build and then choose the best technology for the task. For audio visualization you will most likely be using some kind of Fourier data. This and the fractal math concepts should translate across programming languages well.
I will often build prototypes in ActionScript or Python just to understand the fundamentals of new topics. Once I have an understanding of the concepts and know the target platform, the prototypes are usually very helpful and sometimes can be easily ported over.
As for quickly prototyping audio visualizations you could use Processing ( java based ), openFrameworks ( c++ ), Cinder ( c++ ) or Flash.
Each of these technologies are cross-platform, allow you to read audio data in realtime, quickly create windows and provide easy to use drawing APIs.
Also, it sounds like you are thinking about mobile. I believe that both Cinder and openFrameworks can be used for iPhone development. As well, AS3 can be compiled into an AIR app which will run on the Android platform. Performance of Flash on Android devices varies greatly from device to device though.

Count the number of objects in an Image

I am investigating the possibility of image processing to identify certain objects and also count them in an image.
I will be given a picture and I need to identify the number of boxes present in that image.
Does anybody have any experience with any Machine Vision/ Image Processing libraries like ImageJ, Fiji, JAI, jMagick ,Java Vision Toolkit? Which do you think is best suited for the job? What do you guys suggest? If the APIs can be used from Java, it would be better. Thank you.
Edit:
I am dealing with warehouse brown boxes. Yes I am talking about regular photos. The source is usually a mobile phone picture.
Edit2:
I am sorry the answer got autoselected. : (
I have never used the libraries you listed but I have used OpenCV.
OpenCV is a well supported and proven computer vision library. It has built in features to count the number of primitive shapes in an image. It is written in C++ but you could create a small wrapper to be invoked via JNI.
RoboRealm is another proven computer vision system used by robotic hobbyists. It is a closed source commercial product that uses a socket based control API.
http://opencv.willowgarage.com/wiki/FullOpenCVWiki
http://www.roborealm.com/index.php
If you must stick to Java, you can still use OpenCV.
If it's just boxes you can use Hough Transforms to detect them.
You can use OpenSURF to detect phones based on source images you feed to it.
Don't think this would be feasible in your case: HAAR Cascades. You could create a custom HAAR clasifier, but the training process can be quite time consuming.
HTH,
George
In Java, there are several projects that extend the Java Advanced Imaging API to provide computer vision:
JavaVis
image processing in java + IPJ - computer vision extensions for JAI
Java Vision Toolkit - JVT (EDIT: opps, this is mentioned in the question.)
There is a paper for JavaVis which introduces the library, compares and constrasts with these other two libraries mentioned.
JavaVis has these features:
handles 2D and 3D images (3D being most relevant in this case)
Has a GUI for inspecting potential results
Matlab image export
Also for java is NeatVision. Unlike the others, documentation is clearly visible for this project.
None of these projects are going to give you a simple turnkey solution. You will need to understand how computer vision works, and create a sequence of processing steps on the photos to help get the best results from the vision algorithms. To that end, JavaVis maybe most useful, since it is aimed towards teaching computer vision.
If you are not talking about real time image processing, you could write an API to Amazon Mechanical Turk.
Are you willing to develop your own code for that? There are several techniques that can be applied and tuned to your specific problem, but I never used a packaged library, always developed my own code. I can provide references for that if you're interested.

Categories

Resources