Camera angle adjustment method and system based on artificial intelligence
By analyzing the position and driving trajectory of the license plate angle, combining the recognition efficiency, and calculating the camera angle deviation, the camera angle adjustment based on artificial intelligence is realized, solving the problem of low license plate recognition efficiency caused by fixed angles, and improving the recognition accuracy and efficiency.
Patent Information
- Application Number
- CN202411087917.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-09
AI Technical Summary
During the vehicle identification process, fixed camera angle causes the license plate image to deform, block or reflect, affecting the recognition accuracy and efficiency.
Using the camera angle adjustment method based on artificial intelligence, by obtaining each frame of the license plate and the recognition time, analyzing the position of the license plate angle, the confusion and inclination of the driving trajectory, dividing the recognition efficiency group, calculating the degree of camera angle deviation, determining and adjusting Camera angle for improved accuracy.
It improves the accuracy of camera angle adjustment and the efficiency of license plate recognition, and reduces image deformation and recognition errors caused by poor angles.
Smart Images

Figure CN118609113B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of camera angle adjustment, and in particular to a camera angle adjustment method and system based on artificial intelligence. Background Art
[0002] During the vehicle recognition process, the adjustment of the camera angle is crucial to ensure efficient and accurate license plate recognition. The correct camera angle can ensure the clarity and integrity of the license plate image and reduce image deformation, occlusion or reflection problems caused by improper angles.
[0003] Whether the license plate recognition system can work properly has a lot to do with the angle of the license plate camera. If the license plate camera in the parking lot has a bad angle, it will affect the accuracy of license plate recognition and work efficiency. In general, the camera angle is usually fixed for shooting during license plate recognition. However, since the angle and speed of vehicles entering and leaving the parking lot are different, if the camera angle is bad, the license plate may appear trapezoidal or diamond-shaped in the captured image, and the characters on the license plate will also be deformed accordingly, which will affect recognition. Therefore, it is necessary to adjust the angle of the camera. Summary of the invention
[0004] In view of the above problems, it is necessary to provide a camera angle adjustment method and system based on artificial intelligence to adjust the angle of the camera and improve the accuracy of the camera angle adjustment:
[0005] In a first aspect, an embodiment of the present application provides a camera angle adjustment method based on artificial intelligence, the method comprising the following steps:
[0006] Get all the frame images of each vehicle captured by the camera, as well as the recognition time of each license plate;
[0007] Based on the distribution of the position coordinates of each corner of each vehicle's license plate in all frame images, the disorder of the driving trajectory of each corner of each vehicle's license plate in each frame is determined;
[0008] Determine the difference of the driving trajectory of each license plate based on the difference between the chaos of the driving trajectory of all frames at different corners of each license plate;
[0009] Based on the tilt angle of the license plate frame relative to the image boundary in all frame images of each license plate, combined with the difference, determine the tilt of each license plate during the recognition process;
[0010] Divide all license plate recognition times within a preset time period into a low recognition efficiency group and a high recognition efficiency group, determine the degree of camera angle deviation based on the difference in corresponding inclination between data in the low recognition efficiency group and the high recognition efficiency group, combined with the total number of data in the low recognition efficiency group and the total number of license plate recognitions within the preset time period;
[0011] Whether to adjust the camera angle is determined based on the degree value, and the adjustment method is: adjusting the camera angle based on the tilt angles of all license plates in the low recognition efficiency group.
[0012] In one embodiment, the process of determining the disorder is:
[0013] A deep learning model is used to obtain the position coordinates of the four corners of the license plate in each frame of the image;
[0014] Obtain a fitting curve of the position coordinates of any corner of the license plate of any vehicle in all frame images, and calculate the curvature of the fitting curve at the corresponding position coordinates in each frame;
[0015] Calculate the distance between the position coordinates of any corner in each frame image and the adjacent next frame image, and calculate the product of the distance and the camera frame rate;
[0016] The fusion result of the curvature and the product is used as the chaos of the driving trajectory of any corner in each frame.
[0017] In one embodiment, the process of determining the difference is:
[0018] The chaos of the driving trajectory of each corner of each vehicle's license plate in all frames is arranged in time sequence to form a chaos sequence of each corner of each vehicle's license plate;
[0019] The mean of the distances between the chaotic sequences of all two arbitrary corners of each license plate is taken as the difference in the driving trajectory of each license plate.
[0020] In one embodiment, the process of determining the inclination is:
[0021] Determine the tilt value of each license plate based on the tilt angle of the license plate frame relative to the image boundary in all frame images of each license plate;
[0022] The product of the tilt value of each license plate and the difference is used as the tilt of each license plate during the recognition process.
[0023] In one embodiment, the process of determining the tilt value is as follows:
[0024] Establish a rectangular coordinate system with the upper left corner of each frame image as the origin;
[0025] For any frame image of any license plate, respectively calculate the vertical inclination angle of the vector formed by the position coordinates of the upper left corner and the lower left corner of the license plate, and the vector formed by the position coordinates of the upper right corner and the lower right corner of the license plate relative to the vertical coordinate axis;
[0026] Calculate the horizontal inclination angles of the vectors formed by the coordinates of the upper left corner and the upper right corner of the license plate, and the vectors formed by the coordinates of the lower left corner and the lower right corner of the license plate relative to the horizontal coordinate axis;
[0027] The sum of all the vertical tilt angles and the horizontal tilt angle is used as the tilt amount of the license plate of any license plate in any frame image;
[0028] The average value of the inclination of each license plate in all frame images is taken as the inclination value of each license plate.
[0029] In one of the embodiments, the process of obtaining the low recognition efficiency group and the high recognition efficiency group is: using a clustering algorithm to divide the recognition time of all license plates within a preset time period into two groups, taking a group of data with the largest mean recognition time as the low recognition efficiency group, and recording the other group as the high recognition efficiency group.
[0030] In one embodiment, the process of determining the degree value is:
[0031] The ratio of the total number of data in the low recognition efficiency group to the total number of license plate recognitions in a preset time period is used as the impact weight of the camera angle deviation;
[0032] Calculate the cumulative sum of the corresponding inclination differences between any data in the low recognition efficiency group and all data in the high recognition efficiency group, and calculate the mean of the cumulative sum of all data in the low recognition efficiency group, which is recorded as the inclination mean;
[0033] The product of the influence weight and the tilt mean is used as the degree value of the camera angle deviation.
[0034] In one embodiment, the method for determining whether to adjust the camera angle is as follows: when the normalized result of the degree value is greater than or equal to a preset adjustment threshold, the camera angle is adjusted; otherwise, the camera angle is not adjusted.
[0035] In one of the embodiments, the process of adjusting the camera angle based on the inclination angle of all license plates in the low recognition efficiency group is: taking the average horizontal inclination angle and the average vertical inclination angle of all license plates corresponding to all data in the low recognition efficiency group in all frame images as the horizontal adjustment amount and the vertical adjustment amount of the camera, respectively.
[0036] In a second aspect, an embodiment of the present application also provides an artificial intelligence-based camera angle adjustment system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned artificial intelligence-based camera angle adjustment methods when executing the computer program.
[0037] This application has at least the following beneficial effects:
[0038] This application aims at the problem that in the traditional license plate recognition system, due to the influence of different angles and speeds when vehicles enter and exit the parking lot, the fixed camera angle may lead to low accuracy and efficiency of license plate recognition. This application obtains the position information and recognition time of each license plate during the recognition process, analyzes the curvature and driving speed characteristics of each corner running track of the license plate, and determines the inclination of the license plate during the recognition process by combining the differences between the running tracks at different angles and the inclination of the license plate boundary, thereby improving the accuracy of analyzing the inclination of the license plate captured by the camera;
[0039] Furthermore, according to the difference between the inclinations at different recognition efficiencies within a day, the degree of camera angle deviation is determined, which reflects the degree of deviation of the angle between the camera and the license plate relative to the vertical alignment state, thus improving the accuracy of analyzing the degree of camera angle deviation;
[0040] Furthermore, the camera angle is adjusted based on the degree of camera angle deviation and the degree of inclination of the license plate boundary, thereby improving the accuracy of camera angle adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A flowchart of the steps of a camera angle adjustment method based on artificial intelligence provided by one embodiment of the present application;
[0043] Figure 2 Schematic diagram of the process flow for the determination of chaos;
[0044] Figure 3 It is a schematic diagram of the process of determining the tilt value;
[0045] Figure 4 Schematic diagram of the process of determining the degree value. DETAILED DESCRIPTION
[0046] In the description of the embodiments of the present application, words such as "exemplary", "or", "for example" and the like are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "or", "for example" and the like is intended to present related concepts in a concrete manner.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art in the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. It should be understood that, unless otherwise specified, " / " means or.
[0048] It should also be noted that the terms "first" and "second" in the present application are used to distinguish similar objects rather than to describe a specific order or sequence.
[0049] The specific scheme of the camera angle adjustment method and system based on artificial intelligence provided by the present application is described in detail below with reference to the accompanying drawings.
[0050] See also Figure 1 , which shows a flowchart of a camera angle adjustment method based on artificial intelligence provided by an embodiment of the present application, the method comprising the following steps:
[0051] Step 1: Obtain all frame images of each vehicle captured by the camera and the recognition time of each license plate.
[0052] Cameras are installed at the entrance and exit of the license plate recognition system to take pictures of the license plate. The license plate recognition system extracts and recognizes the license plate characters. According to the recognition results, it automatically controls the opening and closing of the gate to allow vehicles to enter or leave, or refuse vehicles to enter or leave. The vehicle will be recognized only after it enters the recognition area. The images taken by the camera during the recognition process of each vehicle in one day are obtained, and the frame rate of the camera is set to N fps. Each frame of the image contains the license plate area. Since the camera angle will affect the efficiency of license plate recognition to a certain extent, for example, the longer the license plate recognition time is, the worse the camera angle may be and the greater the tilt. Therefore, the recognition time of each vehicle by the license plate recognition system is obtained.
[0053] In one embodiment of the present application, the value of N is 30. The value of N is preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0054] Step 2, based on the distribution of the position coordinates of each corner of each vehicle's license plate in all frame images, determine the disorder of the driving trajectory of each corner of each vehicle's license plate in each frame.
[0055] The layout of the entrances and exits of different parking lots varies. Some may be located on uphill and downhill sections, while others may be located at turns. When vehicles approach the above entrances and exits, the driving speed they maintain is also different. The effect of the image of the vehicle information captured by the camera will be affected by the running speed. When the angle at which the camera captures the license plate is more inclined, that is, it is not horizontal or vertical, the faster the vehicle is traveling, the more blurred the character information of the license plate in the picture is, and the less conducive it is to rapid recognition. Therefore, the driving trajectory of the license plate in the camera picture after entering the recognition area is analyzed to determine the influence of the camera shooting angle on the license plate recognition efficiency of the vehicle under different driving modes.
[0056] This application uses a deep learning model for license plate recognition to obtain the position information of the license plate in each frame image, that is, the position coordinates of the four corners of the license plate.
[0057] In one embodiment of the present application, the YOLOv5 deep learning model is used for license plate recognition, the loss function is an IoU-based loss function, and the optimizer is Adam. As other implementation methods, on the basis of realizing license plate recognition, the implementer can use other existing technologies for license plate recognition, such as YOLOv7, YOLOv8 deep learning models, etc., and this application does not impose any special restrictions.
[0058] The motion state of the license plate can be reflected by the motion state of its four corners. Therefore, the driving trajectory of the license plate is analyzed based on the position coordinates of the four corners. A rectangular coordinate system is established with the upper left corner of each frame image as the origin. Taking the upper left corner of the license plate as an example, a fitting curve of the position coordinates of the upper left corner of each vehicle's license plate in all frame images is obtained to reflect the driving trajectory of the upper left corner of each vehicle's license plate.
[0059] The greater the angle of the vehicle's turn, the greater the tilt of the license plate in the camera may be, and the more irregular the driving trajectories of the four corners of the license plate will be, and there may be curvature. Taking the upper left corner of the license plate as an example, in order to analyze the curvature of the driving trajectory of the upper left corner of the license plate, the curvature of each fitting curve at the corresponding position coordinates of each frame is calculated respectively, reflecting the curvature of the driving trajectory of the upper left corner of the license plate. The greater the curvature, the greater the curvature of the driving trajectory of the upper left corner of the license plate.
[0060] In one embodiment of the present application, the least squares method is used for curve fitting. As other implementation methods, on the basis of curve fitting, the implementer may use other existing technologies for curve fitting, such as local weighted regression, K-nearest neighbor regression, etc., and the present application does not impose any special restrictions.
[0061] In addition, when the license plate is tilted more in the camera, the driving speed at each corner of the license plate is different. Taking the upper left corner of the license plate as an example, the distance between the position coordinates of the upper left corner of each vehicle's license plate in each frame image and the adjacent frame image is calculated. Since the time interval between two adjacent frames is seconds, so the distance is The ratio of seconds can reflect the driving speed of the upper left corner of each vehicle's license plate in each frame. The larger the ratio, the faster the driving speed of the upper left corner of the license plate. Among them, the ratio of the last frame image of each vehicle is the same as the adjacent previous frame image.
[0062] In one embodiment of the present application, the distance between two location coordinates is the Euclidean distance. As other implementation methods, based on the measurable distance between the two location coordinates, the implementer may use other existing technologies to obtain the distance between the two location coordinates, such as Manhattan distance, Minkowski distance, etc., and the present application does not impose any special restrictions.
[0063] The fusion result of the curvature and the ratio is used as the chaos of the driving trajectory of the upper left corner of the license plate of each vehicle in each frame.
[0064] It should be understood that fusion refers to combining multiple independent variables in a way that enhances the overall effect, such as multiplication relationship, addition relationship, etc., and implementers can limit it according to actual conditions.
[0065] In one embodiment of the present application, the product of the curvature and the ratio is used as the disorder of the driving trajectory of the upper left corner of the license plate of each vehicle in each frame.
[0066] In one embodiment of the present application, the sum of the curvature and the ratio is used as the disorder of the driving trajectory of the upper left corner of the license plate of each vehicle in each frame.
[0067] It should be noted that the greater the chaos, the more irregular the driving trajectory of the upper left corner of the license plate during the camera shooting, and the more likely it is that the recognition effect will be poor due to the angle deviation between the camera and the license plate. Figure 2 shown.
[0068] Step 3, based on the difference between the chaos of the driving trajectories of all frames at different corners of each license plate, determine the difference of the driving trajectory of each license plate.
[0069] When vehicles enter or leave the parking lot, the angle at which the camera captures the license plate may be tilted due to the different license plate installation positions of different types of vehicles, the slope of the roadside, and the different angles at which the vehicle enters or exits. Ideally, in order to maximize the accuracy and efficiency of license plate recognition, the camera and the license plate should be in vertical alignment, that is, the angle between the camera and the license plate is 90 degrees. 0, to avoid the distortion or partial occlusion of license plate characters due to poor shooting angles. Therefore, further analysis is conducted on the angle change between the camera and the license plate and the tilt of the license plate when the camera is shooting.
[0070] The chaos of the driving trajectory of each corner of each vehicle's license plate in all frames is arranged in time sequence to form a chaotic sequence of each corner of each vehicle's license plate. During the license plate recognition process, the angle between the camera and the license plate may change, resulting in changes in the tilt of the license plate captured by the camera, and the driving trajectories of the four corners of the license plate are inconsistent. When the tilt of the camera when capturing the license plate is greater, the difference between the driving trajectories of the four corners of the license plate is greater. The mean of the distance between the chaotic sequences of all two arbitrary corners of each license plate is taken as the difference of the driving trajectory of each license plate. The greater the difference, the more significant the change in the angle between the camera and the license plate during the license plate recognition process.
[0071] In one embodiment of the present application, the distance between chaotic sequences is the DTW distance. As other implementations, on the basis of the measurable distance between chaotic sequences, the implementer may adopt other existing technologies to obtain the distance between chaotic sequences, such as Euclidean distance, Manhattan distance, etc., and the present application does not impose any special restrictions.
[0072] Step 4: Based on the inclination angle of the license plate frame of each license plate relative to the image boundary in all frame images, combined with the difference, determine the inclination of each license plate during the recognition process.
[0073] Furthermore, the horizontal and vertical states of the border of the license plate photographed by the camera are analyzed to determine the degree of inclination of the license plate photographed by the camera. For any frame image of any license plate, the vertical inclination angle of the coordinate vectors of the upper left corner and the lower left corner of the license plate, and the coordinate vectors of the upper right corner and the lower right corner of the license plate relative to the vertical coordinate axis are calculated respectively; the horizontal inclination angle of the coordinate vectors of the upper left corner and the upper right corner of the license plate, and the coordinate vectors of the lower left corner and the lower right corner of the license plate relative to the horizontal coordinate axis are calculated respectively. Among them, the direction of each of the above vectors is consistent with the positive direction of the coordinate axis in the coordinate system.
[0074] The sum of all the vertical tilt angles and the horizontal tilt angles of any frame image of any license plate is taken as the license plate tilt of any license plate in any frame image, and the average of the license plate tilt of each license plate in all frame images is taken as the tilt value of each license plate. The larger the tilt value, the greater the tilt of the license plate captured by the camera during the license plate recognition process. The vertical tilt angle and the horizontal tilt angle can be calculated by the inverse tangent function. The specific calculation process is a well-known technology and will not be repeated in this application. The schematic diagram of the process of determining the tilt value is shown in FIG. Figure 3 shown.
[0075] Based on the above analysis, the inclination of each license plate during the recognition process is calculated. The specific formula is as follows:
[0076] ; In the formula, represents the inclination of the jth license plate during the recognition process, represents the difference of the driving trajectory of the jth license plate, Indicates the inclination value of the jth license plate. The larger the inclination, the more obvious the change in the angle between the camera and the license plate during the license plate recognition process, and the greater the inclination of the license plate captured by the camera.
[0077] Step 5, divide all license plate recognition times within a preset time period into a low recognition efficiency group and a high recognition efficiency group, determine the degree of camera angle deviation based on the difference in corresponding inclinations between the data in the low recognition efficiency group and the high recognition efficiency group, combined with the total number of data in the low recognition efficiency group and the total number of license plate recognitions within the preset time period.
[0078] The angle between the camera and the license plate has a certain impact on the recognition efficiency. The greater the inclination, the longer the corresponding license plate recognition time may be. Based on this feature, the license plates with longer recognition time are obtained, and the clustering algorithm is used to divide the recognition time of all license plates in one day into two groups. The group with the largest mean recognition time is regarded as the low recognition efficiency group, and the other group is recorded as the high recognition efficiency group. The long recognition time may be caused by the poor camera angle. Further, the influence of the camera angle on the license plate recognition efficiency in one day is analyzed.
[0079] In one embodiment of the present application, a K-means clustering algorithm is used to group the recognition time. As other implementation methods, on the basis of being able to group the recognition time, the implementer may use other existing technologies to group the recognition time, such as the Density Peak Clustering Algorithm (DPC), DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm, etc. This application does not impose any special restrictions.
[0080] The ratio of the total number of data in the low recognition efficiency group to the total number of license plate recognitions in one day is used as the influence weight of the camera angle deviation; the cumulative sum of the corresponding inclination differences between any data in the low recognition efficiency group and all the data in the high recognition efficiency group is calculated, and the mean of the cumulative sum of all the data in the low recognition efficiency group is calculated and recorded as the inclination mean; the product of the influence weight and the inclination mean is used as the degree value of the camera angle deviation.
[0081] In one embodiment of the present application, the difference between the inclinations is the absolute value of the difference. As other implementation methods, based on the measurable difference between the inclinations, the implementer may use other calculation methods to measure the difference between the inclinations, such as ratio, square of the difference, etc., and the present application does not impose any special restrictions.
[0082] It should be noted that: the greater the impact weight, the more license plates with low recognition efficiency in a day, the greater the tilt mean, and the greater the interference caused by the tilt degree on accurate license plate recognition; the larger the degree value, the greater the overall deviation of the angle between the camera and all license plates in a day relative to the vertical alignment state, and the greater the degree of adjustment required. The flowchart for determining the degree value is shown in the figure. Figure 4 shown.
[0083] Step 6: determine whether to adjust the camera angle based on the degree value, and the adjustment method is: adjust the camera angle based on the tilt angles of all license plates in the low recognition efficiency group.
[0084] The degree value of the camera angle deviation reflects, to a certain extent, the degree of deviation of the angle between the camera and the license plate from the vertical alignment state. The larger the degree value, the greater the deviation from the vertical alignment, which is less conducive to the rapid recognition of the license plate. The smaller the degree value, the closer to the vertical alignment state, and the faster the recognition rate. Therefore, the larger the degree value, the more it is necessary to adjust the camera angle. Normalize the degree value: ; In the formula, S is the normalized result of the degree value, exp() is an exponential function with the natural constant e as the base, and R is the degree value of the camera angle deviation.
[0085] When the normalized result of the degree value is greater than or equal to the preset adjustment threshold, the camera angle is adjusted, otherwise, the camera angle is not adjusted. The specific adjustment method is to use the average horizontal tilt angle of all license plates corresponding to all data in the low recognition efficiency group in all frame images as the camera horizontal adjustment amount, and use the average vertical tilt angle of all license plates corresponding to all data in the low recognition efficiency group in all frame images as the camera vertical adjustment amount. The specific adjustment direction is determined according to the actual scene.
[0086] In one embodiment of the present application, the value of the preset adjustment threshold is 0.8. The value of the preset adjustment threshold is preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0087] Based on the same inventive concept as the above method, an embodiment of the present application also provides an artificial intelligence-based camera angle adjustment system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned artificial intelligence-based camera angle adjustment methods are implemented.
[0088] In summary, the present application aims at the problem that in the traditional license plate recognition system, due to the influence of different angles and speeds of vehicles entering and exiting the parking lot, the fixed camera angle may lead to low accuracy and efficiency of license plate recognition. The present application obtains the position information and recognition time of each license plate during the recognition process, analyzes the curvature and driving speed characteristics of each corner running track of the license plate, and determines the inclination of the license plate during the recognition process by combining the differences between the running tracks at different angles and the inclination of the license plate boundary, thereby improving the accuracy of analyzing the inclination of the license plate captured by the camera;
[0089] Furthermore, according to the difference between the inclinations at different recognition efficiencies within a day, the degree of camera angle deviation is determined, which reflects the degree of deviation of the angle between the camera and the license plate relative to the vertical alignment state, thus improving the accuracy of analyzing the degree of camera angle deviation;
[0090] Furthermore, the camera angle is adjusted based on the degree of camera angle deviation and the degree of inclination of the license plate boundary, thereby improving the accuracy of camera angle adjustment.
[0091] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
[0092] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the basic features of the present application. Therefore, no matter from which point of view, the above embodiments of the present application should be regarded as exemplary and non-restrictive.
Claims
1. Camera angle adjustment method based on artificial intelligence, It is characterized in that The method comprises the following steps: Get all the frame images of each vehicle captured by the camera, as well as the recognition time of each license plate; Based on the distribution of the position coordinates of each corner of each vehicle's license plate in all frame images, the disorder of the driving trajectory of each corner of each vehicle's license plate in each frame is determined; Determine the difference of the driving trajectory of each license plate based on the difference between the chaos of the driving trajectory of all frames at different corners of each license plate; Based on the tilt angle of the license plate frame relative to the image boundary in all frame images of each license plate, combined with the difference, determine the tilt of each license plate during the recognition process; Divide all license plate recognition times within a preset time period into a low recognition efficiency group and a high recognition efficiency group, determine the degree of camera angle deviation based on the difference in corresponding inclination between data in the low recognition efficiency group and the high recognition efficiency group, combined with the total number of data in the low recognition efficiency group and the total number of license plate recognitions within the preset time period; Determining whether to adjust the camera angle based on the degree value, the adjustment method is: adjusting the camera angle based on the tilt angles of all license plates in the low recognition efficiency group; The process of determining the disorder is as follows: A deep learning model is used to obtain the position coordinates of the four corners of the license plate in each frame of the image; Obtain a fitting curve of the position coordinates of any corner of the license plate of any vehicle in all frame images, and calculate the curvature of the fitting curve at the corresponding position coordinates in each frame; Calculate the distance between the position coordinates of any corner in each frame image and the adjacent next frame image, and calculate the product of the distance and the camera frame rate; The fusion result of the curvature and the product is used as the chaos of the driving trajectory of any corner in each frame.
2. The camera angle adjustment method based on artificial intelligence as claimed in claim 1, It is characterized in that The process of determining the difference is: The chaos of the driving trajectory of each corner of each vehicle's license plate in all frames is arranged in time sequence to form a chaos sequence of each corner of each vehicle's license plate; The mean of the distances between the chaotic sequences of all two arbitrary corners of each license plate is taken as the difference in the driving trajectory of each license plate.
3. The camera angle adjustment method based on artificial intelligence as claimed in claim 1, It is characterized in that The process of determining the inclination is as follows: Determine the tilt value of each license plate based on the tilt angle of the license plate frame relative to the image boundary in all frame images of each license plate; The product of the tilt value of each license plate and the difference is used as the tilt of each license plate during the recognition process.
4. The camera angle adjustment method based on artificial intelligence as claimed in claim 3, It is characterized in that The process of determining the tilt value is as follows: Establish a rectangular coordinate system with the upper left corner of each frame image as the origin; For any frame image of any license plate, respectively calculate the vertical inclination angle of the vector formed by the position coordinates of the upper left corner and the lower left corner of the license plate, and the vector formed by the position coordinates of the upper right corner and the lower right corner of the license plate relative to the vertical coordinate axis; Calculate the horizontal inclination angles of the vectors formed by the coordinates of the upper left corner and the upper right corner of the license plate, and the vectors formed by the coordinates of the lower left corner and the lower right corner of the license plate relative to the horizontal coordinate axis; The sum of all the vertical tilt angles and the horizontal tilt angle is used as the tilt amount of the license plate of any license plate in any frame image; The average value of the inclination of each license plate in all frame images is taken as the inclination value of each license plate.
5. The camera angle adjustment method based on artificial intelligence as claimed in claim 1, It is characterized in that The process of obtaining the low recognition efficiency group and the high recognition efficiency group is as follows: a clustering algorithm is used to divide the recognition time of all license plates within a preset time period into two groups, and the group of data with the largest mean recognition time is taken as the low recognition efficiency group, and the other group is recorded as the high recognition efficiency group.
6. The camera angle adjustment method based on artificial intelligence as claimed in claim 1, It is characterized in that The process of determining the degree value is: The ratio of the total number of data in the low recognition efficiency group to the total number of license plate recognitions in a preset time period is used as the impact weight of the camera angle deviation; Calculate the cumulative sum of the corresponding inclination differences between any data in the low recognition efficiency group and all data in the high recognition efficiency group, and calculate the mean of the cumulative sum of all data in the low recognition efficiency group, which is recorded as the inclination mean; The product of the influence weight and the tilt mean is used as the degree value of the camera angle deviation.
7. The camera angle adjustment method based on artificial intelligence as claimed in claim 1, It is characterized in that The method for determining whether to adjust the camera angle is as follows: when the normalized result of the degree value is greater than or equal to a preset adjustment threshold, the camera angle is adjusted; otherwise, the camera angle is not adjusted.
8. The camera angle adjustment method based on artificial intelligence as claimed in claim 1, It is characterized in that The process of adjusting the camera angle based on the inclination angle of all license plates in the low recognition efficiency group is as follows: taking the average horizontal inclination angle and the average vertical inclination angle of all license plates corresponding to the data in the low recognition efficiency group in all frame images as the horizontal adjustment amount and the vertical adjustment amount of the camera, respectively.
9. A camera angle adjustment system based on artificial intelligence, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, It is characterized in that When the processor executes the computer program, the steps of the camera angle adjustment method based on artificial intelligence as described in any one of claims 1-8 are implemented.
