How to use javaanpr in Android app?

2019-07-17 06:18发布

问题:

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.

回答1:

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!