Raspberry Pi – Automatic Number/License Plate Recognition (ANPR/ALPR)


Hello everyone. Today I want to show you how you can use your Raspberry Pi and Javaanpr to automatically extract a license plate number from a picture. You can use this technology to open your garage door for example.

To make this work run the following commands to update your Raspberry Pi and to install Java on it: (Oracle Java 7 JDK did the best job in my tests)

sudo apt-get update
sudo apt-get install oracle-java7-jdk

After the update and installation have finished you need to download Javaanpr.

Now use a test picture of a license plate and run the following command:

time java -jar javaanpr.jar -recognize -i test.jpg

Here is a screenshot of my test: (I used the Raspberry Pi B Model and I did not overclock it.)

raspberry_pi_javaanpr

It took about 10 seconds for Javaanpr to get the license plate number. Pretty fast in my opinion.

Well, that´s it. You can now use this knowledge for you projects. For example an automatic garage door opener. I hope you liked my post and I hope to see you next time 🙂

Update: I forgot to mention the following: To use Javaanpr all you need to do is to place the jar you downloaded from here into some directory on your Raspberry Pi and run the command

java -jar javaanpr.jar -recognize -i test.jpg

 to execute it. That´s all.

Sources:

http://object-network.blogspot.co.at/2014/02/seven-uses-of-raspberry-pi-camera.html

http://www.raspberrypi.org/forums/viewtopic.php?f=37&t=58257

http://javaanpr.sourceforge.net/

http://www.raspberrypi.org/forums/viewtopic.php?t=44080&p=374054

http://scruss.com/blog/2013/09/26/faster-java-on-raspberry-pi/

Advertisements
Tagged ,

11 thoughts on “Raspberry Pi – Automatic Number/License Plate Recognition (ANPR/ALPR)

  1. Geoff says:

    Hi, I’m wanting to do a similar project to open the drive gate
    Could you tell me how you adapted the JAVAANPR software to process GB style numberplates
    thanks

  2. Sila Sonoza says:

    hi,

    How did you install javaanpr?

  3. Fcbguy says:

    How did you install javaanpr on raspberry?

  4. Twinkle says:

    Will it work on raspbian OS ?

  5. Aarti says:

    Hello
    Please tell me the changes in the code to recognize Indian license number plate which is of 10 digits.

    • theezitguy says:

      Hi Aarti,
      thank you for your comment 🙂
      Have a look at this post on stackoverflow and alter the syntax.xml file according to your needs. The syntax.xml file will be located in javaanpr\javaanpr\dist\resources\syntax if you have downloaded the javaanpr.zip file from here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: