Miguel Reis, Miguel Gaspar, Tomás Pacheco - May 7, 2024
As development for our project continues, new challenges are appear everyday as others are solved. Today, we are doing an in-depth explanation of our development process.
As of today, the AVRPR system can:
Take a photo of a license plate and store it;
Read license plates and process their contents into text (although not perfectly yet);
Detect the presence of a car through an ultrassonic sensor.
This blog will explain how the team managed to reach these goals, as well as share our dificulties and what we hope to achieve in the following weeks, in the plate-reading and image processing departments
Working out the code
Image processing is a massively important task in our project and, consequently, we have spent a lot of time and resources developing the necessary code for it. At the moment, we have 2 programs employing the opencv and pytesseract python libraries, which, upon receiving an image, detect a license plate and read its' contents, converting the text in the image to actual text. We are still deciding which one to use between the two, taking into account 2 main factors : Processing time and Accurancy.
Code #1
Code #1 is the simplest. The program can read, any photo in which the license plate is placed within 3 meters of the camera and perfectly facing it, with a near 0 degree angle. The biggest problem with this program is the fact that, due to the portuguese license plate having a "P" character on the left side, below the EU symbol, the program reads it as part of the actual license plate, as seen below:
Code #2
Code #2 is much more complex and, therefore, takes a longer time (compared to code #1) to fully process a license plate, even though this difference is negligible. It detects the outline of the license plate before reading its' content. This program is capable of reading plates across longer distances (10 meters, for example) and slightly inclined ones, making it, on paper, a better solution for our problem.
Unfortunately, this program has a considerably lower overall success rate in contrast to Code #1, while also having its' own problems. Any license plate with dirt or any type of sullying close to the border, as well as dimly lit pictures, are automatically not correctly processed.
The Raspberry Pi
Our system uses a Raspberry Pi module connected to a camera and an ultrassonic sensor in order to detect a car and take a photo of its' license plate, as the following diagram describes:
As of now, the camera is working correctly and can take photos and store them, and the motion sensor can detect an object in front of it and send a signal accordingly. We designed a protective case for the module equipped with a stabilizer for the camera, but, onfortunately, it was flawed, as the dimensions were off and it didnt include a space for the sensor yet:
We have decided, after this failure, to create a bigger case, in order to manage heat-related problems better, and add the aforementioned space for the sensor, keeping all the components in the same module.
What have we learned?
After these last weeks spent in the development of our system, we have continued to steadily improve our prototype. Through continuous coding using the python language and use of software such as SolidWorks, we have begun to understand the workings of a decently-sized project and how to communicate, improvise and adapt in order to achieve our objectives.
Our Objectives for the following weeks
By June, we hope to:
Have a functional case for our module;
Make the motion sensor and camera communicate directly with eachother and the raspberry Pi;
Increase the processing program's success rate, taking into account different circumstances and angles.
If our productivity maintains and work continues to be done, these objectives should be attainable.
We hope this blog post was informative and has helped you understand our goals better! Stay tuned for the next update right here in our site.
Yorumlar