B4A Library Android Automatic License Plate Recognition Library

This is a wrap for this Github project. I have uploaded an APK to THIS DROPBOX LINK so that you can download and test it. I have successfully tested it on a Samsung S4 Mini with KitKat and a Samsung 7" GT-P3100 tablet with Ice Cream Sandwich. Below some screen shots:

1.png


2.png



Camera Started:
3.png



Processing the picture after a snapshot was taken and saved:
4.png



The result - number plate info extracted and returned to the B4A project.
5.png



 
Last edited:

Johan Schoeman

Expert
Licensed User
Longtime User
Great work Johan.
I tested the app with a Samsung note 3 (Android 5.1) and unfortunately the app crash

I had the targetSdkVersion in the manifest set to 19. Have changed it to 22. Try with this APK.

This is what I got from the same number plate that you tested with (it is missing the F):

marco.png
 

Daniel-White

Active Member
Licensed User
Longtime User
Hi Johan , I tested today here in Venezuela, and work great, I am very impress.
I noticed, it is working only in landscape.

My tests, Samsung Pocket Neo, very low profile hardware phone, CPU with 850 Mhz, and 512 MB en Ram. the ANPR usually took 7 sec. That phone is soooooo slowly.

I took some photos very close to license plate, and far away, and works both :)
the licenses plates in Venezuela has the map of Venezuela in background, and the ANPR still working without problem, I will test with the new license plate soon.

Johan, you will share with us the library?
 

Johan Schoeman

Expert
Licensed User
Longtime User
Hi Johan , I tested today here in Venezuela, and work great, I am very impress.
I noticed, it is working only in landscape.

My tests, Samsung Pocket Neo, very low profile hardware phone, CPU with 850 Mhz, and 512 MB en Ram. the ANPR usually took 7 sec. That phone is soooooo slowly.

I took some photos very close to license plate, and far away, and works both :)
the licenses plates in Venezuela has the map of Venezuela in background, and the ANPR still working without problem, I will test with the new license plate soon.

Johan, you will share with us the library?
I want to spend a bit more time on it and then I will make it available as Donation ware for those that might be interested (including the Java code). I got the basics sorted out to make it work from B4A and will not attempt to do major changes to the original Github code to accommodate special requests. That is why I will make the Java code available too for those that made a donation. How you then use/apply it is entirely up to you.:)
 

Daniel-White

Active Member
Licensed User
Longtime User
Hi Johan, I did another test more complex, again with my Samsung Pocket Neo, I took the new license plate of Venezuela, we have two system the old one with the map of Venezuela in light gray in background and the new one with a lot colors in background with the flag yellow, blue and red, and the ANPR work great in both system.

I took the photo 3 foot steps behind of the license plate. Now I will test at night with Flash both licenses systems of Veneuela. that will be hard for the ANPR.:eek:
 

joilts

Member
Licensed User
Longtime User
Hi Johan, I did some tests with Brazilian Plates and it did not recognized any of them. Probably font, color or pattern. Tried some Californian Plates, like in your example, and it worked for all of them. Used a Sony Z3 Compact (D5833) running Android 6.0.1. It took average 7 seconds to return results. Nice Job.
 

roberto64

Active Member
Licensed User
Longtime User
This is a wrap for this Github project. I have uploaded an APK to THIS DROPBOX LINK so that you can download and test it. I have successfully tested it on a Samsung S4 Mini with KitKat and a Samsung 7" GT-P3100 tablet with Ice Cream Sandwich. Below some screen shots:

View attachment 45142

View attachment 45143


Camera Started:
View attachment 45144


Processing the picture after a snapshot was taken and saved:
View attachment 45145


The result - number plate info extracted and returned to the B4A project.
View attachment 45146
hello Jonah, as the library B4A
 

Shay

Well-Known Member
Licensed User
Longtime User
Hi

Are you going to share this ANPR library?

Thanks
 

Johan Schoeman

Expert
Licensed User
Longtime User

tigrot

Well-Known Member
Licensed User
Longtime User
Hi everybody,
I was giving a look to this library and compiling the example code I get this error:

B4X:
B4A version: 6.80
Parsing code.    (0.01s)
Compiling code.    (0.49s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.02s)
Organizing libraries.    (0.00s)
Generating R file.    Error
c:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
c:\program files (x86)\android\android-sdk\extras\android\support\v7\appcompat\res\values-v23\styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

The structure envolved in this call is present and also data "not found" is contained in XML files:
The target compilation doesn't work for V22 and V23 as well.

B4X:
#AdditionalRes: ..\resource

'IMPORTANT!!!! YOU NEED TO SET THIS PATH CORRECTLY FOR YOUR OWN COMPUTER!!!!!!!!!!!!!!!!!!
'THE BELOW PATH IS THE PATH FOR MY COMPUTER
#AdditionalRes: C:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
#Extends: android.support.v7.app.AppCompatActivity
'IMPORTANT!!!!!!!!!!!!!!!!!!!!!!
'com.sandro.openalprsample ------>>>>> This HAS TO BE THE B4A project's package name! (Project ---> Build Configurations ---> Package)

Any idea?
 

AHilton

Active Member
Licensed User
Longtime User
This never did work for me on 3 different devices (Motorola G, Nexus 5x, Galaxy Note 8). It just said something like "It was not possible ...." immediately after scanning. So, I tried the GitHub sample apk that this is a wrapper for and it only correctly returned the plate #'s (USA various states) 10-15% of the time. Lots of app crashes.
 

Johan Schoeman

Expert
Licensed User
Longtime User
It works one time on three tests. Your number misses the initial "C" but APP crashes(i took from a frame of your movie). 50" are too much for a quad-core device...
Work through this thread. You might have better luck. I have read various number plates successfully with this and the result is just about immediate.

https://www.b4x.com/android/forum/t...th-google-play-services-android-vision.70417/

Read up on ALPR on the Internet. It is mostly suited for some USA states and some EU number plates. There is a way to teach it to recognize other license plates but it is a length process and one that I have not been prepared to spend time on.
 

tigrot

Well-Known Member
Licensed User
Longtime User
Hi Johan, I was giving a look, just to learn something more(after 44 years in IT). No need to recognise a licence plate: there are cameras capable to get a plate number in milliseconds and I don't like "to reinvent hot water" (we say this in Italy when it's not worth).
Thank you for your hint.

Mauro
 
Top