[Chicago] OpenALPR - Transformations
Robare, Phillip (TEKSystems)
proba at allstate.com
Fri Nov 4 15:38:43 EDT 2016
Some links you may find useful below. I am surprised ALPR doesn't do this already.
The problems reading license plates by humans have resulted in deaths (due to hits on mis-entered license numbers in the context of traffic stops). I hope you are getting a better feeling of how we need to be careful with the tasks given to our new robotic overlords.
An interesting post from a couple years ago is "How to Build a Kick-Ass Mobile Document Scanner in Just 5 Minutes" (http://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobile-document-scanner-just-5-minutes/) . It covers sharpening the image, doing a perspective transformation and getting the document ready for OCR (but not the OCR step).
The book "Automate The Boring Stuff With Python" has a chapter on "Manipulating Images" that is online and covers how to do the manipulations with PIL (https://automatetheboringstuff.com/chapter17/). This would be a good start. If you are working on your project with Python 3 (if not, why not?) I believe Pillow has the same API.
There have been a number of github projects in the space of preparing scanned documents that I have seen over the years. Unfortunately I can't find the best ones I remember so here are ones I found today:
Scantailor (https://github.com/scantailor/scantailor) is a large C++ project that appears to be very complete. ImproveQuality (https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuality) is also a cpp project meant for text scanning.
A mathematically interesting approach to deskewing is documented in http://www.ijstr.org/final-print/dec2013/An-Integrated-Skew-Detection-And-Correction-Using-Fast-Fourier-Transform-And-Dct.pdf where a Fast Fourier Transform is used to determine the skew without pre-analyzing the image to pull out text lines.
Phil Robare
-----Original Message-----
From: Chicago [mailto:chicago-bounces+proba=allstate.com at python.org] On Behalf Of Chris Vinzons
Sent: Thursday, November 03, 2016 2:52 PM
To: chicago at python.org
Subject: [Chicago] OpenALPR - Transformations
Hi,
I'm using OpenALPR to read still license plates, but the thing is that my sometimes that it doesn't read it correctly. I think this is because of the license plate is tilted. Is there a way to untilt it or is there some kind of training data I could do in python?
Thanks
Chris V
_______________________________________________
Chicago mailing list
Chicago at python.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.python.org_mailman_listinfo_chicago&d=DQICAg&c=gtIjdLs6LnStUpy9cTOW9w&r=VXIryE9UwJGlNMLzgMzDT4_t2NMrZf6alSphHwSEwC0&m=aGirqomLg7oSQWy-OKQqUWrYZDOqsWUYn7NEEJF2wo0&s=IbFXGkHqKjSJk4LX4ewkoVwyajgo6UOWIoSznB8I7ps&e=
More information about the Chicago
mailing list