0

Currently working on licentiate detection system and need some guidance on how to proceed. I can capture (via video playback) and with the help of an open source library called OpenALPR display the license plates directly to the terminal, now the issue is it capture on a frame by frame basis so it capture the same license plate multiple times. I added a frame skip variable and now it skips however many number of frames I want it to but the issue is still there.

Furthermore, I'd like to distinguish between different license plates if possible but don't know how to work around that, I've attempted employing basic object detection and detection but failed miserably.

Below is an image of the program running, as seen it detects a single license plate and display multiple instance of it, now the issue is I expect it to move on to the next car and display Plate#1, unfortunately it does not and continues feeding into Plate #0 Program Running

Program Running

The function that actually helps display the license plate text is below, really the first line does all the work. OpenALPR is a pretty powerful.

results = alpr.recognize_ndarray(frame)         
    for i, plate in enumerate(results['results']):             
    best_candidate = plate['candidates'][0]             
    print('Plate #{}: {:} ({:}%)'.format(i, 
          best_candidate['plate'].upper(),   
          best_candidate['confidence']))

I'd like some guidance towards how I can solve this problem? Which is basically distinguish between different license plates.

Yusuf Yasin
  • 77
  • 2
  • 7

1 Answers1

0

It is a general problem without general solution, because it highly depends on context. Some thoughts:

If it is a video feed you can track the plate movement, the track will "jump" when it detects another plate. Let say the maximum optical flow velocity is 100 px/frame, if it jumps more than this threshold, you can suppose it is a new plate.

Depending on you video quality and detector, may there be spurious jumps, I would add a Kalman filter or any simple filter.

Perhaps there is a minimum time lapse between a plate goes out the image and the next arrives. You can use a time threshold to trigger the "changed plate alert" event.

Alejandro Silvestri
  • 3,706
  • 31
  • 43
  • I see, the issue is I feel as if I'm lost in a sea of information and have no good starting point on how to get a grasp of this. I'm currently reading through this book. **Mastering Opencv with Practical Computer Vision projects, Chapter 5. Number Plate Recognition Using SVM and Neural Networks** in an attempt to get a grasp of how to go about doing this. Do you have any suggestions regarding getting started with this, from a practical standpoint that it. Apologies for the late reply btw. – Yusuf Yasin Oct 29 '19 at 02:12
  • Take a look at this site https://www.pyimagesearch.com/ , and look for "license plate" in this page https://www.pyimagesearch.com/pyimagesearch-gurus/ . I hope it will help. – Alejandro Silvestri Oct 29 '19 at 02:41