A method and device for determining the authenticity of license plates
By detecting license plate trajectories using cameras and employing machine learning models to determine the authenticity of license plates, the problem of counterfeit license plates evading tolls has been solved, achieving automatic identification and reducing manual workload in determining the authenticity of license plates.
Patent Information
- Application Number
- CN202210324982.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-03-30
AI Technical Summary
Current technology cannot effectively distinguish whether a license plate is genuine or not, leading some drivers to use counterfeit license plates to evade parking fees. Furthermore, it requires manual verification of the authenticity of license plate trajectories, which is a labor-intensive process.
The system detects license plate trajectories using cameras, extracts trajectory features, and inputs them into a pre-trained machine learning model. The machine learning model, built using the Adaboost algorithm, determines the authenticity of the license plate trajectory, distinguishing between genuine and counterfeit license plates.
Automatic identification of license plate authenticity prevents drivers from using counterfeit license plates to evade tolls, reduces manual workload, and improves identification efficiency and accuracy.
Smart Images

Figure CN115082912B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of license plate recognition, and in particular to a method and apparatus for determining the authenticity of a license plate. Background Technology
[0002] In order to calculate parking fees based on the time of entry and exit of vehicles, paid parking lots need to obtain the license plate number of the vehicle when it enters the parking lot and record the time of entry and exit. Current technology only records the license plate number and the time of entry and exit. Some drivers, in order to evade parking fees, often use counterfeit license plates instead of real ones. If the counterfeit license plate number is detected before the real license plate number is detected, these drivers can enter and exit the parking lot without paying. For example, a driver might photograph the license plate of another vehicle in the parking lot and use that number to create a fake license plate on their phone, paper, or other means to replace the real license plate on their vehicle. The method of only recording the license plate number and the time of entry and exit cannot determine whether the detected license plate is the real one on the vehicle. Summary of the Invention
[0003] The purpose of this invention is to provide a method and apparatus for determining the authenticity of license plates. This method can detect and distinguish whether a current license plate is a genuine license plate located on a vehicle, thus preventing drivers from using counterfeit license plates to evade parking fees. Furthermore, it reduces the workload of manually determining the authenticity of license plate trajectories.
[0004] To solve the above-mentioned technical problems, the present invention provides a method for determining the authenticity of a license plate, comprising:
[0005] When the camera detects the current license plate in the image frame captured by the camera in the preset area, the trajectory of the current license plate is determined.
[0006] Extract current trajectory features from the current license plate trajectory;
[0007] The current trajectory features are input into a pre-trained machine learning model to determine the authenticity of the current license plate trajectory. The machine learning model is pre-trained from a training set including trajectory features of a first preset number of real license plate trajectories and trajectory features of a second preset number of fake license plate trajectories.
[0008] If the current license plate trajectory is a real license plate trajectory, then the current license plate is determined to be a real license plate located on the vehicle;
[0009] If the current license plate trajectory is a forged license plate trajectory, then the current license plate is determined to be a forged license plate that is not located on the vehicle.
[0010] Preferably, determining the current license plate trajectory includes:
[0011] When the current license plate number is detected in the image frame, the position of the license plate frame containing the current license plate number in the image frame is determined.
[0012] When the preset stop acquisition condition for the position of the license plate frame in the image frame is met, the determination of the position of the license plate frame of the current license plate number in the image frame is stopped.
[0013] The current license plate trajectory is determined based on the determined position of the license plate frame in the image frame.
[0014] Preferably, when determining the position of the license plate frame containing the current license plate number within the image frame, the process includes:
[0015] The standard license plate number is determined by taking the image frame in which the current license plate number is first detected as the first frame and the license plate numbers detected in N consecutive image frames, where N is an integer not less than 2;
[0016] Based on the standard license plate number, determine whether the number of identical characters in the license plate number detected in the current image frame and the license plate number detected in the previous image frame is less than the first preset number of characters;
[0017] If the number of characters is not less than the first preset number, then the position of the license plate frame corresponding to the current license plate number in the image frame is retained;
[0018] If the number of characters is less than the first preset number, then delete the position of the license plate frame corresponding to the current license plate number in the image frame;
[0019] Determining the current license plate trajectory based on the determined position of the license plate frame in the image frame includes:
[0020] The current license plate trajectory is determined based on the position of the license plate frame corresponding to the current image frame within the image frame.
[0021] Preferably, after determining the current license plate trajectory based on the position of the license plate frame corresponding to the current image frame in the retained image frame, the method further includes:
[0022] S201: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame;
[0023] S202: Determine whether the license plate number detected in the current image frame is the same as the license plate number detected in the two image frames before and after the current image frame; if they are the same, proceed to S203; if they are not the same, proceed to S204.
[0024] S203: Retain the license plate frame corresponding to the current image frame in the current license plate trajectory;
[0025] S204: Delete the license plate frame corresponding to the current image frame in the current license plate trajectory;
[0026] S205: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S206; if it is the last frame, proceed to S207.
[0027] S206: Take the next frame of the current image frame as the latest current image frame and return to S202;
[0028] S207: Obtain the latest current license plate trajectory.
[0029] Preferably, after obtaining the latest current license plate trajectory, it includes:
[0030] S301: Determine the image frame corresponding to the first license plate frame in the current license plate trajectory as the current image frame;
[0031] S302: Determine whether there is an intersection-union ratio (IU) between the license plate frame and the license plate frame in the current image frame and the license plate frame in the current image frame in the current license plate trajectory that is greater than a preset IU; if there is an IU greater than the preset IU, proceed to S303; if there is no IU greater than the preset IU, proceed to S304.
[0032] S303: Delete license plate frames in the current license plate trajectory whose intersection-union ratio with the license plate frame in the current image frame is greater than a preset intersection-union ratio;
[0033] S304: Maintain the current license plate trajectory;
[0034] S305: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S306; if it is the last frame, proceed to S307.
[0035] S306: Take the next frame of the current image frame as the latest current image frame and return to S302;
[0036] S307: Obtain the latest current license plate trajectory.
[0037] Preferably, when the current trajectory features include the total number of back frames on the X-axis and the total number of back frames on the Y-axis, the current trajectory features are extracted from the current license plate trajectory, including:
[0038] S401: Determine the coordinates of the center of each license plate frame in the current license plate trajectory in a preset coordinate system, where the horizontal axis of the preset coordinate system is the X-axis and the vertical axis is the Y-axis;
[0039] S402: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame;
[0040] S403: Determine whether the X-axis coordinate value of the center point of the license plate frame in the current image frame and the X-axis coordinate value of the center point of the license plate frame in the previous image frame satisfy a preset X-axis coordinate value comparison relationship.
[0041] S404: If the preset X-axis coordinate value comparison relationship is not satisfied, then the current image frame is determined to be a backward frame on the X-axis;
[0042] S405: If the preset X-axis coordinate value comparison relationship is satisfied, then the current image frame is determined to be a normal frame on the X-axis;
[0043] S406: Determine whether the Y-axis coordinate value of the center point of the license plate frame in the current image frame and the Y-axis coordinate value of the center point of the license plate frame in the previous image frame satisfy a preset Y-axis coordinate value comparison relationship.
[0044] S407: If the preset Y-axis coordinate value comparison relationship is not satisfied, then the current image frame is determined to be a backward frame on the Y-axis;
[0045] S408: If the preset Y-axis coordinate value comparison relationship is satisfied, then the current image frame is determined to be a normal frame on the Y-axis;
[0046] S409: Determine whether the current image frame is the last frame in the current license plate trajectory;
[0047] S410: If it is not the last frame, then take the next frame of the current image frame as the latest current image frame and return to S403;
[0048] S411: If it is the last frame, then determine the total number of back frames on all X-axis and the total number of back frames on all Y-axis.
[0049] Preferably, when the current trajectory features include a trajectory region, a start region, and an end region, extracting the current trajectory features from the current license plate trajectory includes:
[0050] Determine the coordinates of the center of each license plate frame in the current license plate trajectory in a preset coordinate system, where the horizontal axis is the X-axis and the vertical axis is the Y-axis.
[0051] The smallest bounding rectangle containing all the coordinate points is determined as the trajectory region of the current license plate feature;
[0052] The first license plate frame in the current license plate trajectory is taken as the starting area of the current license plate trajectory;
[0053] The last license plate frame in the current license plate trajectory is taken as the end area of the current license plate trajectory.
[0054] Preferably, when the current trajectory features include average velocity along the X-axis, average velocity along the Y-axis, average slope, variance along the X-axis, and variance along the Y-axis, extracting the current trajectory features from the current license plate trajectory includes:
[0055] S501: Determine the coordinates of the center of each license plate frame in the current license plate trajectory in a preset coordinate system, where the horizontal axis is the X-axis and the vertical axis is the Y-axis.
[0056] S502: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame;
[0057] S503: Determine the slope between the coordinates of the center of the license plate frame in the current image frame and the coordinates of the center of the license plate frame in the previous image frame.
[0058] S504: Determine the velocity on the X-axis between the coordinates of the center of the license plate frame in the current image frame and the coordinates of the center of the license plate frame in the previous image frame.
[0059] S505: Determine the velocity on the Y-axis between the coordinates of the center of the license plate frame in the current image frame and the coordinates of the center of the license plate frame in the previous image frame.
[0060] S506: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S507; if it is the last frame, proceed to S508.
[0061] S507: Take the next frame of the current image frame as the latest current image frame and return to S503;
[0062] S508: Determine the average speed of the current license plate trajectory along the X-axis based on the determined speeds on each of the X-axis;
[0063] S509: Determine the average speed of the current license plate trajectory along the Y-axis based on the determined speeds along each of the Y-axis;
[0064] S510: Determine the average slope of the current license plate trajectory based on the determined individual slopes;
[0065] S511: Determine the X-axis variance of the current license plate trajectory based on the determined average speed on the X-axis and the speed on each of the X-axis;
[0066] S512: Determine the Y-axis variance of the current license plate trajectory based on the determined average speed on the Y-axis and the speeds on each Y-axis.
[0067] Preferably, the machine learning model is a machine learning model built based on the Adaboost algorithm.
[0068] The present invention also provides a device for determining the authenticity of a license plate, comprising:
[0069] Memory, used to store computer programs;
[0070] A processor is used to execute the computer program to implement the steps of the method for determining the authenticity of a license plate as described above.
[0071] This invention provides a method and apparatus for determining the authenticity of license plates. When a camera detects a license plate in an image frame captured by a camera over a preset area, the current license plate trajectory is determined. Trajectory features are extracted from the trajectory and then input into a pre-trained machine learning model. This model is trained on a training set containing trajectory features of a first preset number of genuine license plate trajectories and a second preset number of forged license plate trajectories. The machine learning model can determine the authenticity of the current license plate trajectory. Finally, the authenticity of the license plate is determined based on the machine learning model's assessment of the first trajectory feature. This method can detect and distinguish whether the current license plate is a genuine license plate on a vehicle, preventing drivers from using forged license plates to evade parking fees. Furthermore, it reduces the workload of manually determining the authenticity of license plate trajectories. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments 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.
[0073] Figure 1 A flowchart of a method for determining the authenticity of a license plate provided by the present invention;
[0074] Figure 2 This invention provides a schematic diagram of the current license plate trajectory.
[0075] Figure 3 This is a schematic diagram of another current license plate trajectory provided by the present invention;
[0076] Figure 4 This is a schematic diagram of another current license plate trajectory provided by the present invention;
[0077] Figure 5 This invention provides a schematic diagram of the coordinates of the center of the license plate frame in a preset coordinate system within the current license plate trajectory.
[0078] Figure 6 A schematic diagram of the structure of a device for determining the authenticity of a license plate provided by the present invention. Detailed Implementation
[0079] The core of this invention is to provide a method and apparatus for determining the authenticity of license plates. This method can detect and distinguish whether a current license plate is a genuine license plate located on a vehicle, thus preventing drivers from using counterfeit license plates to evade parking fees. Furthermore, it reduces the workload of manually determining the authenticity of license plate trajectories.
[0080] 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 some embodiments of the present invention, not all embodiments. 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.
[0081] Please refer to Figure 1 , Figure 1 A flowchart of a method for determining the authenticity of a license plate provided by the present invention includes:
[0082] S101: When the camera detects the current license plate in the image frame captured by the camera in the preset area, determine the current license plate trajectory;
[0083] S102: Extract current trajectory features from the current license plate trajectory;
[0084] S103: Input the current trajectory features into a pre-trained machine learning model to determine the authenticity of the current license plate trajectory. The machine learning model is pre-trained from a training set including trajectory features of a first preset number of real license plate trajectories and trajectory features of a second preset number of fake license plate trajectories.
[0085] S104: If the current license plate trajectory is a real license plate trajectory, determine that the current license plate is a real license plate located on the vehicle;
[0086] S105: If the current license plate trajectory is a counterfeit license plate trajectory, determine that the current license plate is a counterfeit license plate that is not located on the vehicle.
[0087] In order to determine the authenticity of a license plate, in this embodiment, when the current license plate is detected in the image frame captured by the camera in a preset area, the current license plate trajectory is determined, the current trajectory features required for subsequent steps are extracted from the current license plate trajectory, and then the current trajectory features are input into a pre-trained machine learning model to determine the authenticity of the current license plate trajectory. The machine learning model is obtained by training a training set that includes trajectory features of a first preset number of real license plate trajectories and trajectory features of a second preset number of fake license plate trajectories. If the current license plate trajectory is determined to be a real license plate trajectory, then the current license plate is determined to be a real license plate located on the vehicle. If the current license plate trajectory is determined to be a fake license plate trajectory, then the current license plate is determined to be a license plate not located on the vehicle, that is, a fake license plate. The authenticity of the license plate can be determined by the current license plate trajectory.
[0088] Specifically, when vehicles enter and exit parking lots, some drivers, in order to evade parking fees, may take photos of other vehicles' license plates beforehand. They then use these plates to create paper license plates, physical license plates that resemble real license plates, or even images containing other vehicles' license plates to submit to the parking lot gate's camera. These are all counterfeit license plates. A real license plate is located on the vehicle itself, usually on the lower front of the vehicle. When vehicles enter and exit parking lots, the routes are usually fixed, so the movement of the license plate follows a specific pattern. However, when drivers use counterfeit license plates, this pattern is usually disrupted. For example, when a vehicle enters the parking lot... The driving route is to turn left first and then go straight. When the vehicle reaches the parking lot gate, the license plate detected by the camera will form a trajectory from the upper right to the lower left of the shooting area. Since the driving route into the parking lot is fixed, the trajectory of a genuine license plate should always be from the upper right to the lower left of the shooting area. If, before the camera detects the genuine license plate, the driver holding a counterfeit license plate walks into the shooting area, the driver's hand holding the counterfeit license plate will shake during the movement, and the driver's movement is not affected by the driving route. Therefore, the trajectory of a counterfeit license plate is usually very different from that of a genuine license plate, and may even be a wavy trajectory. Thus, the authenticity of the license plate can be determined based on the trajectory. Furthermore, considering the possibility of falsely detecting passing vehicles, a preset area can be set within the camera's shooting area. Subsequent steps will only be performed when the current license plate is detected within the preset area.
[0089] After determining the current license plate trajectory, it is necessary to extract the current trajectory features from it. These features can represent the specific patterns of the vehicle's movement trajectory when entering and exiting the parking lot. The extracted features are then input into a pre-trained machine learning model to determine the authenticity of the license plate trajectory. The machine learning model can be, but is not limited to, a model built using the Adaboost algorithm. First, a training set is established containing trajectory features of a first preset number of genuine license plate trajectories and a second preset number of trajectory features of fake license plate trajectories. Depending on the requirements of the machine learning model in practical applications, the first and second preset numbers can be changed accordingly; this application does not limit this. Then, a weak classifier is constructed using the training set. These weak classifiers are combined to form a strong classifier. During training, the weights of correctly classified trajectory features decrease, while the weights of misclassified trajectory features increase, and the confidence level gradually increases. The Adaboost algorithm obtains the machine learning model through this training method. When the user determines that the confidence level meets the actual usage requirements, the machine learning model is considered to be trained successfully. The trained machine learning model is then put into practical applications, and it can determine the authenticity of the current license plate trajectory. Once the machine learning model determines the authenticity of the current license plate trajectory, it can then be used to determine the authenticity of the current license plate. If the current license plate trajectory is a genuine license plate trajectory, the current license plate is genuine; if the current license plate trajectory is a forged license plate trajectory, the current license plate is forged.
[0090] In addition to using the AdaBoost algorithm to build the machine learning model, this application may also use other algorithms that can build the machine learning model. This application does not limit the algorithm used to build the machine learning model.
[0091] In summary, when the camera detects a license plate in an image frame captured by the camera within a preset area, it determines the current license plate trajectory, extracts trajectory features from this trajectory, and then inputs these features into a pre-trained machine learning model. This model is trained on a training set containing trajectory features from a first preset number of genuine license plate trajectories and a second preset number of forged license plate trajectories. The machine learning model can determine the authenticity of the current license plate trajectory. Finally, based on the machine learning model's judgment of the first trajectory features, the authenticity of the current license plate is determined. This system can detect and distinguish whether the current license plate is a genuine license plate on a vehicle, preventing drivers from using forged license plates to evade parking fees. Furthermore, it reduces the workload of manually determining the authenticity of license plate trajectories.
[0092] Based on the above embodiments:
[0093] As a preferred embodiment, determining the current license plate trajectory includes:
[0094] When the current license plate number is detected in the image frame, the position of the license plate frame containing the current license plate number in the image frame is determined.
[0095] When the preset stop acquisition condition for the position of the license plate frame in the image frame is met, the determination of the position of the license plate frame of the current license plate number in the image frame is stopped.
[0096] The current license plate trajectory is determined based on the position of the license plate frame in the image frame.
[0097] In order to easily determine the current license plate trajectory, in this embodiment, when the current license plate number is detected in the image frame, the position of the license plate frame containing the current license plate number in the image frame is determined. When the preset stop acquisition condition of the position of the license plate frame in the image frame is met, the determination of the position of the license plate frame containing the current license plate number in the image frame is stopped. Then, based on the determined position of the license plate frame in the image frame, the current license plate trajectory is determined. The current license plate trajectory before the vehicle passes through the gate can be determined, so as to determine the authenticity of the current license plate trajectory.
[0098] Specifically, when the camera detects a license plate number in an image frame captured within a preset area, it indicates a vehicle intends to enter or exit the parking lot. At this point, the position of the license plate frame corresponding to that license plate number in the image frame is determined. When the preset stop acquisition condition for the license plate frame position in the image frame is met, it indicates that the gate may need to be opened to allow the vehicle to pass. At this point, the determination of the license plate frame position is stopped. During the period from the start to the stop of determination, the various positions of the license plate frame in the image frame from the time the license plate number appears in the preset area until the gate opens are determined. Finally, based on these determined positions of the license plate frame in the image frame, the current license plate trajectory is determined, which can easily determine the current license plate trajectory. Please refer to [link / reference]. Figure 2 , Figure 2 This invention provides a schematic diagram of the current license plate trajectory, as shown below. Figure 2 The license plate frame at the far right of each license plate frame in the license plate trajectory shown is the first license plate frame detected when the license plate number appears in the preset area. The densest part of the license plate frames in the license plate trajectory is usually the position of the current license plate when waiting for the gate to open. The license plate frame at the far left of each license plate frame in the license plate trajectory is the license plate frame detected when the current license plate passes through the gate.
[0099] Furthermore, the method for determining the position of the license plate frame corresponding to the license plate number in the image frame can be periodic or determined by other methods. This application does not limit the method for determining the position of the license plate frame corresponding to the license plate number in the image frame.
[0100] As a preferred embodiment, when starting to determine the position of the license plate frame containing the current license plate number in the image frame, the process includes:
[0101] The standard license plate number is determined by taking the image frame in which the current license plate number is first detected as the first frame and the license plate numbers detected in N consecutive image frames, where N is an integer not less than 2;
[0102] Based on the standard license plate number, determine whether the number of identical characters in the license plate number detected in the current image frame and the license plate number detected in the previous image frame is less than the first preset number of characters;
[0103] If the number of characters is not less than the first preset number, the position of the license plate frame corresponding to the current license plate number in the image frame is retained;
[0104] If the number of characters is less than the first preset number, then delete the position of the license plate frame corresponding to the current license plate number in the image frame;
[0105] Determine the current license plate trajectory based on the determined position of the license plate frame in the image frame, including:
[0106] The current license plate trajectory is determined based on the position of the license plate frame corresponding to the current image frame within the image frame.
[0107] Considering the possibility of blurred image frames captured by the camera leading to incorrect identification of the current license plate number, this embodiment, when the current license plate number is detected in an image frame, takes that image frame as the first frame. A standard license plate number is determined from the license plate numbers detected in N consecutive image frames. Then, based on the standard license plate number, it is determined whether the number of identical characters between the license plate number in the current image frame and the license plate number in the previous image frame is less than a preset number. If it is less, the position of the license plate frame corresponding to the current license plate number in the image frame is deleted; if it is not less, the position is retained. Finally, the trajectory of the current license plate is determined based on the retained position of the license plate frame corresponding to the current image frame, thus deleting the incorrectly identified current license plate number.
[0108] Specifically, in actual operation, when a camera captures image frames in a preset area, it may be affected by weather or camera performance, resulting in blurry image frames. When a blurry image frame is captured, the license plate number detected from the image frame may be incorrect. For example, if the current license plate number is originally A123XX, it may be mistakenly detected as A188XX in a blurry image frame. It may also be that other objects in the preset area are identified as license plate numbers, such as numbers on posters. In order to determine the accuracy of the current license plate trajectory, these misdetected license plate numbers need to be processed. When the current license plate number is detected in an image frame, because there might be an error in the license plate number detected in the first frame, a standard license plate number is determined from the license plate numbers detected in the N consecutive image frames that take that image frame as the first frame. Subsequent steps need to use the standard license plate number as a reference to determine the trajectory of the current license plate. For example, when the preset number of characters is 4, if the license plate number detected in the first frame is A123XX and the license plate number detected in the second frame is A888XX, the number of identical characters between the license plate number detected in the second frame and the license plate number detected in the first frame is less than the preset number of characters. This means that it is impossible to determine which one is the standard license plate number in these two frames. At this time, if the license plate number detected in the third frame is A888XX, the number of identical characters between the license plate number detected in the second frame and the license plate number detected in the third frame is less than the preset number of characters. This means that it is impossible to determine which one is the standard license plate number in these two frames. In this case, if the license plate number detected in the third frame is A888XX, the number of identical characters between the license plate number detected in the second frame and the license plate number detected in the third frame is less than the preset number of characters. If the number of identical characters detected in the first frame is greater than the preset number of characters, it indicates that the license plate number detected in the first frame is a false detection. Therefore, the license plate number in the first frame is deleted, and the license plate number in the second frame is determined as the standard license plate number. Subsequent steps to determine whether the number of identical characters between the license plate number detected in the current image frame and the license plate number detected in the previous image frame is less than the first preset number of characters will use the license plate number in the second frame as a benchmark. When N is 5, if the standard license plate number can be determined in the third frame, the fourth and fifth frames will also undergo the same step of determining whether the number of identical characters between the license plate number detected in the current image frame and the license plate number detected in the previous image frame is less than the first preset number of characters. Finally, the current license plate trajectory is determined based on the position of the license plate frame corresponding to the current image frame within the image frame.
[0109] In summary, by determining whether the number of identical characters in the license plate number detected in the current image frame is less than the number of identical characters detected in the previous image frame, the license plate number detected in the current image frame is retained when the number of identical characters is not less than the number of identical characters, and when the number of identical characters is less than the number of identical characters, the license plate number detected in the current image frame is retained. Finally, the current license plate trajectory is determined based on the position of the license plate frame corresponding to the retained current image frame in the image frame. This method can delete the current license plate number that is incorrectly identified due to the blurriness of the image frame captured by the camera.
[0110] As a preferred embodiment, after determining the current license plate trajectory based on the position of the license plate frame corresponding to the current image frame in the image frame, the method further includes:
[0111] S201: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame;
[0112] S202: Determine whether the license plate number detected in the current image frame is the same as the license plate number detected in the two image frames before and after the current image frame; if they are the same, proceed to S203; if they are not the same, proceed to S204.
[0113] S203: Retain the license plate frame corresponding to the current image frame in the current license plate trajectory;
[0114] S204: Delete the license plate frame corresponding to the current image frame in the current license plate trajectory;
[0115] S205: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S206; if it is the last frame, proceed to S207.
[0116] S206: Take the next frame of the current image frame as the latest current image frame and return to S202;
[0117] S207: Obtain the latest current license plate trajectory.
[0118] To further eliminate license plate numbers that differ from the standard license plate number in the current license plate trajectory, this embodiment considers that some license plate numbers may appear that are different from the standard license plate number in actual working conditions. Therefore, before extracting the trajectory features of the current license plate trajectory, the license plate frames containing license plate numbers that are different from the standard license plate number need to be deleted first. First, the image frame corresponding to the second license plate frame in the current license plate trajectory is determined as the current image frame. It is then determined whether the license plate number detected in the current image frame is the same as the number detected in the two image frames before and after the current image frame. If they are the same, the current image frame in the current license plate trajectory is retained. If the corresponding license plate frame is different from the current frame, the license plate frame is deleted. Then, it is determined whether the current image frame is the last frame in the current license plate trajectory. If it is not the last frame, the next frame of the current image frame is taken as the latest current image frame. The process returns to the step of determining whether the license plate number detected in the current image frame is the same as the number detected in the two image frames before and after the current image frame. This forms a loop until the current image frame is the last frame. If it is the last frame, it means that the judgment of all image frames in the current license plate trajectory has been completed, and license plate numbers in the current license plate trajectory that are different from the standard license plate number have been cleared. Please refer to [the relevant documentation]. Figure 3 , Figure 3This invention provides another schematic diagram of the current license plate trajectory, such as... Figure 2 The current license plate trajectory shown, after deleting the current license plate number that was incorrectly identified due to blurry image frames captured by the camera, and then proceeding with steps S201 to S207, can yield the following result: Figure 3 The current license plate trajectory shown is the trajectory of license plates where the license plate number is the same in all license plate frames, which is the latest current license plate trajectory.
[0119] As a preferred embodiment, after obtaining the latest current license plate trajectory, the process includes:
[0120] S301: Determine the image frame corresponding to the first license plate frame in the current license plate trajectory as the current image frame;
[0121] S302: Determine whether there is an intersection-union ratio (IU) between the license plate frame and the license plate frame in the current image frame and the license plate frame in the current image frame in the current license plate trajectory that is greater than a preset IU; if there is an IU greater than the preset IU, proceed to S303; if there is no IU greater than the preset IU, proceed to S304.
[0122] S303: Delete license plate frames in the current license plate trajectory whose intersection-union ratio with the license plate frames in the current image frame is greater than the preset intersection-union ratio;
[0123] S304: Maintain the current license plate trajectory;
[0124] S305: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S306; if it is the last frame, proceed to S307.
[0125] S306: Take the next frame of the current image frame as the latest current image frame and return to S302;
[0126] S307: Obtain the latest current license plate trajectory.
[0127] To improve work efficiency and reduce computational load, in this embodiment, after obtaining the latest license plate trajectory, it is necessary to first determine the image frame corresponding to the first license plate frame in the current license plate trajectory as the current image frame. Then, it is determined whether any image frame in the current license plate trajectory other than the current image frame has an intersection-over-union ratio (IoU) greater than the first image frame. If there is an IoU greater than the preset IoU, the license plate frame in the current license plate trajectory with an IoU greater than the preset IoU is deleted. Otherwise, the current license plate trajectory is maintained. Then, it is determined whether the current image frame is the last frame in the current license plate trajectory. If the current image frame is not the last frame, the next frame of the current image frame is taken as the latest current image frame. The process returns to the step of determining whether any image frame in the current license plate trajectory other than the current image frame has an IoU greater than the preset IoU. If the current image frame is the last frame, it means that the loop has been completed and the latest current license plate trajectory is obtained.
[0128] Specifically, the Intersection over Union (IOU) ratio is calculated to obtain the ratio of the intersection to the union of the license plate frames in the current image frame and the license plate frames in the previous image frame. The intersection is the area of the overlapping portion of the two license plate frames, and the union is the total area of the polygonal frame formed by the two license plate frames within the image frame. Typically, vehicles travel slowly when entering and exiting parking lots, resulting in a large number of license plate frames with high IOUs between adjacent frames. Extracting features from all these frames would be inefficient and computationally intensive. Therefore, license plate frames with an IOU greater than a preset IOU can be deleted. Please refer to [reference needed]. Figure 4 , Figure 4 This invention provides another schematic diagram of the current license plate trajectory, such as... Figure 3 The current license plate trajectory shown, after steps S301 to S307, can be... Figure 3 The current license plate trajectory shown has been changed to, for example: Figure 4 The license plate trajectory shown only retains a small number of license plate frames that clearly represent the trajectory characteristics, which facilitates subsequent calculation of trajectory characteristics, improves work efficiency and reduces the amount of calculation.
[0129] As a preferred embodiment, when the current trajectory features include the total number of back frames on the X-axis and the total number of back frames on the Y-axis, the current trajectory features are extracted from the current license plate trajectory, including:
[0130] S401: Determine the coordinates of the center of each license plate frame in the current license plate trajectory in the preset coordinate system, where the horizontal axis is the X-axis and the vertical axis is the Y-axis;
[0131] S402: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame;
[0132] S403: Determine whether the X-axis coordinate value of the center point of the license plate frame in the current image frame and the X-axis coordinate value of the center point of the license plate frame in the previous image frame satisfy the preset X-axis coordinate value comparison relationship.
[0133] S404: If the preset X-axis coordinate value comparison relationship is not met, the current image frame is determined to be a backward frame on the X-axis;
[0134] S405: If the preset X-axis coordinate value comparison relationship is met, then the current image frame is determined to be a normal frame on the X-axis;
[0135] S406: Determine whether the Y-axis coordinate value of the center point of the license plate frame in the current image frame and the Y-axis coordinate value of the center point of the license plate frame in the previous image frame satisfy the preset Y-axis coordinate value comparison relationship.
[0136] S407: If the preset Y-axis coordinate value comparison relationship is not met, the current image frame is determined to be a backward frame on the Y-axis;
[0137] S408: If the preset Y-axis coordinate value comparison relationship is met, then the current image frame is determined to be a normal frame on the Y-axis;
[0138] S409: Determine whether the current image frame is the last frame in the current license plate trajectory;
[0139] S410: If it is not the last frame, then take the next frame of the current image frame as the latest current image frame and return to S403;
[0140] S411: If it is the last frame, then determine the total number of back frames on all X axes and the total number of back frames on all Y axes.
[0141] When the total number of backward frames on the X-axis and the total number of backward frames on the Y-axis are included in the current trajectory feature, in order to simply extract the trajectory feature, in this embodiment, first, the coordinate points of the center points of each license plate frame in the current license plate trajectory in the preset coordinate system are determined. After determining the coordinate points of the center points of each license plate frame in the preset coordinate system, the image frame corresponding to the second license plate frame in the current license plate trajectory is determined as the current image frame. Then, it is successively determined whether the X-axis coordinate value of the center point of the license plate frame in the current image frame satisfies the preset X-axis size comparison relationship with the X-axis coordinate value of the center point of the license plate frame in the previous image frame of the current image frame, and whether the Y-axis coordinate value of the center point of the license plate frame in the current image frame satisfies the preset Y-axis size comparison relationship with the Y-axis coordinate value of the center point of the license plate frame in the previous image frame of the current image frame. For example, please refer to Figure 5 , Figure 5 is a schematic diagram of the coordinate points of the center of the license plate frame in the current license plate trajectory provided by the present invention. The preset coordinate system can be built in the image frame, with the upper left vertex of the image frame as the coordinate origin. The X-axis of the preset coordinate system is along the upper edge of the image frame and points to the right of the image frame, and the Y-axis of the preset coordinate system is along the left edge of the image frame and points to the lower part of the image frame. The width of one pixel point is used as the unit length on the X-axis or Y-axis. The coordinate point corresponding to (X1, Y1) in the figure is the coordinate point of the center of the license plate frame in the previous image frame, and the coordinate point corresponding to (X2, Y2) is the coordinate point of the center of the license plate frame in the current image frame. When the X-axis size comparison relationship is that the X-axis coordinate value of the license plate frame in the earlier obtained image frame is larger, the relationship between the X-axis coordinate value X1 of the current center point of the license plate trajectory and the X-axis coordinate value X2 of the previous center point is determined. If X1 < X2, it means that the current image frame satisfies the preset X-axis size comparison relationship, and at this time, the current image frame is determined as a backward frame. If X1 > X2, it means that the current image frame does not satisfy the preset X-axis size comparison relationship, and at this time, the current image frame is determined as a normal frame. Then, it is judged whether the current image frame is the last frame in the current license plate trajectory. When the current image frame is not the last frame, the next frame of the current image frame is used as the latest current image frame, and the step of determining whether the X-axis coordinate value of the center point of the license plate frame in the current image frame satisfies the preset X-axis coordinate value size comparison relationship with the X-axis coordinate value of the center point of the license plate frame in the previous image frame of the current image frame is returned. When the current image frame is the last frame, the total number of backward frames on the X-axis and the total number of backward frames on the Y-axis in the current license plate trajectory are determined, and the trajectory feature can be simply extracted when the total number of backward frames on the X-axis and the total number of backward frames on the Y-axis are included in the current trajectory feature.
[0142] Furthermore, this application does not limit the type of preset coordinate system to be built. When different preset coordinate systems are built, the comparison relationships of the preset X-axis coordinate values and the preset Y-axis coordinate values need to be changed accordingly to adapt to the trajectory characteristics of real license plate trajectories in actual situations.
[0143] As a preferred embodiment, when the current trajectory features include a trajectory region, a start region, and an end region, the current trajectory features are extracted from the current license plate trajectory, including:
[0144] Determine the coordinates of the center of each license plate frame in the current license plate trajectory in the preset coordinate system, where the horizontal axis is the X-axis and the vertical axis is the Y-axis;
[0145] Determine the smallest bounding rectangle containing all coordinate points as the trajectory region of the current license plate feature;
[0146] Use the first license plate frame in the current license plate trajectory as the starting area of the current license plate trajectory;
[0147] The last license plate frame in the current license plate trajectory is taken as the end area of the current license plate trajectory.
[0148] When the current trajectory features include average velocity along the X-axis, average velocity along the Y-axis, average slope, X-axis variance, and Y-axis variance, in order to easily extract the trajectory features, this embodiment first determines the coordinates of the center points of each license plate frame in the current license plate trajectory within a preset coordinate system. The preset coordinate system can be one where the top-left corner of the image frame is used as the origin, the X-axis runs along the top edge of the image frame and points to the right, and the Y-axis runs along the left edge of the image frame and points to the bottom. The width of one pixel is used as the unit length on the X-axis or Y-axis. This application does not limit how the preset coordinate system is constructed. After determining the coordinates of each license plate frame... After determining the coordinates of the center point of each license plate frame in the preset coordinate system, the image frame corresponding to the second license plate frame in the current license plate trajectory is identified as the current image frame. Then, the slope, velocity on the X-axis, and velocity on the Y-axis are sequentially determined between the coordinates of the center point of the license plate frame in the current image frame and the center point of the license plate frame in the previous image frame. For example, if the coordinates of the center point of the license plate frame in the current image frame are (X1, Y1) and the coordinates of the center point of the license plate frame in the previous image frame are (X2, Y2), the slope can be obtained by (Y2-Y1) / (X2-X1), the velocity on the X-axis can be obtained by (X2-X1) / (T1), and the velocity on the Y-axis... The degree can be obtained by (Y2-Y1) / (T2), where T1 and T2 can be the time between the acquisition of the previous image frame and the acquisition of the current image frame, or the number of image frames without a license plate frame captured by the camera between the acquisition of the previous image frame and the acquisition of the current image frame. Then, it is determined whether the current image frame is the last frame in the current license plate trajectory. If the current image frame is not the last frame, the next frame of the current image frame is taken as the latest current image frame. The slope and X-axis values between the center point of the license plate frame in the current image frame and the center point of the license plate frame in the previous image frame are returned. The steps for calculating the velocity on the X-axis and Y-axis are as follows: When the current image frame is the last frame, the average slope, average velocity on the X-axis, and average velocity on the Y-axis of the current license plate trajectory are obtained by acquiring all slopes, all velocities on the X-axis, and all velocities on the Y-axis. Then, based on all velocities on the X-axis and the average velocity on the X-axis, the X-axis variance of the current license plate trajectory is obtained using a preset variance formula. Similarly, based on all velocities on the Y-axis and the average velocity on the Y-axis, the Y-axis variance of the current license plate trajectory is obtained using a preset variance formula. This allows for the easy extraction of the current trajectory features when the current trajectory features include the average velocity on the X-axis, the average velocity on the Y-axis, the average slope, the X-axis variance, and the Y-axis variance.
[0149] As a preferred embodiment, when the current trajectory features include average velocity along the X-axis, average velocity along the Y-axis, average slope, variance along the X-axis, and variance along the Y-axis, the current trajectory features are extracted from the current license plate trajectory, including:
[0150] S501: Determine the coordinates of the center of each license plate frame in the current license plate trajectory in the preset coordinate system, where the horizontal axis is the X-axis and the vertical axis is the Y-axis.
[0151] S502: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame;
[0152] S503: Determine the slope between the coordinates of the center of the license plate frame in the current image frame and the coordinates of the center of the license plate frame in the previous image frame.
[0153] S504: Determine the velocity on the X-axis between the coordinates of the center point of the license plate frame in the current image frame and the coordinates of the center point of the license plate frame in the previous image frame.
[0154] S505: Determine the velocity on the Y-axis between the coordinates of the center point of the license plate frame in the current image frame and the coordinates of the center point of the license plate frame in the previous image frame.
[0155] S506: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S507; if it is the last frame, proceed to S508.
[0156] S507: Take the next frame of the current image frame as the latest current image frame and return to S503;
[0157] S508: Determine the average speed of the current license plate trajectory along the X-axis based on the determined speeds on each X-axis;
[0158] S509: Determine the average speed of the current license plate trajectory along the Y-axis based on the determined speeds on each Y-axis;
[0159] S510: Determine the average slope of the current license plate trajectory based on the determined individual slopes;
[0160] S511: Determine the X-axis variance of the current license plate trajectory based on the determined average X-axis velocity and the velocity on each X-axis;
[0161] S512: Determine the Y-axis variance of the current license plate trajectory based on the determined average Y-axis velocity and the velocities on each Y-axis.
[0162] When the current trajectory features include average velocity along the X-axis, average velocity along the Y-axis, average slope, X-axis variance, and Y-axis variance, in order to easily extract the trajectory features, this embodiment first determines the coordinates of the center points of each license plate frame in the current license plate trajectory within a preset coordinate system. The preset coordinate system can be one where the top-left corner of the image frame is used as the origin, the X-axis runs along the top edge of the image frame and points to the right, and the Y-axis runs along the left edge of the image frame and points to the bottom. The width of one pixel is used as the unit length on the X-axis or Y-axis. This application does not limit how the preset coordinate system is constructed. After determining the coordinates of each license plate frame... After determining the coordinates of the center point of each license plate frame in the preset coordinate system, the image frame corresponding to the second license plate frame in the current license plate trajectory is identified as the current image frame. Then, the slope, velocity on the X-axis, and velocity on the Y-axis are sequentially determined between the coordinates of the center point of the license plate frame in the current image frame and the center point of the license plate frame in the previous image frame. For example, if the coordinates of the center point of the license plate frame in the current image frame are (X1, Y1) and the coordinates of the center point of the license plate frame in the previous image frame are (X2, Y2), the slope can be obtained by (Y2-Y1) / (X2-X1), the velocity on the X-axis can be obtained by (X2-X1) / (T1), and the velocity on the Y-axis... The degree can be obtained by (Y2-Y1) / (T2), where T1 and T2 can be the time between the acquisition of the previous image frame and the acquisition of the current image frame, or the number of image frames without a license plate frame captured by the camera between the acquisition of the previous image frame and the acquisition of the current image frame. Then, it is determined whether the current image frame is the last frame in the current license plate trajectory. If the current image frame is not the last frame, the next frame of the current image frame is taken as the latest current image frame. The slope and X-axis values between the center point of the license plate frame in the current image frame and the center point of the license plate frame in the previous image frame are returned. The steps for calculating the velocity on the X-axis and Y-axis are as follows: When the current image frame is the last frame, the average slope, average velocity on the X-axis, and average velocity on the Y-axis of the current license plate trajectory are obtained by acquiring all slopes, all velocities on the X-axis, and all velocities on the Y-axis. Then, based on all velocities on the X-axis and the average velocity on the X-axis, the X-axis variance of the current license plate trajectory is obtained using a preset variance formula. Similarly, based on all velocities on the Y-axis and the average velocity on the Y-axis, the Y-axis variance of the current license plate trajectory is obtained using a preset variance formula. This allows for the easy extraction of the current trajectory features when the current trajectory features include the average velocity on the X-axis, the average velocity on the Y-axis, the average slope, the X-axis variance, and the Y-axis variance.
[0163] As a preferred embodiment, the machine learning model is a machine learning model built based on the Adaboost algorithm.
[0164] To facilitate the simple and effective construction of machine learning models, this embodiment uses a machine learning model based on the Adaboost algorithm. The Adaboost algorithm can be understood as the training process of a weak classifier algorithm. First, Adaboost continuously trains a training set containing trajectory features of a first preset number of real license plate trajectories and a second preset number of trajectory features of fake license plate trajectories. During training, the weights of correctly classified trajectory features decrease, while the weights of misclassified trajectory features increase. By continuously calculating the weights, the Adaboost algorithm improves its ability to classify trajectory features. Finally, when a preset number of iterations or a preset error rate is met, the machine learning model is considered to have been successfully trained. At this point, a strong classifier capable of accurately classifying trajectory features is obtained. In practical applications, this trained machine learning model can effectively distinguish between genuine and fake license plate trajectories.
[0165] Please refer to Figure 6 , Figure 6 A schematic diagram of a device for determining the authenticity of a license plate provided by the present invention includes:
[0166] Memory 1 is used to store computer programs;
[0167] Processor 2 is used to execute computer programs to implement the steps of the method for determining the authenticity of license plates as described above.
[0168] For a detailed description of the license plate authenticity determination device provided by the present invention, please refer to the embodiments of the license plate authenticity determination method described above, which will not be repeated here.
[0169] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0170] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
Claims
1. A method for determining the authenticity of a license plate, characterized in that, include: When the camera detects the current license plate in the image frame captured by the camera in the preset area, the trajectory of the current license plate is determined. Extract current trajectory features from the current license plate trajectory; The current trajectory features are input into a pre-trained machine learning model to determine the authenticity of the current license plate trajectory. The machine learning model is pre-trained from a training set including trajectory features of a first preset number of real license plate trajectories and trajectory features of a second preset number of fake license plate trajectories. If the current license plate trajectory is a real license plate trajectory, then the current license plate is determined to be a real license plate located on the vehicle; If the current license plate trajectory is a counterfeit license plate trajectory, then the current license plate is determined to be a counterfeit license plate that is not located on the vehicle. Determining the current license plate trajectory includes: When the current license plate number is detected in the image frame, the position of the license plate frame containing the current license plate number in the image frame is determined. When the preset stop acquisition condition for the position of the license plate frame in the image frame is met, the determination of the position of the license plate frame of the current license plate number in the image frame is stopped. The current license plate trajectory is determined based on the determined position of the license plate frame in the image frame; When the current trajectory features include the total number of back frames on the X-axis and the total number of back frames on the Y-axis, the current trajectory features are extracted from the current license plate trajectory, including: S401: Determine the coordinates of the center of each license plate frame in the current license plate trajectory in a preset coordinate system, where the horizontal axis of the preset coordinate system is the X-axis and the vertical axis is the Y-axis; S402: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame; S403: Determine whether the X-axis coordinate value of the center point of the license plate frame in the current image frame and the X-axis coordinate value of the center point of the license plate frame in the previous image frame satisfy a preset X-axis coordinate value comparison relationship. S404: If the preset X-axis coordinate value comparison relationship is not satisfied, then the current image frame is determined to be a backward frame on the X-axis; S405: If the preset X-axis coordinate value comparison relationship is satisfied, then the current image frame is determined to be a normal frame on the X-axis; S406: Determine whether the Y-axis coordinate value of the center point of the license plate frame in the current image frame and the Y-axis coordinate value of the center point of the license plate frame in the previous image frame satisfy a preset Y-axis coordinate value comparison relationship. S407: If the preset Y-axis coordinate value comparison relationship is not satisfied, then the current image frame is determined to be a backward frame on the Y-axis; S408: If the preset Y-axis coordinate value comparison relationship is satisfied, then the current image frame is determined to be a normal frame on the Y-axis; S409: Determine whether the current image frame is the last frame in the current license plate trajectory; S410: If it is not the last frame, then take the next frame of the current image frame as the latest current image frame and return to S403; S411: If it is the last frame, then determine the total number of back frames on all X-axis and the total number of back frames on all Y-axis.
2. The method for determining the authenticity of a license plate as described in claim 1, characterized in that, When determining the position of the license plate frame containing the current license plate number within the image frame, the process includes: The standard license plate number is determined by taking the image frame in which the current license plate number is first detected as the first frame and the license plate numbers detected in N consecutive image frames, where N is an integer not less than 2; Based on the standard license plate number, determine whether the number of identical characters in the license plate number detected in the current image frame and the license plate number detected in the previous image frame is less than the first preset number of characters; If the number of characters is not less than the first preset number, then the position of the license plate frame corresponding to the current license plate number in the image frame is retained; If the number of characters is less than the first preset number, then delete the position of the license plate frame corresponding to the current license plate number in the image frame; Determining the current license plate trajectory based on the determined position of the license plate frame in the image frame includes: The current license plate trajectory is determined based on the position of the license plate frame corresponding to the current image frame within the image frame.
3. The method for determining the authenticity of a license plate as described in claim 2, characterized in that, After determining the current license plate trajectory based on the position of the license plate frame corresponding to the current image frame in the retained image frame, the method further includes: S201: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame; S202: Determine whether the license plate number detected in the current image frame is the same as the license plate number detected in the two image frames before and after the current image frame; if they are the same, proceed to S203; if they are not the same, proceed to S204. S203: Retain the license plate frame corresponding to the current image frame in the current license plate trajectory; S204: Delete the license plate frame corresponding to the current image frame in the current license plate trajectory; S205: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S206; if it is the last frame, proceed to S207. S206: Take the next frame of the current image frame as the latest current image frame and return to S202; S207: Obtain the latest current license plate trajectory.
4. The method for determining the authenticity of a license plate as described in claim 3, characterized in that, After obtaining the latest current license plate trajectory, including: S301: Determine the image frame corresponding to the first license plate frame in the current license plate trajectory as the current image frame; S302: Determine whether there is an intersection-union ratio (IU) between the license plate frame and the license plate frame in the current image frame and the license plate frame in the current image frame in the current license plate trajectory that is greater than a preset IU; if there is an IU greater than the preset IU, proceed to S303; if there is no IU greater than the preset IU, proceed to S304. S303: Delete license plate frames in the current license plate trajectory whose intersection-union ratio with the license plate frame in the current image frame is greater than a preset intersection-union ratio; S304: Maintain the current license plate trajectory; S305: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S306; if it is the last frame, proceed to S307. S306: Take the next frame of the current image frame as the latest current image frame and return to S302; S307: Obtain the latest current license plate trajectory.
5. The method for determining the authenticity of a license plate as described in claim 1, characterized in that, When the current trajectory features include a trajectory region, a start region, and an end region, the current trajectory features are extracted from the current license plate trajectory, including: Determine the coordinates of the center of each license plate frame in the current license plate trajectory in a preset coordinate system, where the horizontal axis is the X-axis and the vertical axis is the Y-axis. The smallest bounding rectangle containing all the coordinate points is determined as the trajectory region of the current license plate feature; The first license plate frame in the current license plate trajectory is taken as the starting area of the current license plate trajectory; The last license plate frame in the current license plate trajectory is taken as the end area of the current license plate trajectory.
6. The method for determining the authenticity of a license plate as described in claim 1, characterized in that, When the current trajectory features include average velocity along the X-axis, average velocity along the Y-axis, average slope, variance along the X-axis, and variance along the Y-axis, the current trajectory features are extracted from the current license plate trajectory, including: S501: Determine the coordinates of the center of each license plate frame in the current license plate trajectory in a preset coordinate system, where the horizontal axis is the X-axis and the vertical axis is the Y-axis. S502: Determine the image frame corresponding to the second license plate frame in the current license plate trajectory as the current image frame; S503: Determine the slope between the coordinates of the center of the license plate frame in the current image frame and the coordinates of the center of the license plate frame in the previous image frame. S504: Determine the velocity on the X-axis between the coordinates of the center of the license plate frame in the current image frame and the coordinates of the center of the license plate frame in the previous image frame. S505: Determine the velocity on the Y-axis between the coordinates of the center of the license plate frame in the current image frame and the coordinates of the center of the license plate frame in the previous image frame. S506: Determine whether the current image frame is the last frame in the current license plate trajectory; if it is not the last frame, proceed to S507; if it is the last frame, proceed to S508. S507: Take the next frame of the current image frame as the latest current image frame and return to S503; S508: Determine the average speed of the current license plate trajectory along the X-axis based on the determined speeds on each of the X-axis; S509: Determine the average speed of the current license plate trajectory along the Y-axis based on the determined speeds along each of the Y-axis; S510: Determine the average slope of the current license plate trajectory based on the determined individual slopes; S511: Determine the X-axis variance of the current license plate trajectory based on the determined average speed on the X-axis and the speed on each of the X-axis; S512: Determine the Y-axis variance of the current license plate trajectory based on the determined average speed on the Y-axis and the speeds on each Y-axis.
7. The method for determining the authenticity of a license plate as described in any one of claims 1 to 6, characterized in that, The machine learning model is a machine learning model built based on the Adaboost algorithm.
8. A device for determining the authenticity of a license plate, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the method for determining the authenticity of a license plate as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for identifying authenticity of license plate, computer equipment and storage medium
CN111079751A
License plate recognition method and device and electronic equipment
CN112997190A