Road traffic vehicle abnormal behavior recognition method based on image recognition
By generating multi-angle target images and combining monitoring equipment to acquire road monitoring images for pre-processing, the problem of inaccurate identification caused by changes in the shooting angle of the license plate is solved, the recognition efficiency and accuracy are improved, and the computing power demand is reduced, and efficient abnormal detection is achieved under low computing power.
Patent Information
- Application Number
- CN202510047322.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Image recognition technology faces the diversified image features of license plates due to changes in shooting angles in the detection of fake license plates, which affects the accuracy and stability of recognition. It can be solved by adding multi-view training data and deep learning methods, but will increase the demand for computing power resources.
By acquiring preset characters to generate multi-angle target images within the angle interval [0, 90°], and combining with monitoring equipment to obtain road monitoring images for preprocessing, the edge detection algorithm is used to extract license plate characters, calculate the position relationship between the vehicle and the monitoring equipment to determine the actual shooting angle of the license plate, select the closest preset angle image for comparison, obtain vehicle information to compare and mark abnormal vehicles and send an early warning.
It improves the efficiency and accuracy of license plate recognition, reduces the computing power demand, realizes efficient abnormal detection under low computing power, reduces the possibility of misjudgment and misjudgment, and ensures that abnormal vehicles can be accurately identified and reported.
Smart Images

Figure CN119888645A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method for identifying abnormal behavior of road traffic vehicles based on image recognition. Background Art
[0002] Abnormal vehicle behavior refers to vehicle activities in the traffic system that do not comply with normal operating specifications or laws and regulations, including the use of fake license plates. Fake license plates not only conceal the true identity of the vehicle, making it easier to evade supervision and punishment, but may also be used for illegal activities.
[0003] With the development of artificial intelligence technology, the application of image recognition technology in the field of fake license plates has shown significant advantages. Image recognition can efficiently and accurately identify and detect fake license plates, significantly improving the efficiency of investigation and punishment and reducing the possibility of misjudgment and missed judgment.
[0004] However, although image recognition technology has shown many advantages in detecting fake license plates, its practical application still faces some challenges. For example, when a vehicle is driving, the license plate may present various image features due to the shooting angle, and these changes will significantly affect the accuracy and stability of recognition. Specifically, the license plate may appear tilted at different angles, causing the shape of the characters to change, making it difficult for the recognition algorithm to accurately parse. Although the above problems can be avoided by introducing multi-view training data and using convolutional neural networks (CNNs) in deep learning, they will increase the demand for computing resources. Summary of the invention
[0005] The purpose of the present invention is to provide a method for identifying abnormal behavior of road traffic vehicles based on image recognition to solve the following technical problems: Although image recognition technology has shown many advantages in detecting fake license plates, its practical application still faces some challenges. For example, when a vehicle is driving, the license plate may present a variety of image features due to the shooting angle, and these changes will significantly affect the accuracy and stability of recognition. Specifically, the license plate may be distorted, tilted, or partially blocked at different angles, causing the shape of the characters to change, making it difficult for the recognition algorithm to accurately parse. Although the above problems can be avoided by introducing multi-view training data, using geometric correction technology, and using convolutional neural networks (CNNs) in deep learning, they will increase the demand for computing resources.
[0006] The purpose of the present invention can be achieved through the following technical solutions: A method for identifying abnormal behavior of road traffic vehicles based on image recognition comprises the following steps: S1: obtaining a preset character, setting a number of angle values in the angle interval [0, 90°] at a preset angle interval, and obtaining an image of the character at any angle value as a target image; S2: acquiring a road monitoring image based on a monitoring device, preprocessing the road monitoring image, identifying a license plate image of a vehicle in the preprocessed road monitoring image based on machine vision, and extracting characters in the license plate image based on an edge detection algorithm as pending characters; Obtain the distance Lsp between the vehicle position and the monitoring device position, and obtain the horizontal distance lsz between the vehicle position and the monitoring device position, calculate the cosine value z=Lsp / Lsz, obtain the target angle Z=arccos(z)*(180° / π), calculate the angle difference ΔC=|AZ|, A represents the angle value, take the angle value corresponding to the minimum angle difference as the target angle value, and take the target image corresponding to the target angle value as the image to be compared; Determine the similarity between the character to be determined and the character in the image to be compared, take the image to be compared corresponding to the maximum similarity as the standard image, obtain the license plate of the vehicle based on the standard image, and take it as the target license plate; S3: Acquire vehicle information of the target license plate and use it as standard information, wherein the vehicle information includes vehicle model and vehicle body color; The vehicle information of the vehicle in the road monitoring image is obtained and used as pending information. When the standard information is different from the pending information, the vehicle in the road monitoring image is marked as an abnormal vehicle, and a warning message is sent for reporting.
[0007] As a further solution of the present invention: the step S2 further includes the following steps: When two or more similarities are the same and have the maximum similarity, the image with comparison corresponding to the same and the maximum similarity is used as the first image, and the character in the image to be determined is used as the first character; The angle differences are sorted in ascending order, the second angle value in the sorting is taken as the ideal angle value, the target image of the first character at the ideal angle value is taken as the ideal image, the similarity between the pending character and the first character in the ideal image is determined, and the first image corresponding to the first character with a greater similarity is taken as the standard image.
[0008] As a further solution of the present invention: in the step S3, when the number of abnormal vehicles is greater than or equal to a preset number threshold, it is determined to be an abnormal situation, and an abnormal information is sent to report an error.
[0009] As a further solution of the present invention: the step S2 further includes the following steps: The pending characters are grouped, and the same pending characters belong to the same group. The similarity between any pending character in the group and the character in the image to be compared is determined as the similarity between all the pending characters in the corresponding group and the character in the image to be compared.
[0010] As a further solution of the present invention: in the step S2, when the horizontal distance Lsz is greater than or equal to a preset horizontal distance threshold, the subsequent steps are not executed.
[0011] As a further solution of the present invention: in the step S2, the preprocessing process specifically includes denoising and contrast enhancement.
[0012] As a further solution of the present invention: in the step S2, the line between the position of the vehicle and the position of the monitoring device is within a preset plane F. When the line does not belong to the plane F, the subsequent steps are not executed.
[0013] The beneficial effects of the present invention are as follows: first, by obtaining preset characters and generating target images at different angles at preset angle intervals within the angle range [0, 90°]; it is understandable that by preparing multi-angle character templates in advance, the amount of calculation required to generate and process images in real time during the actual detection process is reduced, and it is achieved by pre-storing a variety of target images to ensure that the closest template can be quickly matched at different shooting angles, thereby improving recognition efficiency and accuracy, and, when performing license plate recognition, there is no need to spend a lot of computing power for dynamic angle adjustment and image transformation, thereby effectively reducing the overall computing power requirements and helping to achieve efficient anomaly detection under low computing power; it should be noted that, taking the angle value j as an example, obtaining The method for obtaining the target image is as follows: construct a rectangle with the length, width and height of the rectangle being preset values, and the eight vertices of the rectangle being denoted as D1, D2, ..., D8 respectively; place the monitoring device on the midpoint D23 of vertices D2 and D3, obtain the midpoint D58 of vertices D5 and D8, connect the midpoints D23 and D58 to obtain the standard line, and move the characters on the edges D7D8 until the angle between the line connecting the character position and the midpoint D23 and the standard line is j; it is worth noting that there are two target images corresponding to the angle value j; thereafter, obtain the road monitoring image based on the monitoring device, and perform preprocessing to recognize the license plate image and extract the characters; it is worth noting that the characters in the license plate are accurately extracted through the edge detection algorithm to ensure the basic data quality for subsequent comparison. The purpose is to ensure the clarity and accuracy of the characters to be compared through effective preprocessing and character extraction, thereby improving the reliability of subsequent recognition. At the same time, the actual shooting angle of the license plate is determined by calculating the positional relationship between the vehicle and the monitoring device, and the closest preset angle image is selected for comparison. This method not only improves the accuracy of character recognition, but also avoids the high computing power consumption caused by real-time comparison at all possible angles; finally, by obtaining the vehicle information (including vehicle model and body color) of the target license plate as standard information, and comparing it with the vehicle information extracted from the monitoring image, when the standard information is different from the pending information, the vehicle is marked as abnormal and an early warning message is sent. Through multi-dimensional information verification, it not only depends on the recognition result of the license plate, but also combines the specific characteristics of the vehicle, significantly improving the accuracy and reliability of the detection, and by comprehensively comparing the license plate information and vehicle characteristics, the possibility of misjudgment and missed judgment is further reduced, ensuring that abnormal vehicles can be accurately identified and reported. The present invention can judge abnormal situations under low computing power requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The present invention will be further described below in conjunction with the accompanying drawings.
[0015] Figure 1 It is a flow chart of a method for identifying abnormal behavior of road traffic vehicles based on image recognition according to the present invention; Figure 2It is a schematic diagram of the standard line in the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] See also Figure 1-2 As shown, the present invention is a method for identifying abnormal behavior of road traffic vehicles based on image recognition, comprising the following steps: S1: obtaining a preset character, setting a number of angle values in the angle interval [0, 90°] at a preset angle interval, and obtaining an image of the character at any angle value as a target image; S2: acquiring a road monitoring image based on a monitoring device, preprocessing the road monitoring image, identifying a license plate image of a vehicle in the preprocessed road monitoring image based on machine vision, and extracting characters in the license plate image based on an edge detection algorithm as pending characters; Obtain the distance Lsp between the vehicle position and the monitoring device position, and obtain the horizontal distance lsz between the vehicle position and the monitoring device position, calculate the cosine value z=Lsp / Lsz, obtain the target angle Z=arccos(z)*(180° / π), calculate the angle difference ΔC=|AZ|, A represents the angle value, take the angle value corresponding to the minimum angle difference as the target angle value, and take the target image corresponding to the target angle value as the image to be compared; Determine the similarity between the character to be determined and the character in the image to be compared, take the image to be compared corresponding to the maximum similarity as the standard image, obtain the license plate of the vehicle based on the standard image, and take it as the target license plate; S3: Acquire vehicle information of the target license plate and use it as standard information, wherein the vehicle information includes vehicle model and vehicle body color; The vehicle information of the vehicle in the road monitoring image is obtained and used as pending information. When the standard information is different from the pending information, the vehicle in the road monitoring image is marked as an abnormal vehicle, and a warning message is sent for reporting.
[0018] It should be noted that by obtaining the preset characters and generating target images at different angles at preset angle intervals within the angle range [0, 90°]; it is understandable that by preparing multi-angle character templates in advance, the amount of calculation required to generate and process images in real time during the actual detection process is reduced, and it is achieved by pre-storing a variety of target images to ensure that the closest template can be quickly matched at different shooting angles, thereby improving recognition efficiency and accuracy. In addition, when performing license plate recognition, there is no need to spend a lot of computing power for dynamic angle adjustment and image transformation, thereby effectively reducing the overall computing power requirements and helping to achieve efficient anomaly detection under low computing power; it should be noted that, taking the angle value j as an example, obtaining the target image The method is as follows: construct a rectangle with the length, width and height of the rectangle as preset values, and the eight vertices of the rectangle are denoted as D1, D2, ..., D8 respectively; place the monitoring equipment on the midpoint D23 of vertices D2 and D3, obtain the midpoint D78 of vertices D7 and D8, connect the midpoints D23 and D78 to obtain the standard line, move the characters on the edge D7D8 until the angle between the line connecting the character position and the midpoint D23 and the standard line is j; it is worth noting that there are two target images corresponding to the angle value j; then, obtain the road monitoring image based on the monitoring equipment, and perform preprocessing to recognize the license plate image and extract the characters; it is worth noting that the characters in the license plate are accurately extracted through the edge detection algorithm to ensure the basic data quality for subsequent comparison. Its purpose is to ensure the clarity and accuracy of the characters to be compared through effective preprocessing and character extraction, thereby improving the reliability of subsequent recognition. At the same time, the actual shooting angle of the license plate is determined by calculating the positional relationship between the vehicle and the monitoring equipment, and the closest preset angle image is selected for comparison. This method not only improves the accuracy of character recognition, but also avoids the high computing power consumption caused by real-time comparison at all possible angles; finally, by obtaining the vehicle information (including model and body color) of the target license plate as standard information, and comparing it with the vehicle information extracted from the monitoring image, when the standard information is different from the pending information, the vehicle is marked as abnormal and an early warning message is sent. Through multi-dimensional information verification, it not only relies on the recognition result of the license plate, but also combines the specific characteristics of the vehicle, which significantly improves the accuracy and reliability of detection. By comprehensively comparing the license plate information and vehicle characteristics, the possibility of misjudgment and missed judgment is further reduced, ensuring that abnormal vehicles can be accurately identified and reported.
[0019] In another preferred embodiment of the present invention, the step S2 further includes the following steps: When two or more similarities are the same and have the maximum similarity, the image with comparison corresponding to the same and the maximum similarity is used as the first image, and the character in the image to be determined is used as the first character; The angle differences are sorted in ascending order, the second angle value in the sorting is taken as the ideal angle value, the target image of the first character at the ideal angle value is taken as the ideal image, the similarity between the pending character and the first character in the ideal image is determined, and the first image corresponding to the first character with a greater similarity is taken as the standard image.
[0020] It is worth noting that in actual situations, there may be a situation where two characters have the same degree of similarity at a certain angle value. By sorting the angle differences in ascending order and selecting the second angle value as the ideal angle, the image that best meets the actual shooting conditions can be further screened out from multiple candidate images. The ideal angle value can more accurately match the true form of the license plate characters, thereby improving the overall recognition accuracy. Secondly, by generating the target image at the ideal angle and performing a secondary similarity comparison, the degree of match between each candidate image and the pending character can be more carefully evaluated to ensure that the final selected standard image has the highest similarity.
[0021] In another preferred embodiment of the present invention, in step S3, when the number of abnormal vehicles is greater than or equal to a preset number threshold, it is determined to be an abnormal situation, and abnormal information is sent to report an error.
[0022] In another preferred embodiment of the present invention, the step S2 further includes the following steps: The pending characters are grouped, and the same pending characters belong to the same group. The similarity between any pending character in the group and the character in the image to be compared is determined as the similarity between all the pending characters in the corresponding group and the character in the image to be compared.
[0023] It should be noted that by grouping the same pending characters together, it is possible to avoid multiple independent comparisons of repeated characters, thereby reducing redundant calculations and optimizing the use of computing resources; In another preferred embodiment of the present invention, in the step S2, when the horizontal distance Lsz is greater than or equal to a preset horizontal distance threshold, subsequent steps are not executed.
[0024] It should be noted that by setting a horizontal distance threshold, vehicles that are far away from the monitoring equipment and have a low license plate recognition success rate can be effectively screened out, thereby avoiding unnecessary image processing and character recognition for long-distance vehicles, thereby reducing the waste of computing resources. Specifically, license plate images of long-distance vehicles are often difficult to identify and have low accuracy due to low resolution, poor lighting or undesirable angles. By filtering out these vehicles in advance, computing resources can be concentrated to process close-range vehicles that are more likely to be successfully identified, thereby improving overall processing efficiency.
[0025] In another preferred embodiment of the present invention, in step S2, the preprocessing process specifically includes denoising and contrast enhancement.
[0026] It is understandable that through denoising, the system can effectively remove various noise interferences in the surveillance image, such as electronic noise generated by the camera equipment, noise caused by changes in ambient light, etc., so as to ensure that the subsequent license plate character extraction and recognition process is based on clearer and purer image data. The benefit of this process is that it reduces the phenomenon of misidentification and missed recognition caused by noise, improves the accuracy and stability of character extraction, and ensures the reliability of the recognition results; the introduction of contrast enhancement further optimizes the visual effect of the license plate image, and significantly improves the contrast between the license plate characters and the background. The purpose of this processing step is to strengthen the edges and details of the characters, so that the characters are still clearly identifiable under different lighting conditions, thereby improving the efficiency and accuracy of the character extraction algorithm. By enhancing the contrast, the system can more easily identify the subtle features in the license plate, reduce the recognition difficulties caused by factors such as insufficient light or reflection, and ensure that efficient license plate detection and recognition can still be achieved in complex environments.
[0027] In another preferred embodiment of the present invention, in the step S2, the line between the position of the vehicle and the position of the monitoring device is within a preset plane F. When the line does not belong to the plane F, the subsequent steps are not executed.
[0028] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A method for identifying abnormal behavior of road traffic vehicles based on image recognition, characterized in that: The following steps are involved: S1: obtaining a preset character, setting a number of angle values in the angle interval [0, 90°] at a preset angle interval, and obtaining an image of the character at any angle value as a target image; S2: acquiring a road monitoring image based on a monitoring device, preprocessing the road monitoring image, identifying a license plate image of a vehicle in the preprocessed road monitoring image based on machine vision, and extracting characters in the license plate image based on an edge detection algorithm as pending characters; Obtain the distance Lsp between the vehicle position and the monitoring device position, and obtain the horizontal distance lsz between the vehicle position and the monitoring device position, calculate the cosine value z=Lsp / Lsz, obtain the target angle Z=arccos(z)*(180° / π), calculate the angle difference ΔC=|AZ|, A represents the angle value, take the angle value corresponding to the minimum angle difference as the target angle value, and take the target image corresponding to the target angle value as the image to be compared; Determine the similarity between the character to be determined and the character in the image to be compared, take the image to be compared corresponding to the maximum similarity as the standard image, obtain the license plate of the vehicle based on the standard image, and take it as the target license plate; S3: Acquire vehicle information of the target license plate and use it as standard information, wherein the vehicle information includes vehicle model and vehicle body color; The vehicle information of the vehicle in the road monitoring image is obtained and used as pending information. When the standard information is different from the pending information, the vehicle in the road monitoring image is marked as an abnormal vehicle, and a warning message is sent for reporting.
2. The method for identifying abnormal behavior of road traffic vehicles based on image recognition according to claim 1, characterized in that: The step S2 further includes the following steps: When two or more similarities are the same and have the maximum similarity, the image with comparison corresponding to the same and the maximum similarity is used as the first image, and the character in the image to be determined is used as the first character; The angle differences are sorted in ascending order, the second angle value in the sorting is taken as the ideal angle value, the target image of the first character at the ideal angle value is taken as the ideal image, the similarity between the pending character and the first character in the ideal image is determined, and the first image corresponding to the first character with a greater similarity is taken as the standard image.
3. The method for identifying abnormal behavior of road traffic vehicles based on image recognition according to claim 1, characterized in that: In the step S3, when the number of abnormal vehicles is greater than or equal to a preset number threshold, it is determined to be an abnormal situation and an abnormal information is sent to report an error.
4. The method for identifying abnormal behavior of road traffic vehicles based on image recognition according to claim 1, characterized in that: The step S2 further includes the following steps: The pending characters are grouped, and the same pending characters belong to the same group. The similarity between any pending character in the group and the character in the image to be compared is determined as the similarity between all the pending characters in the corresponding group and the character in the image to be compared.
5. The method for identifying abnormal behavior of road traffic vehicles based on image recognition according to claim 1, characterized in that: In the step S2, when the horizontal distance Lsz is greater than or equal to a preset horizontal distance threshold, the subsequent steps are not executed.
6. The method for identifying abnormal behavior of road traffic vehicles based on image recognition according to claim 1, characterized in that: In the step S2, the preprocessing process specifically includes denoising and contrast enhancement.
7. The method for identifying abnormal behavior of road traffic vehicles based on image recognition according to claim 1, characterized in that: In the step S2, the line between the position of the vehicle and the position of the monitoring device is within a preset plane F. When the line does not belong to the plane F, the subsequent steps are not executed.
Citation Information
Patent Citations
License plate recognition method, system and device and storage medium
CN115424254A
Digital retina-based traffic intersection order management and control method and electronic equipment
CN117437781A
Apparatus and method for recognizing license plate
KR1020160083226A