A campus vehicle cross-domain tracking method, system, device and storage medium
By employing license plate tilt correction and super-resolution reconstruction technology based on orientation field in campus scenarios, the problem of decreased license plate recognition accuracy was solved, enabling seamless vehicle tracking between different areas and cameras, and improving traffic management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2023-09-04
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies struggle to effectively address the decline in license plate recognition accuracy in campus settings caused by factors such as changes in viewing angle, lighting conditions, and occlusion. Furthermore, traditional methods are unable to achieve seamless vehicle tracking between different areas and cameras.
A license plate tilt correction algorithm based on orientation field and super-resolution reconstruction technology are adopted. The tilt angle of the license plate image is estimated for correction, and an improved super-resolution generative adversarial network model is used to improve the image resolution. The vehicle's historical trajectory is drawn by combining the license plate character sequence and camera information.
It improves the accuracy and efficiency of license plate recognition, reduces the pressure of manual supervision, enables accurate identification and seamless tracking of vehicles on campus, and enhances the efficiency of traffic incident detection and handling.
Smart Images

Figure CN117079261B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection and recognition technology, and in particular to a method, system, device and storage medium for cross-domain tracking of campus vehicles. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] As universities continue to expand, the number of vehicles belonging to students, faculty, staff, and visitors is gradually increasing, posing increasingly severe challenges to campus traffic management. Especially during peak traffic hours, traditional vehicle management methods, such as manual patrols and recording, are no longer sufficient to accurately identify and track large numbers of vehicles in real time. Furthermore, the large number of surveillance cameras on campus coupled with a relative shortage of monitoring personnel creates a mismatch between monitoring resources and management needs, making it difficult to monitor all traffic issues in real time.
[0004] Vehicle cross-domain tracking technology can achieve seamless tracking of vehicles in different areas and between different cameras on campus. It can overcome the problem of insufficient human resources, monitor campus traffic conditions in a more intelligent and efficient way, and accurately identify vehicles and map their historical trajectories over a period of time.
[0005] Cross-domain vehicle tracking in campus scenarios involves target recognition across different time periods and campus areas, requiring the overcoming of challenges such as changes in viewpoint, lighting, occlusion, and appearance. In real campus traffic scenarios, local areas of license plate images are affected by interference factors such as changes in lighting and occlusion. Furthermore, due to factors such as installation location and vehicle vibration, license plates may not only be tilted horizontally but may also be rotated or distorted. Moreover, the degree of tilt may vary in different areas of the license plate image, and existing methods do not take these issues into account. Summary of the Invention
[0006] To address the aforementioned issues, this invention proposes a cross-domain tracking method, system, device, and storage medium for campus vehicles. For the extracted license plate images, a license plate tilt correction algorithm based on the orientation field is employed to resolve the issue of decreased license plate recognition accuracy due to changes in viewing angle. Super-resolution reconstruction reduces the impact of illumination variations and low image resolution on license plate recognition accuracy. By combining the license plate character sequence recognition results with the corresponding image acquisition time and camera number, the historical trajectory of the target vehicle over a period of time is plotted, alleviating the burden of manual supervision and improving the efficiency of detecting and handling traffic incidents on campus.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] In a first aspect, the present invention provides a method for cross-domain tracking of campus vehicles, comprising:
[0009] Acquire vehicle images captured by the numbered cameras;
[0010] License plate detection is performed on vehicle images, and the obtained license plate images are tilt-corrected. After super-resolution reconstruction of the corrected license plate images, the license plate character sequence is identified. Specifically, the vertical and horizontal tilt angles are estimated based on the gradient information of the license plate images, and tilt correction is performed accordingly.
[0011] A vehicle information set is constructed based on the license plate character sequence, the corresponding image acquisition time, and the camera number.
[0012] The system filters license plate character sequences that match the license plate of the target vehicle within a specified time period from the vehicle information set. The location of the target vehicle is determined based on the camera number corresponding to the matching license plate character sequence, and the driving trajectory of the target vehicle is determined by combining the corresponding image acquisition time.
[0013] As an alternative implementation, the process of estimating the vertical tilt angle and the horizontal tilt angle includes:
[0014] The license plate image is divided into several non-overlapping sub-blocks, and the feature values and corresponding feature vectors of each sub-block image are calculated based on the image gradient.
[0015] Iterate through the sampling points, calculate the angle of the feature vector at each sampling point, and add it to the angle statistics array;
[0016] Based on the preset angle range, the angle with the most occurrences is selected from the angle statistics array as the vertical tilt angle and the horizontal tilt angle.
[0017] As an alternative implementation, the gradient vector in the local neighborhood of the pixel is calculated, the covariance matrix is calculated based on the gradient vector, and the eigenvalues and corresponding eigenvectors are obtained by performing eigenvalue decomposition on the covariance matrix; wherein the eigenvectors represent the direction of gradient change, and the eigenvalues represent the intensity of change in a specific direction.
[0018] As an alternative implementation, the vertical angle range is 30 degrees to 150 degrees. The vertical tilt angle is determined by statistically analyzing the angles that appear most frequently in the angle statistics array within the vertical angle range.
[0019] As an alternative implementation, the horizontal angle range includes a horizontal angle range to the left and a horizontal angle range to the right, which are 0 to 30 degrees and 150 to 180 degrees, respectively.
[0020] The angle X1 in the horizontal leftward tilt direction is determined by statistically analyzing the angle that appears most frequently in the angle statistics array within the horizontal leftward angle range.
[0021] The horizontal tilt angle X2 is determined by statistically analyzing the angle that appears most frequently in the angle statistics array within the horizontal rightward angle range.
[0022] If X1 is greater than 180-X2, then X1 is used as the horizontal tilt angle; otherwise, X2 is used as the horizontal tilt angle.
[0023] As an alternative implementation, the corrected license plate image is reconstructed using an improved super-resolution generative adversarial network model; wherein, the improved super-resolution generative adversarial network model removes the batch normalization layer in the residual block and adds a 1×1 convolutional layer after the activation function of the residual block and before the residual connection.
[0024] As an alternative implementation, a search is performed in the vehicle information set according to a specified time period to filter out license plate character sequences within the specified time period. In the filtered license plate character sequences, a search is continued to be performed to find license plate character sequences that are completely identical to the target vehicle's license plate in 5 or more of the 7 or 8 characters. The corresponding image acquisition time and camera number are then determined. The camera number is assigned based on the camera's location and orientation.
[0025] Secondly, the present invention provides a campus vehicle cross-domain tracking system, comprising:
[0026] The acquisition module is configured to acquire vehicle images captured by numbered cameras;
[0027] The license plate recognition module is configured to detect license plates in vehicle images, perform tilt correction on the obtained license plate images, and reconstruct the corrected license plate images using super-resolution to identify the license plate character sequence; wherein, the vertical tilt angle and horizontal tilt angle are estimated based on the gradient information of the license plate image, and tilt correction is performed accordingly.
[0028] The license plate storage module is configured to construct a vehicle information set based on the license plate character sequence, the corresponding image acquisition time, and the camera number;
[0029] The trajectory tracking module is configured to filter license plate character sequences that match the license plate of the target vehicle within a specified time period from the vehicle information set, determine the location of the target vehicle based on the camera number corresponding to the matched license plate character sequence, and determine the driving trajectory of the target vehicle by combining the corresponding image acquisition time.
[0030] Thirdly, the present invention provides an electronic device including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the first aspect.
[0031] Fourthly, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in the first aspect.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] This invention extracts license plate images from complex scenes and employs a license plate tilt correction algorithm based on directional fields to address the problem of decreased license plate recognition accuracy caused by changes in viewing angle. It also utilizes a super-resolution reconstruction algorithm based on generative adversarial networks to reduce the impact of lighting variations and low image resolution on license plate recognition accuracy. By combining the license plate character sequence recognition results with the corresponding image acquisition time and camera number, the historical trajectory of the target vehicle over a period of time can be mapped. Applying this cross-domain vehicle tracking method in campus scenarios reduces the burden of manual supervision, improves the detection and processing efficiency of traffic incidents on campus, and makes a positive contribution to smooth and safe campus traffic.
[0034] This invention targets tilted license plate images captured in real campus traffic scenarios. Based on the concept of directional field, it estimates the tilt angle of the license plate image by statistically analyzing the texture density in different directions of the image. The tilt angles in the vertical and horizontal directions are then used for correction, thus solving the problem of low accuracy in tilted license plate recognition.
[0035] This invention addresses blurry, low-resolution license plate images captured in real-world campus traffic scenarios. It utilizes a super-resolution generative adversarial network (GAN) model for super-resolution reconstruction. This model removes the batch normalization layer from the residual blocks, which helps retain more details and textures, reduces the impact of noise, and generates clearer license plate images with more detailed features. This improves the reconstruction effect, simplifies the model structure, and makes the model easier to train and understand.
[0036] The super-resolution generative adversarial network model of this invention adds a 1×1 convolutional layer after the activation function of the residual block and before the residual connection, introducing additional nonlinear transformations, which helps to learn more complex feature representations and mappings, capture more complex features and image details, and improve the model's expressive power. At the same time, the 1×1 convolutional layer is used to adjust the number of channels of features in the residual block. By increasing or decreasing the number of channels, the dimension of the features is transformed to adapt to different task requirements and complexities.
[0037] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0038] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0039] Figure 1 The flowchart is for the cross-domain tracking method for campus vehicles provided in Embodiment 1 of the present invention. Detailed Implementation
[0040] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0041] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0042] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form as well. Furthermore, it should be understood that the terms “comprising” and “including”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.
[0043] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0044] Example 1
[0045] This embodiment provides a method for cross-domain tracking of campus vehicles, such as... Figure 1 As shown, it includes:
[0046] Acquire vehicle images captured by the numbered cameras;
[0047] License plate detection is performed on vehicle images, and the obtained license plate images are tilt-corrected. After super-resolution reconstruction of the corrected license plate images, the license plate character sequence is identified. Specifically, the vertical and horizontal tilt angles are estimated based on the gradient information of the license plate images, and tilt correction is performed accordingly.
[0048] A vehicle information set is constructed based on the license plate character sequence, the corresponding image acquisition time, and the camera number.
[0049] The system filters license plate character sequences that match the license plate of the target vehicle within a specified time period from the vehicle information set. The location of the target vehicle is determined based on the camera number corresponding to the matching license plate character sequence, and the driving trajectory of the target vehicle is determined by combining the corresponding image acquisition time.
[0050] In this embodiment, the surveillance cameras distributed along both sides of the campus roads are initialized, each camera is numbered, the real-time surveillance video data stream captured by each camera is obtained, and a campus vehicle monitoring distribution map can be drawn.
[0051] As an alternative implementation method, cameras along the campus roads are selected, choosing those capable of clearly capturing vehicle images. Then, the selected cameras are numbered sequentially according to the vehicle's route, and their monitoring orientation is clearly defined. Finally, a campus vehicle monitoring distribution map is drawn based on the camera's number, orientation, IP address, and corresponding location to better show the camera's location and monitoring range.
[0052] The cameras are numbered according to their number and orientation. The cameras are named C1_S, C2_E, C3_W, C4_N, etc., where C1, C2, C3, and C4 are the camera numbers, and S, E, W, and N represent the camera's orientation, with S representing south, E representing east, W representing west, and N representing north.
[0053] In this embodiment, the real-time monitoring video data stream of the selected camera is acquired, the monitoring video data stream is stored, a vehicle image is captured at the same time interval, all vehicle images captured by the same camera are stored in the same folder, and the folder is named with the camera number. At the same time, each vehicle image is named according to the shooting time.
[0054] In this embodiment, the YOLO model is used to detect license plates in vehicle images, and the license plate image is cropped from the vehicle images.
[0055] Specifically:
[0056] S1: Model training; YOLOv7 model was selected and trained using CCPD (Chinese City Parking Dataset).
[0057] YOLOv7 is an improved version of the YOLO (You Only Look Once) object detection algorithm. Its network structure includes feature extraction layers at different resolutions, each designed to detect targets of varying sizes. By fusing feature maps from different layers, YOLOv7 can simultaneously detect both small and large targets at different scales. The multi-scale detection mechanism introduced in YOLOv7 enhances its ability to detect small targets. Since license plates are relatively small and occupy a small portion of the original image, the YOLOv7 model is used for license plate detection.
[0058] The CCPD dataset contains license plate images from various urban parking lot scenes, covering diverse shooting angles, lighting conditions, license plate colors, and vehicle models. Furthermore, the dataset provides detailed annotations for each license plate image, including the license plate character sequence, license plate color, license plate type, vehicle brand, and model. Therefore, the CCPD dataset was used for training.
[0059] S2: License plate detection; The vehicle image is fed into the trained YOLOv7 network, and each captured vehicle image is tested to see if it contains a license plate. If a license plate is detected, the pixel coordinates of the four corner points of the license plate are output.
[0060] S3: Based on the pixel coordinates of the four corner points of the license plate, cut out an image containing only the license plate from the original vehicle image, and save the license plate image. The folder and image naming format are the same as the original vehicle image.
[0061] In this embodiment, a license plate correction algorithm based on orientation field is adopted. By statistically analyzing the texture density in different directions of the license plate image, the horizontal and vertical tilt angles are estimated, thereby correcting the license plate image. This effectively reduces the impact of tilted license plates on license plate recognition, improves recognition accuracy, and is applicable to the problem of large-angle tilted license plates in real-world scenarios.
[0062] The process of tilt correction for license plate images specifically includes:
[0063] S1: Divide the license plate image into several non-overlapping sub-blocks, and calculate the feature value and corresponding feature vector of each sub-block image based on the image gradient;
[0064] Specifically, the gradient vector in the local neighborhood of a pixel is first calculated using the Sobel operator.
[0065]
[0066]
[0067] Where A is the original image, G x and Gy These are the Sobel operators in the X and Y directions, respectively. These are the gradient components of the pixel (,y) in the x and y directions, respectively.
[0068] Then, the covariance matrix is calculated based on the gradient vector, which represents the statistics of gradient information in the local neighborhood around each pixel.
[0069]
[0070] Where s(p) is the local neighborhood of pixel p, and M is the covariance matrix constructed at pixel p.
[0071] Finally, by performing eigenvalue decomposition on the covariance matrix, we obtain the eigenvalues and the corresponding eigenvectors; where the eigenvectors represent the direction of gradient change, and the eigenvalues reflect the intensity of change in a specific direction.
[0072] M = V·Λ·V -1
[0073] Where M is the covariance matrix, V is the eigenvector matrix, and each column is an eigenvector; Λ is a diagonal matrix, and the elements on its diagonal are the eigenvalues λ.
[0074] In related technologies, a method for license plate tilt correction is employed by calculating the magnitude of the vertical edge gradient. This method primarily focuses on brightness variations in the vertical direction of the image. Because it only considers brightness variations, this method is sensitive to noise and may be affected by noise interference, leading to inaccurate tilt correction results. In real-world traffic scenarios on campuses, local areas of license plate images may be affected by factors such as lighting changes and occlusion, and this method has certain limitations in such scenarios.
[0075] The method proposed in this embodiment can provide directional information about local features in an image by calculating the angle of the feature vector, including the directionality of characters, signs, or textures. For license plate images, characters, signs, or textures usually have obvious directionality. Calculating the angle of the feature vector helps to capture and utilize these directional features, making tilt correction more accurate. Furthermore, this method helps to more accurately identify the direction of characters, improving the accuracy of subsequent character recognition. Simultaneously, the method proposed in this embodiment provides more accurate directional information through mathematical analysis, rather than focusing solely on image brightness variations, and is unaffected by the uniformity of pixel intensity distribution, thus exhibiting high accuracy.
[0076] In real-world traffic scenarios, local areas of license plate images may be affected by factors such as changes in lighting and occlusion. Therefore, calculating feature values and feature vectors on local sub-blocks effectively reduces the impact of noise and occlusion in local areas, improving the robustness of the correction algorithm. Furthermore, directly calculating feature values and feature vectors on the entire image is computationally intensive; dividing the image into smaller blocks reduces computational complexity and improves efficiency. Additionally, license plate images exhibit different degrees of tilt in different regions; dividing the image into smaller blocks allows for better capture of the tilt angles in different areas, thereby improving the accuracy of the correction.
[0077] S2: Angle statistics, iterate through the sampling points, calculate the angle of the feature vector at each sampling point, and add it to the angle statistics array;
[0078] Specifically, the purpose of setting sampling points is to analyze the angular distribution of feature vectors at different locations in the license plate image, thereby estimating the main tilt direction of the license plate; the angle statistics array records the distribution of feature vectors at different angles. By using the angle statistics array, we can find out at which angle the feature vectors are most distributed, thereby estimating the main tilt direction of the license plate image.
[0079] In this array, the index of the angle statistics array represents the angle, and the value in the array represents the number of times the feature vector of the corresponding angle appears.
[0080] S3: Based on the preset angle range, select the maximum value from the angle statistics array as the estimated vertical tilt angle and horizontal tilt angle;
[0081] Specifically, the angle range is preset according to the actual situation, with the vertical angle range being 30 degrees to 150 degrees; the angle that appears most frequently in the angle statistics array within the vertical angle range is counted to determine the vertical tilt angle;
[0082] The horizontal angle range includes the horizontal left angle range and the horizontal right angle range, which are 0 to 30 degrees and 150 to 180 degrees respectively. Among them, 0 to 30 degrees means that the license plate is tilted to the left in the horizontal direction, and 150 to 180 degrees means that the license plate is tilted to the right in the horizontal direction.
[0083] The angle that appears most frequently in the angle statistics array within the horizontal leftward angle range is counted to determine the horizontal leftward tilt angle X1;
[0084] The angle that appears most frequently in the angle statistics array within the horizontal rightward angle range is counted to determine the horizontal rightward tilt angle X2;
[0085] Compare the values of X1 and 180-X2 to determine the direction of greater tilt. If X1 is greater than 180-X2, it means that the tilt to the left is greater, so X1 is chosen as the horizontal tilt angle. Otherwise, X2 is chosen as the horizontal tilt angle.
[0086] This embodiment sets a vertical tilt angle to more comprehensively capture the tilt of the license plate image. In reality, due to various factors (such as installation location, vehicle vibration, etc.), license plates may not only be tilted horizontally, but may also be rotated or twisted. By setting a range for the vertical tilt angle and performing angle statistics, it is possible to detect whether the license plate image is tilted vertically and the degree of tilt, so as to perform tilt correction operations more accurately and obtain correction results that are more consistent with reality.
[0087] In this embodiment, super-resolution reconstruction is performed on the corrected license plate image to reconstruct a high-resolution license plate image with clear details from the blurry low-resolution license plate image.
[0088] Specifically, this includes: using an improved SRGAN (Super-Resolution Generative Adversarial Network) model for super-resolution reconstruction; and using the trained improved SRGAN model to convert low-resolution license plate images into high-resolution license plate images to obtain more details and clarity, thereby improving the accuracy of subsequent license plate recognition.
[0089] The SRGAN model consists of a generator and a discriminator. The generator is responsible for converting the input low-resolution image into a high-resolution image, typically using a convolutional neural network (CNN) to increase image resolution by stacking multiple convolutional layers and upsampling layers. The discriminator is responsible for determining whether the input image is a genuine high-resolution image or a fake image generated by the generator. The discriminator uses a CNN architecture and is trained to distinguish between real and generated images. SRGAN introduces the concept of adversarial networks, allowing the generator and discriminator to compete against each other, thereby improving the model's image super-resolution reconstruction capabilities.
[0090] SRGAN's generator comprises 16 residual block structures designed to enable the generator to learn effective mappings from low-resolution input images to generate high-resolution images with more detailed features. Each residual block contains convolutional layers, activation functions, batch normalization layers, and residual connections to help the model learn a non-linear mapping from input to output. Batch normalization (BN) layers are a common regularization technique in deep neural networks. In SRGAN, batch normalization layers are added after the convolutional layers to normalize the data within the layer. The basic idea of batch normalization is to standardize each mini-batch of input data so that its mean is close to 0 and its variance is close to 1.
[0091] The improved SRGAN model removes the batch normalization (BN) layer from the residual blocks. BN normalization standardizes each mini-batch of input during training, which may cause the generated images to lose some characteristics of the original images. Removing the BN layer allows the generator to more closely approximate the distribution of the original images, helping to preserve more details and textures, thus improving the performance of license plate super-resolution reconstruction. Simultaneously, BN normalization can introduce noise during training, especially in mini-batch training; removing the BN layer reduces the impact of this noise, contributing to the generation of clearer images. Furthermore, removing the BN layer simplifies the generator structure, reduces model complexity, and makes the model easier to train and understand. Therefore, removing the BN layer in the SRGAN model is more suitable for license plate image super-resolution reconstruction tasks.
[0092] The improved SRGAN model adds a 1×1 convolutional layer after the activation function of the residual block and before the residual connection, which can introduce additional non-linear transformations. This helps the model learn more complex feature representations and mappings, and helps capture more complex features and image details, thereby improving the model's expressive power. At the same time, the 1×1 convolutional layer can be used to adjust the number of channels of features in the residual block. By increasing or decreasing the number of channels, the dimensionality of the features can be transformed to adapt to different task requirements and complexities.
[0093] The dataset used in this embodiment to train the improved SRGAN model contains 800 high-resolution images from different scenes and themes, covering a wide range of content, including natural landscapes, people, and architecture. The diverse image content of this dataset, ranging from everyday scenes to natural landscapes, can cover various application areas.
[0094] In this embodiment, the high-resolution license plate image is used to recognize the license plate character sequence using a CRNN (Convolutional Recurrent Neural Network) model. The license plate character sequence includes province, numbers, English letters, etc.
[0095] The CRNN model combines the features of Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs), and is primarily used for text recognition tasks in images. It can directly identify text sequences from input images, providing an end-to-end text recognition solution.
[0096] The first half of a CRNN model is usually a convolutional neural network, which can effectively capture local features and textures in an image to extract text features from the image; the second half is a recurrent neural network, mainly a bidirectional long short-term memory network (BLSTM), which can capture contextual information and temporal relationships in a text sequence.
[0097] CRNN connects the outputs of CNN and RNN to form an end-to-end structure. The CNN part is used to extract features, and then the feature maps are arranged in time series and passed to the RNN part for text sequence modeling and prediction. CRNN is typically trained using a neural network-based temporal class classification loss function (CTC loss function), which allows the model to learn to classify sequences of variable length, enabling automatic alignment of the correspondence between text and images during recognition.
[0098] In this embodiment, the license plate character sequence is stored in a certain format to construct a vehicle information set, including the license plate character sequence, image acquisition time, and camera number.
[0099] Specify the desired time period and the target vehicle to be searched. Filter the vehicle information set to find license plate character sequences that match the target vehicle's license plate within the specified time period, and determine the corresponding image acquisition time and camera number. Determine the target vehicle's location based on the corresponding camera number, and then, combined with the corresponding image acquisition time, determine the target vehicle's trajectory. Simultaneously, the target vehicle's trajectory can be drawn on the campus vehicle monitoring distribution map to show the target vehicle's movement path within the campus.
[0100] As an alternative implementation method, a search is performed in the vehicle information set according to a specified time period to filter out all license plate character sequences within the specified time period. The search continues in the filtered license plate character sequences to find license plate information that is completely identical to the target vehicle's license plate in 7 or 8 characters in 5 or more characters.
[0101] Example 2
[0102] This embodiment provides a campus vehicle cross-domain tracking system, including:
[0103] The acquisition module is configured to acquire vehicle images captured by numbered cameras;
[0104] The license plate recognition module is configured to detect license plates in vehicle images, perform tilt correction on the obtained license plate images, and reconstruct the corrected license plate images using super-resolution to identify the license plate character sequence; wherein, the vertical tilt angle and horizontal tilt angle are estimated based on the gradient information of the license plate image, and tilt correction is performed accordingly.
[0105] The license plate storage module is configured to construct a vehicle information set based on the license plate character sequence, the corresponding image acquisition time, and the camera number;
[0106] The trajectory tracking module is configured to filter license plate character sequences that match the license plate of the target vehicle within a specified time period from the vehicle information set, determine the location of the target vehicle based on the camera number corresponding to the matched license plate character sequence, and determine the driving trajectory of the target vehicle by combining the corresponding image acquisition time.
[0107] It should be noted that the above modules correspond to the steps described in Embodiment 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should also be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.
[0108] In further embodiments, the following is also provided:
[0109] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method described in Embodiment 1. For brevity, further details are omitted here.
[0110] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0111] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.
[0112] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in Embodiment 1.
[0113] The method in Example 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.
[0114] Those skilled in the art will recognize that the units, i.e., algorithm steps, of the various examples described in connection with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0115] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for cross-domain tracking of campus vehicles, characterized in that, include: Acquire vehicle images captured by the numbered cameras; License plate detection is performed on vehicle images, and the obtained license plate images are tilt-corrected. After super-resolution reconstruction of the corrected license plate images, the license plate character sequence is identified. Specifically, the vertical and horizontal tilt angles are estimated based on the gradient information of the license plate images, and tilt correction is performed accordingly. A vehicle information set is constructed based on the license plate character sequence, the corresponding image acquisition time, and the camera number. The system filters license plate character sequences that match the license plate of the target vehicle within a specified time period from the vehicle information set. The location of the target vehicle is determined based on the camera number corresponding to the matching license plate character sequence, and the driving trajectory of the target vehicle is determined by combining the corresponding image acquisition time. The process of estimating the vertical and horizontal tilt angles includes: The license plate image is divided into several non-overlapping sub-blocks, and the feature values and corresponding feature vectors of each sub-block image are calculated based on the image gradient. Iterate through the sampling points, calculate the angle of the feature vector at each sampling point, and add it to the angle statistics array; Based on the preset angle range, the angle with the most occurrences is selected from the angle statistics array as the vertical tilt angle and the horizontal tilt angle.
2. The campus vehicle cross-domain tracking method as described in claim 1, characterized in that, The gradient vector within the local neighborhood of a pixel is calculated, and the covariance matrix is calculated based on the gradient vector. The covariance matrix is then decomposed into eigenvalues to obtain eigenvalues and corresponding eigenvectors. Here, the eigenvectors represent the direction of gradient change, and the eigenvalues represent the intensity of change in a specific direction.
3. The campus vehicle cross-domain tracking method as described in claim 1, characterized in that, The vertical angle range is from 30 degrees to 150 degrees. The vertical tilt angle is determined by statistically analyzing the angles that appear most frequently in the angle statistics array within the vertical angle range.
4. The campus vehicle cross-domain tracking method as described in claim 1, characterized in that, The horizontal angle range includes the horizontal angle range to the left and the horizontal angle range to the right, which are 0 to 30 degrees and 150 to 180 degrees, respectively; The angle X1 in the horizontal leftward tilt direction is determined by statistically analyzing the angle that appears most frequently in the angle statistics array within the horizontal leftward angle range. The horizontal tilt angle X2 is determined by statistically analyzing the angle that appears most frequently in the angle statistics array within the horizontal to right angle range. If X1 is greater than 180-X2, then X1 is used as the horizontal tilt angle; otherwise, X2 is used as the horizontal tilt angle.
5. The campus vehicle cross-domain tracking method as described in claim 1, characterized in that, The corrected license plate image is reconstructed using an improved super-resolution generative adversarial network model. The improved super-resolution generative adversarial network model removes the batch normalization layer in the residual block and adds a 1×1 convolutional layer after the activation function of the residual block and before the residual connection.
6. The campus vehicle cross-domain tracking method as described in claim 1, characterized in that, The system searches the vehicle information set according to a specified time period, filters out license plate character sequences within that time period, and then searches for license plate character sequences that are completely identical to the target vehicle's license plate in 7 or 8 characters in 5 or more characters. The corresponding image acquisition time and camera number are then determined. The camera number is assigned based on the camera's location and orientation.
7. A campus vehicle cross-domain tracking system, characterized in that, include: The acquisition module is configured to acquire vehicle images captured by numbered cameras; The license plate recognition module is configured to detect license plates in vehicle images, perform tilt correction on the obtained license plate images, and reconstruct the corrected license plate images using super-resolution to identify the license plate character sequence; wherein, the vertical tilt angle and horizontal tilt angle are estimated based on the gradient information of the license plate image, and tilt correction is performed accordingly. The process of estimating the vertical and horizontal tilt angles includes: The license plate image is divided into several non-overlapping sub-blocks, and the feature values and corresponding feature vectors of each sub-block image are calculated based on the image gradient. Iterate through the sampling points, calculate the angle of the feature vector at each sampling point, and add it to the angle statistics array; Based on the preset angle range, the angle with the most occurrences is selected from the angle statistics array as the vertical tilt angle and the horizontal tilt angle; The license plate storage module is configured to construct a vehicle information set based on the license plate character sequence, the corresponding image acquisition time, and the camera number; The trajectory tracking module is configured to filter license plate character sequences that match the license plate of the target vehicle within a specified time period from the vehicle information set, determine the location of the target vehicle based on the camera number corresponding to the matched license plate character sequence, and determine the driving trajectory of the target vehicle by combining the corresponding image acquisition time.
8. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, perform the method described in any one of claims 1-6.
Citation Information
Patent Citations
Vehicle license plate recognition method based on video
CN104050450A
Dynamic video road license plate identification method
CN107067002A