Introduction to Image Recognition Principles

Original works only, first published, no reprints.

Generally speaking, the theoretical basis for license plate recognition is image segmentation and image recognition theory: First, analyze and process the image containing the vehicle license plate to determine the position of the license plate in the image and extract the license plate area, and then further recognize the text characters on it. The license plate recognition process includes a series of algorithmic operations such as image acquisition, preprocessing, license plate localization, character segmentation, character recognition, and result output, with the operational flow as shown in the figure below:

Introduction to Image Recognition Principles

1

Image Acquisition

Image acquisition methods are divided into static and dynamic: Static acquisition relies on ground sensing coils, infrared or radar devices. When a vehicle passes, these devices trigger the camera to capture an image immediately. The advantage of this method is its high triggering rate and stable performance, while the downside is the need to cut the ground to lay coils, which involves significant construction work.
Dynamic acquisition is conducted in real-time video mode without requiring any triggering signals from other sensing devices to the camera, relying entirely on algorithms to capture vehicle information from real-time video stream images. The advantage of this method is convenient construction, as it does not require the installation of other sensing devices or components. However, its drawbacks are significant; due to algorithm limitations, the triggering rate and recognition rate of dynamic acquisition are slightly lower than those of static acquisition.

2

Preprocessing

Images captured by cameras are often affected by lighting, weather, camera position, and other factors. Therefore, after obtaining the vehicle image, some preprocessing is necessary to ensure the clearest image of the license plate.
Preprocessing can occur in two stages: First, set the camera’s attribute parameters in advance based on the site environment when installing the camera, such as setting the camera for automatic exposure, automatic white balance, automatic backlight handling, and automatic overexposure handling. Second, after the image is captured, perform noise filtering, contrast enhancement, image scaling, and other processing.
Common denoising methods include mean filtering, median filtering, and Gaussian filtering; common methods for enhancing contrast include linear contrast stretching, histogram equalization, and homomorphic filtering; common methods for image scaling include nearest neighbor interpolation, bilinear interpolation, and cubic convolution interpolation. The preprocessing stage is critical, as the quality of processing directly affects the accuracy of subsequent license plate recognition.

Introduction to Image Recognition Principles

3

License Plate Localization

For simple license plate recognition, we only need the rectangular image of the license plate itself; other parts of the image may be omitted. Therefore, accurately detecting the license plate area from the entire image is crucial. Any errors or incomplete extractions will directly lead to recognition failure.
License plate localization methods generally rely on license plate texture features, color features, and shape features to detect license plates using algorithms such as projection analysis, connected component analysis, and machine learning. The projection analysis method utilizes the characteristic that the number of times the license plate characters alternate with the background is greater than in other parts, using horizontal and vertical projection analysis of the image to locate the license plate.
Connected component analysis is based on the feature that each character in the license plate is a connected component with consistent structure and color, detecting and merging these connected components to locate the license plate.
Machine learning algorithms train a weak classifier into a strong classifier using features extracted from many license plate samples to locate the license plate area in the image. However, due to the complex environmental backgrounds on real-time roads, and the impossibility of ensuring all license plate images are clear, it is easy to mistakenly identify similar rectangular road facilities as license plates. Therefore, effectively eliminating false license plates, improving localization accuracy, and increasing recognition speed has always been a challenge in the field of machine learning.

Introduction to Image Recognition Principles

4

License Plate Correction

Due to factors such as shooting angles, license plates in images inevitably exhibit various deformations. To avoid complications in the subsequent recognition process, the extracted license plate area needs to be corrected to remove noise such as license plate borders, which is beneficial for character recognition.
Common correction methods currently include: Hough transform, which calculates the tilt angle by detecting the straight lines of the upper and lower borders and the left and right borders of the license plate; rotation projection method, which projects the image vertically on the horizontal axis at different angles, with the angle at which the sum of the projection values at points where the projection value is 0 is maximized being the vertical tilt angle; the calculation method for the horizontal angle is similar; principal component analysis, which determines the horizontal tilt angle of the license plate based on the fixed color pairing characteristic at the boundary between the license plate background and characters by finding the principal component direction of the color at feature points.

Introduction to Image Recognition Principles

5

Character Segmentation

After extracting the license plate area, it is necessary to segment the license plate area character by character to determine how many characters are present in the license plate, the positional relationships between characters, and other information, ensuring correct license plate type matching and character recognition.

The main idea of this process is to utilize the binarization results or edge extraction results of the license plate, leveraging structural features of characters, similarities between characters, and spacing between characters to extract individual characters separately, including handling special cases of connected and broken characters; on the other hand, characters with similar width and height are grouped together to remove the license plate border and some minor noise. Commonly used algorithms include: connected component analysis, projection analysis, character clustering, and template matching.

6

Character Recognition

Normalize the grayscale images of the segmented characters, extract features, and then match them with character database templates using machine learning or template matching, finally selecting the result with the highest matching degree as the recognition result, with easily confused characters including: 0 and D, 0 and Q, 2 and Z, 8 and B, 5 and S, 6 and G, 4 and A, etc.
Common character recognition algorithms include: template matching, artificial neural networks, support vector machines, and Adaboost classification. The advantage of template matching is its fast recognition speed and simplicity, while its disadvantage is the difficulty in handling broken or dirty characters; artificial neural networks have strong learning ability, adaptability, and classification capability but are relatively time-consuming.
Support vector machines have better recognition capabilities for unseen test samples and require fewer training samples; Adaboost classification can focus on more important training data, with fast recognition speed and high real-time performance. In China, license plates consist of Chinese characters, English letters, and Arabic numerals, and have a unified style, which also facilitates the recognition process.

Introduction to Image Recognition Principles

7

License Plate Result Output

Output the license plate recognition results in text format, including license plate number, license plate color, license plate type, etc.

Introduction to Image Recognition Principles

Leave a Comment