A vehicle license plate detection method based on spatial clustering and time exposure

By employing spatial clustering and temporal exposure methods, and utilizing K-means clustering and adaptive exposure equalization, the traditional license plate detection algorithm is optimized, solving the accuracy and robustness issues of license plate recognition on small development board devices and achieving fast and efficient license plate detection.

CN116597433BActive Publication Date: 2026-07-10XIAMEN LICHENG INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN LICHENG INTELLIGENT TECH CO LTD
Filing Date
2023-05-23
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional image recognition methods suffer from poor accuracy, generalization ability, and robustness on small development board devices, making it difficult to achieve fast and efficient detection of vehicle license plate information.

Method used

A vehicle license plate detection method based on spatial clustering and temporal exposure is adopted. The K-means clustering algorithm is used to obtain the spatial strip recognition area of ​​the license plate, and the exposure is adaptively equalized by combining the temporal exposure law to optimize the license plate detection algorithm.

Benefits of technology

It improves the efficiency and accuracy of vehicle license plate detection, reduces false detection and missed detection rates, and adapts to license plate recognition under different exposure environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116597433B_ABST
    Figure CN116597433B_ABST
Patent Text Reader

Abstract

The application provides a vehicle license plate detection method based on spatial clustering and time sequence exposure, realizes fast and efficient detection and identification of vehicle license plate information of small development boards and other equipment through a traditional image recognition algorithm, and achieves high detection efficiency; a machine learning method is the best choice for vehicle license plate detection, but in order to adapt to small development board equipment with low computing power, a traditional image recognition algorithm is better; in order to solve the problems of poor precision, generalization ability and robustness of the traditional recognition method, a spatial license plate fast strip-shaped recognition area and a time sequence license plate efficient recognition area of image data of a video detection device are extracted, and a license plate spatial distribution and a time sequence exposure degree rule are obtained; on the basis of the traditional image recognition algorithm, the picture is optimized according to the rule, the algorithm pressure is relieved, the calculation time is reduced, the delay is reduced, the detection efficiency is improved, and the false detection rate and the missed detection rate are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent parking lots, and specifically relates to a vehicle license plate detection method based on spatial clustering and temporal exposure. Background Technology

[0002] Currently, image recognition methods are mainly divided into machine learning methods and traditional image recognition methods. Among them, deep learning, a type of machine learning method, can learn the inherent patterns and representational levels of sample data, enabling machines to have analytical and learning abilities, similar to humans, and to recognize data such as text, images, and sounds. Deep learning has high timeliness, reaching millisecond levels. However, because of this, deep learning requires a large amount of labeled training data, has high hardware requirements, and is relatively difficult to debug. Therefore, deep learning is mostly suitable for PCs, workstations, and other platforms with comprehensive functions and high computing power.

[0003] In everyday life, there are many small development boards that are low in power consumption and computing power but widely used. Compared to deep learning algorithms, traditional image recognition methods can adapt to the hardware requirements of small development boards and meet timeliness requirements. However, traditional recognition methods still suffer from poor accuracy, generalization ability, and robustness. This invention proposes a spatial clustering and temporal exposure method to extract the spatial fast strip recognition area and the temporal high-efficiency exposure recognition area of ​​license plates from video detection equipment image data, thereby obtaining the spatial distribution and temporal exposure rules of license plates. Based on traditional recognition algorithms, image optimization is performed according to the rules to alleviate algorithm pressure, reduce computation time, and improve detection efficiency while maintaining low latency, thereby reducing false detection and false detection rates.

[0004] In view of this, the applicant hereby submits this application after studying the existing technology. Summary of the Invention

[0005] The main technical problem solved by this invention is to provide a vehicle license plate detection method based on spatial clustering and temporal exposure, enabling small development boards and other devices to quickly and efficiently detect and identify vehicle license plate information using traditional image recognition algorithms.

[0006] The technical solution of this invention is implemented as follows: a vehicle license plate detection method based on spatial clustering and temporal exposure, the method comprising the following steps:

[0007] S1: Preprocess the interference data in the original image data captured by the vehicle license plate video detection equipment to remove the interference data;

[0008] S2: Perform preliminary license plate detection on the preprocessed data using the license plate detection algorithm, and extract the license plate candidate areas that meet the algorithm requirements;

[0009] S3: Spatial clustering of the license plate candidate center coordinate area is performed by K-means clustering algorithm to obtain a fast spatial strip recognition area for license plates, and to optimize the accurate spatial distribution of license plates in the license plate candidate area data;

[0010] S4: Extract the high-efficiency exposure recognition area for time-series license plates. By extracting the relationship between license plate time sequence and exposure, exposure distribution trend, and Gaussian distribution law of exposure, high-exposure areas are subjected to exposure-limited contrast adaptive equalization processing to obtain the high-efficiency exposure recognition area for time-series license plates, and the selection of exposure threshold in the license plate candidate area is optimized.

[0011] S5: Optimize the license plate detection algorithm. Based on step S4, obtain the spatial license plate fast strip recognition area and the time-series license plate high-efficiency exposure recognition area, and optimize the recognition area and exposure of the data image.

[0012] In a preferred embodiment, the vehicle license plate video detection device in step S1 specifically comprises:

[0013] The vehicle license plate video detection equipment is installed on the shoulder of the roadside parking lot to collect and capture the original RD dataset of vehicles parked in the roadside parking lot. The original RD dataset includes interference data Errori and preprocessed data PD.

[0014] In a preferred embodiment, the interference data in step S1 includes removing abnormal data Error1, redundant data Error2, and incomplete data Error3 from the original data;

[0015] The abnormal data Error1 is recognition data where license plate information is not present in the original data;

[0016] The redundant data Error2 consists of image data captured within a short time interval. This group of image data has similar information, and these data are considered redundant.

[0017] Error 3, referring to incomplete data, indicates that license plate information in the image data cannot be completely detected and recognized. This type of data needs to be deleted from the RD dataset.

[0018] As a preferred embodiment, the license plate detection algorithm in step S2 performs spatial pixel threshold detection of the image, edge detection of candidate regions, dilation and erosion operations on the image, and contour search and extraction of candidate regions.

[0019] As a preferred embodiment, the spatial pixel threshold detection is spatial blue HSV threshold detection.

[0020] As a preferred embodiment, the edge detection of the candidate region specifically adopts the adaptive threshold Canny edge detection algorithm. The parameter adaptation can avoid repeated parameter tuning and can be applied to edge detection of batch data.

[0021] In a preferred embodiment, the image dilation and erosion operations specifically involve dilating the license plate characters to fill the internal area based on the information features of the license plate, then performing an erosion operation to remove interfering small areas, and finally closing the image through a dilation-erosion closing operation.

[0022] As a preferred implementation, the contour search and extraction of the candidate area specifically adopts contour conditions that limit the aspect ratio and area size of the license plate. Once the license plate contour search is completed, the contour can be extracted. The contour range size is determined to complete the contour extraction. The extracted contour is the license plate candidate area. In the case of a lot of interference and invalid data, spatial clustering and temporal exposure optimization processing are required.

[0023] In a preferred embodiment, the spatial clustering in step S3 specifically employs the K-means clustering algorithm. By setting a parameter, namely the number of clusters to be classified, K, the algorithm uses K objects as the initial cluster centers Point. k For the data objects (X(i), Y(i)) in the sample, obtain their Euclidean distance Dist to the initial center. ed ;

[0024]

[0025] In the formula, X(i) and Y(i) represent the i-th data of each X-axis and Y-axis, respectively, and k represents the k-th cluster. There are a total of K clusters. The data objects are assigned to the class corresponding to the nearest cluster center according to the nearest distance criterion. The cluster centers are continuously updated until the cluster centers no longer change.

[0026] As a preferred embodiment, the spatial license plate rapid strip recognition area in step S3 specifically obtains each cluster center point Pointk of the license plate candidate area through the K-means clustering algorithm. The cluster points from left to right can be defined as Point1-PointK. The cluster radius R of the cluster center is obtained, and the cluster circle Circlek of each cluster point is drawn according to the cluster radius. The distance between each cluster center is D(ij).

[0027] The maximum external tangent, Tangentmax, is the external tangent of cluster circles Circlei and Circlej, and its external radius is determined by D(i,j). The minimum external tangent, Tangentmin, is the external tangent of cluster circles Circlei and Circlej, and its internal radius is determined by D(i,j). The maximum external tangent and the minimum internal tangent together constitute the spatial license plate fast strip recognition area Band.

[0028] Obtain the spatial license plate rapid strip recognition area to optimize the accurate spatial distribution of license plates in the license plate candidate area data.

[0029] As a preferred embodiment, the K value in the K-means clustering algorithm is determined by the elbow rule;

[0030]

[0031] In the formula, Ci represents the i-th cluster, p is a sample point in Ci, mi is a mass point of Ci, and SSE is the sum of squared errors, which is the clustering error of all samples and represents the quality of clustering. Solving the sum of squared errors determines the true clustering value K of the data.

[0032] In a preferred embodiment, in step S4, the time-series license plate high-efficiency exposure recognition area performs exposure detection on the license plate candidate area, obtains the exposure distribution trend under each time sequence and the overall exposure distribution trend, and applies the following Gaussian normal distribution formula:

[0033]

[0034] In the formula, σ2 represents the variance of the overall exposure, and μ represents the expected value of the overall exposure. This is used to obtain the normal distribution curve of the exposure, find the time-series exposure pattern, and perform equalization processing on the high-exposure data images based on the time-series exposure pattern to obtain the time-series license plate high-efficiency exposure recognition area, thereby optimizing the selection of the exposure threshold in the license plate candidate area data.

[0035] As a preferred embodiment, the high-exposure data image is subjected to equalization processing using a contrast-limited adaptive histogram equalization algorithm.

[0036] In a preferred embodiment, step S5 optimizes the license plate detection algorithm by using the spatial license plate fast strip recognition area obtained by the K-means clustering algorithm, and optimizes and cuts the background area that causes interference in the image data to improve detection efficiency. For high-exposure image data, the Limit Contrast Adaptive Histogram Equalization (CLAHE) algorithm is added to improve the license plate detection rate and reduce the false detection and missed detection rates.

[0037] After adopting the above technical solution, the beneficial effects of the present invention are:

[0038] For vehicle license plate detection, machine learning methods are the best choice to achieve high detection efficiency. However, traditional image recognition algorithms are better suited for small development board devices with lower computing power, in order to solve the problems of poor accuracy, generalization ability and robustness of traditional recognition methods.

[0039] This invention proposes a spatial clustering and temporal exposure method. By extracting the spatial fast strip recognition area and the temporal high-efficiency license plate recognition area from the image data of video detection equipment, the spatial distribution and temporal exposure patterns of license plates are obtained. Based on traditional image recognition algorithms, image optimization is performed according to these patterns to alleviate algorithmic pressure, reduce computation time, and improve detection efficiency while reducing latency, as well as lowering false detection and false negative rates.

[0040] In summary, this invention, based on traditional recognition algorithms, employs spatial clustering and temporal exposure to extract the spatiotemporal recognition region of license plates. This overcomes the slow speed and low efficiency of most traditional algorithms for image recognition, and also adapts to different exposure levels at different time intervals, thus enhancing license plate detection efficiency. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a schematic diagram of the overall processing flow of the present invention;

[0043] Figure 2 This is a flowchart of a traditional license plate detection algorithm according to the present invention;

[0044] Figure 3 This is a flowchart of a spatial clustering and temporal exposure algorithm of the present invention;

[0045] Figure 4 This is a spatial clustering result diagram according to an embodiment of the present invention;

[0046] Figure 5 This is a trend chart of overall exposure distribution according to an embodiment of the present invention. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0049] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0050] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0051] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention.

[0052] Example:

[0053] like Figures 1-5 As shown, a vehicle license plate detection method based on spatial clustering and temporal exposure includes the following steps:

[0054] Step S1. Acquisition and preprocessing of original vehicle license plate video detection equipment image data: Preprocessing some unreasonable interference data in the original image data captured by the vehicle license plate video detection equipment, and removing interference data;

[0055] Step S2. Perform preliminary license plate detection on the preprocessed data using the traditional license plate detection algorithm: extract license plate candidate areas that meet the requirements of the traditional algorithm;

[0056] Step S3. Extract the spatial license plate fast strip recognition area: Spatial clustering of the license plate candidate center coordinate area is performed by K-means clustering algorithm to obtain the spatial license plate fast strip recognition area, thereby optimizing the accurate spatial distribution position of license plates in the license plate candidate area data;

[0057] Step S4. Extract the time-series license plate high-efficiency exposure recognition area: Extract the relationship between license plate time sequence and exposure, exposure distribution trend and exposure Gaussian distribution law, perform exposure limiting contrast adaptive equalization processing on high exposure areas, obtain the time-series license plate high-efficiency exposure recognition area, thereby optimizing the selection of exposure threshold in the license plate candidate area data;

[0058] Step S5. Optimize the traditional license plate detection algorithm: Based on the spatial license plate fast strip recognition area and temporal license plate high-exposure recognition area obtained in the above steps, the recognition area and exposure of the data image are optimized to optimize the traditional algorithm architecture and achieve fast and efficient vehicle license plate detection.

[0059] In this embodiment, the preferred operating environment is the Linux operating system, the algorithm is written in C++ and Python 3.7, and the results are mainly displayed using the OpenCV tool.

[0060] The dataset used in this embodiment is data collected by a video detection device in a roadside parking lot in Taizhou City, Zhejiang Province, recording the parking situation of that parking space within a month.

[0061] According to this embodiment, preferably, the acquisition of the data image in step S1 specifically involves:

[0062] The video detection equipment is equipped with a radar detection device. When the detection radar detects a vehicle approaching and parking in the parking space, the video detection equipment starts shooting to collect the RD dataset of the vehicle's front end in the parking space.

[0063] The original RD dataset includes the interfering data Errori and the processed data PD, and its structure is as follows:

[0064] RD = {Error i ,PD,i=1,2,…,n}.

[0065] According to this embodiment, preferably, the preprocessing of the license plate recognition data in step S1 specifically involves:

[0066] Abnormal data (Error1), unrecognizable data (Error2), and redundant data (Error3) in the original license plate recognition data are deleted to improve the accuracy of data analysis and application.

[0067] The abnormal data Error1 indicates that the vehicle license plate information is missing in the data captured by the vehicle license plate video detection device; the research data in this embodiment is for vehicle license plate data, therefore data images that do not contain vehicle license plate information are removed from the original data.

[0068] The redundant data Error2 refers to the data images that the vehicle license plate video detection equipment takes in a short period of time when it detects a parked vehicle. These images have a small time difference between adjacent records and a high degree of similarity. Therefore, these images are considered redundant data and are deleted.

[0069] Error 3 indicates incomplete license plate information collection due to improper vehicle parking or obstruction preventing complete license plate recognition. Such data must be deleted.

[0070] According to this embodiment, preferably, the traditional license plate detection algorithm in step S2 is as follows:

[0071] like Figure 2 The diagram shows the flowchart of a traditional license plate detection algorithm. The specific process of the traditional license plate detection algorithm includes: spatial pixel thresholding of the PD data, edge detection of candidate regions, dilation and erosion operations on the image, and contour searching and extraction of candidate regions. Therefore, the structure of the traditional license plate detection algorithm is as follows:

[0072] Traditional={Pixel,Edge,Dilation,Erosion,Find,Extraction}.

[0073] According to this embodiment, preferably, the spatial pixel detection algorithm is as follows:

[0074] The spatial pixel detection algorithm is spatial blue HSV threshold detection, where the threshold range for blue license plates is H (80-140). In the PD dataset, the blue hue H of the candidate license plate areas is generally between 85-100, which meets the threshold requirement. The threshold for blue hue H increases with the intensity of light illuminating the license plate; areas in the data image that are not within this threshold range will be directly removed.

[0075] According to this embodiment, preferably, the edge detection algorithm in step S2 is as follows:

[0076] Traditional edge detection algorithms require repeated threshold adjustments, and single threshold adjustments cannot adapt to large amounts of data, resulting in poor detection performance. The adaptive threshold Canny edge detection algorithm is selected because its adaptive parameters avoid the problem of repeated parameter adjustments. It is more suitable for edge detection of batch data and achieves better detection results.

[0077] According to this embodiment, preferably, the expansion corrosion operation in step S2 specifically includes:

[0078] The expansion and erosion operation needs to be targeted and reasonable based on the characteristics of the license plate to achieve effective extraction of the license plate. For the license plate and its internal characters, the Close operation, which first expands and fills the internal area and then erodes to remove interfering small areas, is more effective.

[0079] According to this embodiment, preferably, the contour finding and extraction algorithm in step S2 is as follows:

[0080] The license plate candidate area contour search and extraction operation is the same as above, but parameter conditions need to be limited based on the unique features of the license plate, such as the aspect ratio and area size. The license plate contour search structure is as follows:

[0081] Find = {Ratio, Area, ...}.

[0082] Once the license plate outline is found, the outline can be extracted. The outline range is determined and the extraction is completed. The extracted outline is the license plate candidate area. This area contains a lot of interference and invalid data, so spatial clustering and temporal exposure optimization processing are required.

[0083] According to a preferred embodiment, the specific process of spatial clustering and temporal exposure is as follows:

[0084] like Figure 3As shown, for the candidate license plate area initially detected by the traditional license plate recognition algorithm, there are many misidentifications and interference backgrounds. Based on the spatial license plate fast strip recognition area obtained by the K-means clustering algorithm, the PD data image is cropped and optimized to improve the speed of license plate detection. The exposure Gaussian distribution pattern in the PD data is extracted, and the contrast-limited adaptive histogram equalization algorithm CLAHE is added to the high-exposure image data to improve the license plate detection efficiency and reduce the false detection and false detection rates.

[0085] According to this embodiment, preferably, the extraction of the spatial license plate rapid strip recognition area in step S3 specifically involves:

[0086] like Figure 4 As shown in the figure, the spatial clustering result of the center coordinates of the candidate area is obtained. For the candidate license plate area within one month obtained by the traditional algorithm in step S2, the spatial distribution of its center coordinates is obtained, and K-means clustering is performed on the center coordinates of the candidate area to realize the extraction of the spatial license plate fast strip recognition area, thereby optimizing the accurate spatial distribution of vehicles in the license plate candidate area data.

[0087] According to this embodiment, preferably, the K-means clustering algorithm in step S3 is:

[0088] The K-means clustering algorithm, as a classic algorithm for solving clustering problems, has a simple and fast detection method. For processing large datasets, the K-means clustering algorithm can maintain scalability and efficiency. When the clusters are close to a Gaussian distribution, the K-means clustering algorithm performs well.

[0089] The spatial clustering algorithm is the K-means clustering algorithm, which only requires setting one parameter, namely the number of clusters to be classified, K. This algorithm uses K objects as initial cluster centers Pointk, and for each data object (X(i), Y(i)) in the sample, obtains its Euclidean distance Disted from the initial centers.

[0090]

[0091] In the formula, X(i) and Y(i) represent the i-th data of each X-axis and Y-axis, respectively, and k represents the k-th cluster. There are a total of K clusters.

[0092] Data objects are assigned to the class corresponding to the nearest cluster center according to the nearest criterion, and the cluster centers are continuously updated until the cluster centers no longer change.

[0093] According to this embodiment, preferably, the algorithm for determining the K value is as follows:

[0094] The K-value in the K-means clustering algorithm is difficult to select directly due to the large volume and unknown nature of the data; therefore, it is determined using the elbow rule.

[0095]

[0096] In the formula, Ci represents the i-th cluster, p is a sample point in Ci, mi is a mass point of Ci, and SSE is the sum of squared errors, which is the clustering error of all samples and represents the quality of clustering. Solving for the sum of squared errors determines the true clustering value K of the data. Using the elbow rule, the optimal clustering value K for the current PD dataset is calculated to be 5, meaning there are 5 clusters.

[0097] like Figure 4 As shown, when the K-means clustering algorithm is used and the parameter K is set to 5, a total of five cluster centers (Point) appear. k The cluster points from left to right can be defined as Point1-Point5. Obtain the cluster radius R of the cluster center, and draw the cluster circle Circlek of each cluster point according to the cluster radius. The distance between each cluster center is D(i,j).

[0098] Based on the clustering circles shown in the diagram and the possible locations of license plates in the actual image data, the three solid-line clustering circles in the middle (Circle2, Circle3, and Circle5) are candidate areas for license plates, which are the spatial license plate fast recognition areas. The two dashed-line clustering circles above (Circle1 and Circle4) are interference background areas in the data image, which need to be cropped and removed during image recognition area optimization. The area below does not have a license plate center point distribution and mainly consists of the ground and vehicle chassis and tire areas, which do not need to be recognized and should be cropped and removed.

[0099] Find the maximum external tangent of cluster circles Circle2, Circle3, and Circle5. max and the smallest internal tangent Tangent min The largest external tangent is Tangent max The external tangents of clustering circles Circle3 and Circle5 are determined by their external tangent radii, which are denoted by D(3,5). The minimum external tangent is Tangent. min The external tangents of clustering circles Circle2 and Circle5 are defined by D(2,5), and their internal radii are determined by D(2,5). The maximum external tangent and the minimum internal tangent together form the spatial license plate rapid strip recognition area Band.

[0100] Band = {Point k ,R,Circle k D (i,j) Tangent max Tangent min ,k,i,j=1,2,…,k}.

[0101] like Figure 4 The solid line area shown represents the spatial license plate fast strip recognition area obtained by spatial clustering, while the dashed line area represents the interference area that affects the recognition of traditional algorithms. This interference area is optimized, cropped, and removed in the traditional recognition algorithm.

[0102] Therefore, before performing spatial blue HSV threshold detection in traditional algorithms, the original image can be optimized and cropped (Rect) to preserve the spatial clustering strip recognition area, thereby enabling rapid license plate recognition, improving recognition accuracy, and reducing false detection and missed detection rates.

[0103] According to this embodiment, preferably, the timing exposure processing in step S4 specifically includes:

[0104] Exposure detection is performed on the license plate candidate area to obtain the exposure distribution trend, overall exposure trend, and Gaussian distribution law of exposure at each time series, as shown below. Figure 5 As shown, the exposure threshold of the license plate candidate area is within the range of 60-255, and its overall exposure distribution trend conforms to a Gaussian normal distribution. Using the Gaussian normal distribution formula:

[0105]

[0106] In the formula, σ² represents the variance of the total exposure, and μ represents the expected value of the total exposure. The normal distribution curve of the exposure is obtained from this, and its normal distribution curve is plotted as follows: Figure 5 As shown, the time-series exposure pattern is found, and the high-exposure data images are processed by equalization based on the time-series exposure pattern to obtain the time-series license plate high-exposure recognition area, thereby optimizing the selection of exposure threshold in the license plate candidate area data.

[0107] The exposure of the license plate candidate area begins to increase from 5 AM as the sun rises and sunlight intensifies, causing the exposure threshold to rise continuously. During the day, sunlight has almost no impact on license plate recognition, but when direct sunlight shines on the license plate area, its exposure increases dramatically. As time progresses, at night, the video detection equipment automatically turns on supplementary lighting to obtain clear data images, increasing the exposure of the captured image. Furthermore, because of roadside parking lots, the surrounding roadside environment, and the headlights of vehicles in front and behind all increase the exposure of the license plate area, nighttime conditions are often high-exposure, requiring exposure equalization processing.

[0108] According to this embodiment, preferably, the exposure equalization processing specifically includes:

[0109] Based on the exposure time sequence, there will be overexposure of the license plate area under direct sunlight at noon and various lighting conditions at night. It is necessary to perform exposure equalization processing on the overexposure area to improve the effective recognition area of ​​the license plate.

[0110] The exposure equalization processing algorithm is the Limiting Contrast Adaptive Histogram Equalization (CLAHE) algorithm, which judges the exposure of data images and performs Limiting Contrast Adaptive Histogram Equalization on data images with excessively high average exposure thresholds. This effectively reduces high exposure and improves the license plate detection rate under direct sunlight at noon and complex lighting conditions at night.

[0111] According to this embodiment, preferably, the optimization of the traditional algorithm in step S5 specifically involves:

[0112] For traditional license plate recognition algorithms, which employ spatial blue HSV threshold detection, adaptive Canny edge detection in candidate regions, image dilation and erosion closing operations, and candidate region contour searching and extraction, a new approach is proposed. Based on spatial clustering, a fast spatial license plate strip recognition area is obtained. Before spatial blue HSV threshold detection, the license plate data image recognition area is cropped and optimized (Rect) to remove interference areas and retain the fast license plate strip recognition area, thus improving the detection speed of traditional algorithms. Furthermore, based on temporal exposure patterns, exposure detection is performed on the license plate candidate areas to determine if the exposure meets the temporal exposure requirements. For areas that do not meet the temporal exposure rules, adaptive contrast equalization (HLAHE) is applied, achieving efficient and accurate license plate information extraction.

[0113] The optimized traditional recognition algorithm structure is as follows:

[0114] Traditional_new={Rect,HSV,Canny,Close,Find,Extraction,CLAHE}.

[0115] This invention focuses on the spatial clustering and temporal patterns of license plate candidate areas, reflecting the fast and efficient identification zone for parked vehicles in roadside parking lots. It also uncovers the temporal distribution of license plate exposure and shows that the overall exposure distribution trend of license plates conforms to a Gaussian normal distribution. By combining the dimensions of spatial clustering and temporal exposure patterns, the fast and efficient identification zone for license plates is discovered. The K-means clustering algorithm is combined with temporal exposure to make the license plate detection and recognition speed faster, the detection rate higher and more accurate, and the false detection and missed detection rates lower.

[0116] It should be understood that although this specification describes various embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. Technical solutions in multiple embodiments can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

[0117] The detailed descriptions listed above are merely specific illustrations of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A vehicle license plate detection method based on spatial clustering and temporal exposure, characterized in that, The method includes the following steps: S1: Preprocess the interference data in the original image data captured by the vehicle license plate video detection equipment to remove the interference data; S2: Perform preliminary license plate detection on the preprocessed data using the license plate detection algorithm, and extract the license plate candidate areas that meet the algorithm requirements; S3: Spatial clustering of the license plate candidate center coordinate area is performed by K-means clustering algorithm to obtain a fast spatial strip recognition area for license plates, and to optimize the accurate spatial distribution of license plates in the license plate candidate area data; The spatial clustering in step S3 specifically employs the K-means clustering algorithm. By setting a parameter, namely the number of clusters to be classified, K, this algorithm uses K objects as the initial cluster centers Point. k For the data objects (X) in the sample (i) ,Y (i) ), obtain their Euclidean distances Dist to the initial center. ed ; Where X (i) ,Y (i) Let i represent the i-th data point on each X-axis and Y-axis respectively, and k represent the k-th cluster. There are a total of K clusters. Data objects are assigned to the class corresponding to the nearest cluster center according to the nearest distance criterion. The cluster centers are continuously updated until the cluster centers no longer change. In step S3, the spatial license plate rapid strip recognition area specifically obtains the cluster center points (Points) of each license plate candidate area using the K-means clustering algorithm. k The cluster points from left to right can be defined as Point1-Point1. K Obtain the cluster radius R of the cluster centers, and draw the cluster circle for each cluster point based on the cluster radius. k The distance between each cluster center is D. (i.j) ; The largest external tangent is Tangent max For clustering circles i and clustering circle j The external tangent line, whose external radius is given by D (i,j) Determine the minimum external tangent Tangent min For clustering circles i and clustering circle j The radius of the outer tangent line is determined by D(i,j), and the maximum outer tangent line and the minimum inner tangent line constitute the spatial license plate fast strip recognition area Band; To obtain a rapid strip-shaped recognition area for license plates in space, thereby optimizing the accurate spatial distribution of license plates in the license plate candidate area data; The K value in the K-means clustering algorithm is determined using the elbow rule; In the formula, Ci represents the i-th cluster, p is the sample point in Ci, mi is the mass point of Ci, and SSE is the sum of squared errors, which is the clustering error of all samples and represents the quality of clustering. Solving the sum of squared errors determines the true clustering K value of the data. In step S4, the time-series license plate high-efficiency exposure recognition area performs exposure detection on the license plate candidate area, obtains the exposure distribution trend under each time series and the overall exposure distribution trend, and applies the following Gaussian normal distribution formula: In the formula, σ2 represents the variance of the overall exposure, and μ represents the expected value of the overall exposure. This is used to obtain the normal distribution curve of the exposure, find the time-series exposure pattern, and perform equalization processing on the high-exposure data images based on the time-series exposure pattern to obtain the time-series license plate high-efficiency exposure recognition area, thereby optimizing the selection of the exposure threshold in the license plate candidate area data. S4: Extract the high-efficiency exposure recognition area for time-series license plates. By extracting the relationship between license plate time sequence and exposure, exposure distribution trend, and Gaussian distribution law of exposure, high-exposure areas are subjected to exposure-limited contrast adaptive equalization processing to obtain the high-efficiency exposure recognition area for time-series license plates, and the selection of exposure threshold in the license plate candidate area is optimized. S5: Optimize the license plate detection algorithm. Based on step S4, obtain the spatial license plate fast strip recognition area and the time-series license plate high-efficiency exposure recognition area, and optimize the recognition area and exposure of the data image.

2. The vehicle license plate detection method based on spatial clustering and temporal exposure as described in claim 1, characterized in that: The vehicle license plate video detection device in step S1 is specifically: The vehicle license plate video detection equipment is installed on the shoulder of the roadside parking lot to collect and capture the original RD dataset of vehicles parked in the roadside parking lot. The original RD dataset includes interference data Errori and preprocessed data PD.

3. The vehicle license plate detection method based on spatial clustering and temporal exposure as described in claim 1, characterized in that: The interference data in step S1 includes removing abnormal data Error1, redundant data Error2, and incomplete data Error3 from the original data. The abnormal data Error1 is recognition data where license plate information is not present in the original data; The redundant data Error2 consists of image data captured within a short time interval. This group of image data has similar information, and these data are considered redundant. Error 3, referring to incomplete data, indicates that license plate information in the image data cannot be completely detected and recognized. This type of data needs to be deleted from the RD dataset.

4. The vehicle license plate detection method based on spatial clustering and temporal exposure as described in claim 1, characterized in that: The license plate detection algorithm in step S2 performs spatial pixel threshold detection of the image, edge detection of candidate regions, dilation and erosion operations on the image, and contour search and extraction of candidate regions.

5. The vehicle license plate detection method based on spatial clustering and temporal exposure as described in claim 4, characterized in that: The contour search and extraction of the candidate area specifically adopts contour conditions based on the aspect ratio and area size of the license plate. Once the license plate contour search is completed, the contour can be extracted. The extracted contour is the candidate area for the license plate. In the case of a lot of interference and invalid data, spatial clustering and temporal exposure optimization processing are required.

6. The vehicle license plate detection method based on spatial clustering and temporal exposure as described in claim 1, characterized in that, In step S5, the license plate detection algorithm is optimized based on the spatial license plate fast strip recognition area obtained by the K-means clustering algorithm. The background area that causes interference in the image data is optimized and cropped (Rect) to improve the detection efficiency. For high-exposure image data, the contrast-limited adaptive histogram equalization algorithm (CLAHE) is added to improve the license plate detection rate and reduce the false detection and missed detection rates.