openalpr / openalpr

Automatic License Plate Recognition library
http://www.openalpr.com
GNU Affero General Public License v3.0
11.05k stars 2.5k forks source link

Problem Polish plate (eu) with the letter I in the third position #717

Open rafbi77 opened 6 years ago

rafbi77 commented 6 years ago

Hello. I have a problem with Polish number plates with the letter I in the 3rd position. I use in openalpr.conf settings ocr_language = leu. Examples: 1. img_20180801_180432 alpr -c eu --config /home/pi/openalpr.conf --clock /home/pi/IMG_20180801_180432.jpg Total Time to process image: 441.7ms. plate0: 8 results -- Processing Time = 239.964ms.

  1. img_20180801_181042 alpr -c eu --config /home/pi/openalpr.conf --clock /home/pi/IMG_20180801_181042.jpg Total Time to process image: 396.535ms. plate0: 10 results -- Processing Time = 203.787ms.

    • SC8995 confidence: 81.3158
    • SC895 confidence: 80.4155
    • SC84995 confidence: 79.8447
    • SC8495 confidence: 78.9443
    • S8995 confidence: 77.532
    • S84995 confidence: 76.0608
    • S8495 confidence: 75.1605
    • SCB995 confidence: 72.2444
    • SC899S confidence: 72.0792
    • SCB95 confidence: 71.344
  2. img_20180801_182437 alpr -c eu --config /home/pi/openalpr.conf --clock /home/pi/IMG_20180801_182437.jpg Total Time to process image: 260.946ms. plate0: 6 results -- Processing Time = 136.325ms.

    • SM97LS confidence: 89.3511
    • 5M97LS confidence: 81.5484
    • SM97L5 confidence: 78.4478
    • M97LS confidence: 77.4218
    • 5M97L5 confidence: 70.6451
    • M97L5 confidence: 66.5184

But with license plates with the letter I in the 2nd position is Ok:

img_20180801_182142 alpr -c eu --config /home/pi/openalpr.conf --clock /home/pi/IMG_20180801_182142.jpg Total Time to process image: 430.729ms. plate0: 10 results -- Processing Time = 296.253ms.

All 3 letter prefixes in Poland with the letter I: DMI CLI LBI FMI FZI EPI ESI EWI KLI KMI KWI WCI WLI WPI WSI RMI RNI BIA SPI SBI SCI SMI TPI TKI NGI NIL NLI NNI NPI PMI ZBI

mateok0 commented 5 years ago

I'm pinching. Do you have an idea for an idea? Did you manage to solve?

ArturRog commented 5 years ago

I'd also like to know if you found any solution!

rafbi77 commented 4 years ago

After some time, I came to the conclusion that the reason for incorrect reading is a small verification sticker on the license plate. When we retouch it, the algorithm works good.

mik_1

alpr -d -c eu --config /home/pi/openalpr.conf --clock /home/pi/mik.jpg Total Time to process image: 312.825ms. plate0: 10 results -- Processing Time = 124.663ms.

Now how to improve it in the code or config?

  1. Potential places are binarizewolf.cpp or characteranalysis.cpp?
  2. Controlling parameters does not give results: char_analysis_min_pct = 0.35 char_analysis_height_range = 0.15 char_analysis_height_step_size = 0.10 char_analysis_height_num_steps = 5

segmentation_min_speckle_height_percent = 0.2 segmentation_min_box_width_px = 5 segmentation_min_charheight_percent = 0.4 segmentation_max_segment_width_percent_vs_average = 2.0