SandroMachado / openalpr-android

Android Automatic License Plate Recognition library (http://www.openalpr.com) ported for android.
Apache License 2.0
770 stars 273 forks source link

Live capture and plate recognition #45

Open alexandre-leites opened 7 years ago

alexandre-leites commented 7 years ago

Hi,

I would like to know how to use this library to recognize plates with live video capture. Can you provide some path or example on how to integrate that?

android-dataticket commented 7 years ago

this would be great to hear some input Sandro, whether it can be done or not

mmelatti commented 6 years ago

I've been working on this as well. Instead of starting a new camera activity to get an image, I basically created my own camera app that takes pictures within this project. I have this looping taking pictures, writing to disk, and sending the path to OpenALPR and getting a stream of JSON back. Technically it works but I have to stare at a license plate for up to 8 seconds before I get any useful data back. I need to speed this up to like 2 seconds. Any help would be great. I'm not sure what part of my process is eating all my time. (For instance, is constantly writing to disk and getting path and then delete image taking too long? is there a better way to send a stream to OpenALPR?) (Can I enable any type of Multicore processing in OpenALPR?) Thanks in advance

albertaleksieiev commented 6 years ago

@SandroMachado Actually you need to use openalpr library from C++ instead of using that "High level" interface. You need to retrieve image from camera -> convert it into OpenCV cv::Mat instead of saving to disk(it's much faster!!!) -> and run recognition.

snooplsm commented 6 years ago

I'm late to the game here but if you want to do realtime on the device you can use something less accurate like:

https://github.com/googlesamples/android-vision/tree/master/visionSamples/ocr-reader