Modifying Code to detect other country license plates ???

1,742 views
Skip to first unread message

Hafee Atyub

unread,
Sep 25, 2014, 6:36:28 AM9/25/14
to open...@googlegroups.com
Hi, I am trying to use openAplr to detect Pakistani number plates.

Car Registration number in Pakistani number plates are divided into 2 lines as shown.

OpenALPR detects license plate only if the number is in one line (as in case of US & EU)

Where in code should i modify to make it work for my number plates?

I have been playing around with config file and code but no success so far..

(PS: regiondetector.cpp's   doCascade  function returns 1 for plate on the right but returns 0 for original plate)
pk.jpg

Matt

unread,
Sep 25, 2014, 9:39:31 AM9/25/14
to open...@googlegroups.com
Hafee,

Yes, this is a very important feature to add.  I've received numerous requests.  I haven't had time to add support yet, but it's on the radar.  I created this issue to track: https://github.com/openalpr/openalpr/issues/52

Matt

unread,
Oct 21, 2014, 6:15:44 PM10/21/14
to open...@googlegroups.com
The latest code adds support for 2-line plates.  You'll still need to train a specialized detector for the two-line plates.  Once you do, the openalpr.conf configuration has a multiline option that you can specify for each country.  It will then look for two lines of text in the image.


On Thursday, September 25, 2014 6:36:28 AM UTC-4, Hafee Atyub wrote:

Jose Pina

unread,
Oct 25, 2014, 7:49:22 AM10/25/14
to open...@googlegroups.com
this looks fine, but for example on Europe there are 3 line plates, which belongs to Motorcycle plates.




How can I add support for 3 lines ? what source defines the number of lines?

I would like to help you out since I am a C++ developer with CV knowledge. 

Matt

unread,
Oct 25, 2014, 9:37:29 AM10/25/14
to open...@googlegroups.com
Jose,

linefinder.cpp is the place to make those modifications.  Right now it looks for a single line, if multiline is enabled, it disqualifies the chars it already found and then looks for another line.  If you parameterize that to look for n lines, it should work.  The config file would need to be updated as well, and there's a check somewhere in the code that checks to see if multiline is true, then it must have 2 lines (this should be changed to match the number of expected lines with the number of found lines).

Keep in mind that every time the license plate has a significantly shape/dimensions (this one is taller than it is wide) then you need to do another detection.  For Europe, we'll probably want to stop at 2-lines anyway, since the likelihood of detecting a 3-line plate with a 2-line plate detector is low, and adding an extra 3-line detector for a small number of plates probably adds more false positives and CPU time than it's worth.

Jose Pina

unread,
Oct 25, 2014, 4:21:25 PM10/25/14
to open...@googlegroups.com
mmm, i guess that  maybe using the aspect ratio to determine if multi-line plate, or making a line connecting chars, going from left to right, and have a max Y error-percent 
 could make multi line support better without parametize. what do you think?

Matt

unread,
Oct 26, 2014, 11:17:25 AM10/26/14
to open...@googlegroups.com
How common are 3-line plates vs 2-line plates and single line plates in Europe?

We could train a specialized detector for finding 3-line plates.  However, if these plates only account for a small percentage of the possible plates then it's going to hurt the accuracy for the more common single and 2-line plates. 

If your application is exclusively focused on finding 3-line plates, then it would make sense to do this.  Or if 3-line plates are very common (i.e., 20%+) it would also make sense.  But if you want a general license plate detector that detects everything, adding support for this additional class of plates when it's a rare occurrence may slow down your recognition rates and reduce accuracy for the more common plates. 

Steve Langston

unread,
Oct 26, 2014, 11:21:30 AM10/26/14
to open...@googlegroups.com
I have never seen 3 line plates before, they are not permitted in the UK that i know too.
 
Steve
--
You received this message because you are subscribed to the Google Groups "OpenALPR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openalpr+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages