How to use javaanpr in Android app? - java

I would like to use this library for Car plate recognition in my Android app.
I red about JNI, but i'm still not able to get some good explained tutorial, how can i use use this library in my Android app.
http://javaanpr.sourceforge.net/
Thanks for any advice.

In it's current state, you will not be able to use JavaANPR on Android. The problem is, that JavaANPR's core functions use the java.awt package quite heavily (for example Photo.java) and Android doesn't support AWT mostly (AWT contains native code, and Android has it's own android.graphics package). There have been some attempts to port AWT to Android, but AFAIK they all failed/died eventually.
Disclaimer: A while ago, I forked JavaANPR in order to make it more library-like. It shouldn't be too hard to port the AWT code in JavaANPR to android.graphics though and you are more than welcome to submit a pull request!

Related

Can you use java.swing and javafx for android development?

I dont really know a lot about about android development and i was wondering if it's possible to use java.swing and/or javafx for it.
You can use JavaFXPorts to develop JavaFX applications (not Swing applications) that are deployable on Android. Refer to the JavaFXPorts documentation for more information.
You will need to make your own assessment of whether using JavaFXPorts is an appropriate approach for your application or if you are better off coding purely to the native Android SDK provided by Google or using another 3rd party development SDK such as Unity. I will make no such recommendation here.
No it's not possible. Androids java (Go) does not include the java.swing and the javafx packages.
Android does include it's own gui packages more specialised for it, so I don't see why you would even want swing or javafx.
No you can't use Swing or JavaFX because Android has another type of architecture to render the views. Visit this official website to learn more about views in Android
http://developer.android.com/intl/es/guide/topics/ui/overview.html
Hope it's helps.

Using Sphinx4 on Android

I am really new to the java & android apps development. Currently I'm doing a prototype application about the voice recognition. Which use the sphinx4 speech recognition. I'm really no idea that, is that Sphinx4 can be used on the android SDK?
Using Sphinx4.0 to build a speech recog. Android application (this shows that, it can't)
https://sourceforge.net/p/cmusphinx/discussion/sphinx4/thread/ce6ee093/ (But this said it can.)
if yes, i really no idea how to make use of the sphinx4, anyone can kindly provide the guide for me to complete the prototype?
Thanks for your kindly help.
It is possible to run Sphinx4 on android, however, you need to remove sphinx4 parts that use desktop-specific java api like java sound API. You still can have the core in place and demo should work as expected.
You need to reimplement Microphone class to use android API for sound input.
For more details see the discussion about that:
https://sourceforge.net/p/cmusphinx/mailman/message/31317160/
So it is some work and it requires coding skills. If you don't have that, use pocketsphinx instead like Opiatefuchs suggests you. It's well documented approach which requires minimum efforts.
I also tried to do some App with Pocketsphinx, not Sphinx4. I think this is really not designed for android, but maybe You could get it work. But for which reason? PocketSphinx is a good designed API for including in Android. I had mad some tutorial on my website for how to get the Pocketsphinx work, I advise to stop thinking about Sphinx4 because it would be a heavy coding thing to get it work. PocketSpinx has all You need...look at my Tutorial, this is a better way:
https://sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo
Until now I stopped working on it, but when I got time, I will start to include Pocketsphix into an apk. But this tut only shows how to get the example demo work and set up Your runtime environment to work with Pocketsphinx.

How to take a picture of in panaroma mode?

I want to make an application that allow the user to take a picture of text either from android device Gallery or from android Camera application in a Panorama mode .But i can not find any source or tutorial to do this.How can i do this in my application? how to make an application that take picture from android camera application in a panaroma mode?
Thanks in advance.
I don't know if it's still actual for you, but hope it will be helpful for someone.
Panorama feature is already implemented in standard android camera at least since Android 4.0 (perhaps it was available in even earlier versions but I'm not sure, you can check it), so since source code is open for everyone, it might be the easiest way just to copy required functionality.
Although you can download source of apps from https://android.googlesource.com/ (you want LegacyCamera or Camera), you can't just open project of any standard app in Eclipse or other IDE. For example, LegacyCamera depends on Gallery2 and other dependences that might be hard to be resolved.
I spent several days trying to move panorama feature to separate project. You can download it from here: https://github.com/yankeppey/PanoramaSample . Several remarks:
Functional core (creating one panorama image from several ones, progress notices, etc) is on native part.
I used java code from from LegacyCamera which was used in Android 4.0-4.1, not 4.2, because it was significantly easier for me. Native part is taken from 4.2, it has only minor changes inside and almost the same JNI interfaces.
This project is just to help you move panorama feature to your own app, it's not like kind of library, don't expect clean code without bugs, it's just pretty dirty and buggy project. If I have time I'll try to make it cleaner, but there is no warranty :)

Porting Java code to Android

I have Java code for face recognition which works fine. There is a problem however if I port the code into an Android application.
I have included the necessary jama and jmf which is required by the Java code into the Android app. The Android code compiles fine, but when I run the app it's force closed!
What might I be doing wrong here? What are the things that I need to keep in mind when I do the porting?
By the way there is no GUI for the Java code.
Porting your java code to Android will usually not work, you need to foloow the guidelines for creating an Android application.
You should start at the Android documentation for help.
http://developer.android.com/guide/topics/fundamentals.html
I'd recommend you take a look at the Android OpenCV project. In their CVCamera sample, they have a nice setup for doing real-time image processing for feature detection etc. I've previously modified it to support face detection using the OpenCV library.
If you want to use your own code instead, I suggest you strip out all the JNI/NDK interop code and substitute your own. At any rate, it's a nice starting point.

Developing Android outside of the SDK

It seems as if every Android application I really want to make is impossible to make with the current SDK. It doesn't give me access to certain things I would like to work with. This is an example of one of these things.
I know it is possible since I've seen apps in the market that do things that the SDK cannot do. My basic question is can someone point me in the direction of how to create such an application. I've searched around, but all of the links I've found are for developing with the SDK. A simple link to a tutorial that can show me how to access Android elements that aren't available through the SDK would be great.
Thanks.
You will not find a tutorial on it because the NDK is in flux..
What I have found is ..
One of the Eclipse CDT has blog posts on how to setup NDK projects in Eclipse.
The people who know Android Embedded C and frameworks are usually on certain IRc channel.
Plenty of code documentation..
Google search for android jni wrapper blog posts.
But keep this in mind several areas require state management as hey interact with hardware buffers in a certain way..ie audio..video..etc.

Categories

Resources