Parking lot panoramic safety monitoring method and system

By denoising, lighting compensation and image enhancement processing of real-time video streams in parking lots, combining deep learning and multi-objective tracking algorithms, the vehicle detection problem in severe weather and occlusion is solved, and accurate tracking and safety monitoring of every vehicle in the parking lot is achieved.

CN119600063AInactive Publication Date: 2025-03-11SHENZHEN DOOR INTELLIGENT CONTROL TECH

Patent Information

Application Number
CN202510142979.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-03-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify and detect every vehicle in a parking lot under severe weather and occlusion, resulting in the inability to effectively monitor the safety of the parking lot.

Method used

By obtaining the real-time video stream of the parking lot for denoising pre-processing, adaptive lighting compensation and image enhancement algorithms are used to deal with bad weather interference, and vehicle detection and feature extraction are carried out in combination with perspective transformation and deep learning technology. Feature matching and multi-objective tracking algorithms are used to determine the vehicle's movement trajectory and occlusion relationship.

Benefits of technology

It improves the clarity and accuracy of monitoring images in severe weather and occlusion, ensures accurate tracking and location judgment of each car in the parking lot, and improves the safety management capabilities of the parking lot.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600063A_ABST
    Figure CN119600063A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information, and discloses a parking lot panoramic safety monitoring method and system, and the method comprises the steps: obtaining a real-time video stream of a parking lot, and carrying out the denoising preprocessing of each frame of image, and obtaining a clear image; adjusting the brightness and the contrast ratio of the clear image by adopting a self-adaptive illumination compensation algorithm to obtain an illumination compensation image; according to the angle and distance change of the vehicle, correcting the vehicle image visual angle in the enhanced image by adopting a perspective transformation algorithm to obtain a perspective transformation image; identifying a vehicle position and a bounding box in the perspective transformation image by adopting a vehicle detection model based on deep learning, and determining a specific position of the vehicle in the image; and in the vehicle dense area, a multi-target tracking algorithm is combined with the moving tracks and the feature information of the vehicles, the shielding relation between the vehicles is judged, and the positions of the shielded vehicles are determined. The method can realize panoramic safety monitoring of the parking lot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method and system for panoramic safety monitoring of a parking lot. Background Art

[0002] At present, parking lots, as part of urban infrastructure, are becoming an increasingly important facility in daily life. With the acceleration of urbanization, the demand for parking has increased significantly, especially in parking lots near commercial areas, residential areas and transportation hubs. The safety management and intelligent monitoring of parking lots have become particularly important. Traditional manual management and simple video monitoring methods are gradually unable to meet modern needs. With the increasing complexity and continuous development of urban transportation intelligence, the importance of parking lot monitoring has become more prominent.

[0003] In one prior art, the method uses a camera to collect a video stream of a parking lot in real time. During the video stream transmission process, spatial filtering, such as Gaussian filtering and mean filtering, is used to smooth the image to reduce noise in the image and ensure image clarity. Vehicle detection is performed using a background subtraction method. In the background subtraction method, the background of the parking lot is static, and image differences different from the background are generated according to the movement of the vehicle, thereby performing detection. This technology uses a mean shift algorithm to estimate and predict the movement path of the vehicle, and tracks the movement trajectory of each vehicle based on a simple physical model. It is suitable for situations where the movement of vehicles in the parking lot is relatively stable.

[0004] The existing technology is not sensitive to bad weather and has difficulty dealing with occlusion. The technology is less effective in bad weather conditions such as rain, snow, and reflections, and cannot accurately identify and detect vehicles. Moreover, in parking lots, there will be occlusions between vehicles. This method cannot accurately handle occlusions, resulting in missed detections or misjudgments. It is impossible to accurately monitor the position of each vehicle in the parking lot, and thus it is impossible to ensure the safety of the parking lot. Summary of the invention

[0005] The present invention provides a parking lot panoramic safety monitoring method and system to solve the problem that the position of each vehicle in the parking lot cannot be accurately tracked.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a parking lot panoramic security monitoring method, comprising: Obtain the real-time video stream of the parking lot, and perform denoising preprocessing on each frame to obtain a clear video stream; According to the clear video stream, an adaptive illumination compensation algorithm is used to adjust the brightness and contrast of the image to obtain an illumination compensated image; According to the illumination compensation image, determine whether it is an image collected under bad weather conditions. If so, use an image enhancement algorithm to remove rain, snow and reflection interference to obtain an enhanced image. If not, directly use the illumination compensation image as the enhanced image. According to the enhanced image, a perspective transformation algorithm is used to correct the perspective of the vehicle image in the image to obtain a perspective transformed image; Inputting the perspective transformed image into a pre-trained vehicle detection model to identify the vehicle position and bounding box in the image to obtain the specific position of the vehicle in the image; According to the specific position, extracting the color, shape and texture features of the vehicle from the image to obtain vehicle feature information; According to the vehicle feature information and the specific position, a feature matching algorithm is used to judge the correspondence between the vehicles in different frames to determine the movement trajectory of the vehicle; According to the movement trajectory and the vehicle feature information, in a vehicle dense area, a multi-target tracking algorithm is used to determine the occlusion relationship between vehicles to obtain the position of the occluded vehicle.

[0007] In an optional implementation, the acquiring of the real-time video stream of the parking lot and performing denoising preprocessing on each frame of the image to obtain a clear image includes: Obtain a real-time video stream of the parking lot, use a distributed computing framework to divide the video stream into multiple subtasks, and process each frame of the image in parallel to obtain an image sequence; According to the image sequence, each frame of the image is subjected to multi-scale decomposition using wavelet transform to obtain wavelet coefficients of different frequency bands; According to the wavelet coefficient, a comparison is made with a preset noise threshold, and the wavelet coefficients smaller than the noise threshold are set to zero to obtain a second wavelet coefficient after denoising; According to the second wavelet coefficients, an inverse wavelet transform is performed to reconstruct a denoised image after denoising; According to the denoised image, a bilateral filtering algorithm is used to perform edge-preserving smoothing processing on each frame of the denoised image to obtain a smoothed image after smoothing processing; According to the smoothed image, each frame of the smoothed image is re-encoded into a video stream to obtain a clear video stream of real-time monitoring of the parking lot.

[0008] In an optional implementation, according to the clear video stream, using an adaptive illumination compensation algorithm to adjust the brightness and contrast of the image to obtain an illumination compensated image includes: According to the clear video stream, brightness analysis is performed to obtain an average brightness value and a brightness distribution histogram of the image; According to the average brightness value, determine whether it falls within a preset brightness threshold range, if so, then no illumination compensation processing is required, if not, then perform illumination compensation processing; Among them, the illumination compensation processing includes: According to the brightness distribution histogram, a histogram equalization algorithm is used to perform adaptive brightness adjustment on the image to make the brightness distribution of the image more uniform, thereby obtaining a brightness compensated image; According to the brightness compensated image, a Retinex algorithm is used to perform contrast enhancement processing on the image to highlight the texture detail information of the image, thereby obtaining a light compensated image.

[0009] In an optional implementation, it is characterized in that judging whether the image is collected under bad weather conditions according to the illumination compensation image, if so, removing rain, snow and reflection interference by using an image enhancement algorithm to obtain an enhanced image, if not, directly making the illumination compensation image an enhanced image includes: According to the illumination compensation image, determine whether the preset bad weather determination condition is met, if yes, obtain the image features of the illumination compensation image, if no, directly make the illumination compensation image an enhanced image; According to the image features, a random forest algorithm is used to determine whether the illumination compensation image contains rain and snow interference and reflection interference. If so, an image segmentation algorithm is used to segment the illumination compensation image to obtain the area to be enhanced that contains rain and snow interference and reflection interference. If not, an image segmentation algorithm is used to segment the illumination compensation image to obtain an unclear image that is too exposed or has too many noise points, thereby obtaining the area to be enhanced. According to the area to be enhanced, an image restoration algorithm is used to remove rain and snow interference and reflection interference in the area to obtain a restored image; According to the restored image and the illumination compensation image, the restored image is fused with the illumination compensation image to obtain a fused enhanced image.

[0010] In an optional implementation, it is characterized in that the step of correcting the perspective of the vehicle image in the image using a perspective transformation algorithm according to the enhanced image to obtain the perspective transformed image comprises: Comparing vehicle changes according to the enhanced image to obtain vehicle angle changes and vehicle distance changes; According to the vehicle angle change, a perspective transformation matrix angle calculation is performed to obtain a rotation angle parameter of the perspective transformation matrix; According to the change in the vehicle distance, a perspective transformation matrix scaling calculation is performed to obtain a scaling scale parameter of the perspective transformation matrix; According to the enhanced image, the rotation angle parameter and the scaling parameter, the vehicle image is subjected to perspective transformation processing, the vehicle image perspective in the enhanced image is corrected, the influence of the vehicle angle change and the distance change on the image perspective is eliminated, and a perspective transformation image after perspective correction is obtained; In an optional implementation, it is characterized in that the step of inputting the perspective transformed image into a pre-trained vehicle detection model, identifying the vehicle position and bounding box in the image, and obtaining the specific position of the vehicle in the image includes: According to the perspective transformed image, a pre-trained deep learning-based vehicle detection model is used to perform vehicle detection on the perspective transformed image to obtain a candidate vehicle area; According to the candidate vehicle area, the vehicle bounding box is accurately located by a bounding box regression algorithm to obtain the position coordinates and bounding box of the vehicle in the image; According to the position coordinates and the bounding box, the vehicle area is finely segmented in combination with an image segmentation algorithm to obtain a vehicle mask area and the specific position of the vehicle in the image.

[0011] In an optional implementation, it is characterized in that, according to the perspective transformed image, a pre-trained deep learning-based vehicle detection model is used to perform vehicle detection on the perspective transformed image to obtain a candidate vehicle area, and the training process of the vehicle detection model includes: Initialize the parameters of the deep learning algorithm and set the initial candidate vehicle area as the first position; Iterate according to the convolutional neural network to obtain the second position and record the number of iterations; Determine whether the second position is better than the first position, if so, update the second position to the first position; if not, discard the second position; Continue to the next iteration, when the number of iterations is greater than or equal to the preset number of iterations, output the current first position as the optimal candidate vehicle area.

[0012] In an optional implementation, it is characterized in that the determining the movement trajectory of the vehicle by using a feature matching algorithm to judge the correspondence between different frames of the vehicle according to the vehicle feature information and the specific position includes: According to the vehicle feature information, color histogram features, HOG shape features and LBP texture features of vehicles in the area are extracted to obtain a vehicle feature vector; According to the vehicle feature vector, a vehicle feature library is established to store the vehicle feature vector detected in each frame, and each feature vector is mapped with the corresponding vehicle ID and frame number to obtain a mapping relationship; According to the specific position and the mapping relationship, all detected vehicle bounding boxes are obtained in two adjacent frames of images. For each vehicle bounding box in the previous frame, the vehicle bounding box with the closest feature distance is found in the next frame. If the feature distance is less than a preset threshold, it is determined that the two bounding boxes belong to the same vehicle, and the line connecting the center points of the two bounding boxes is used as the motion displacement vector of the vehicle between the two frames to obtain the vehicle movement trajectory.

[0013] In an optional implementation, it is characterized in that the determining the occlusion relationship between vehicles in a densely populated area using a multi-target tracking algorithm based on the movement trajectory and the vehicle feature information to obtain the position of the occluded vehicle includes: According to the moving trajectory, in the vehicle dense area, a Kalman filter algorithm is used to track multiple vehicles to obtain the target motion trajectory of each vehicle; Extracting the motion characteristics of the target vehicle according to the target motion trajectory, wherein the motion characteristics include speed, acceleration and motion direction; According to the vehicle feature information, the appearance features of the target vehicle are extracted by using an appearance feature extraction algorithm for the target vehicle, wherein the appearance features include the color and model of the vehicle; According to the motion features and the appearance features, a Bayesian network model is used to judge the occlusion relationship between vehicle targets, determine the occluded vehicle target, and obtain the position of the occluded vehicle.

[0014] In a second aspect, the present invention provides a parking lot panoramic security monitoring system, comprising: The video stream acquisition and denoising module is used to acquire the real-time video stream of the parking lot and perform denoising preprocessing on each frame of the image to obtain a clear video stream; An illumination compensation module, used to adjust the brightness and contrast of an image using an adaptive illumination compensation algorithm to obtain an illumination compensated image; The image enhancement module is used to determine whether the image is collected under adverse weather conditions. If so, an image enhancement algorithm is used to remove rain, snow and reflection interference to obtain an enhanced image. If not, the illumination compensation image is directly used as the enhanced image. A perspective transformation module, used to correct the vehicle image viewing angle in the image using a perspective transformation algorithm according to the enhanced image to obtain a perspective transformed image; A vehicle detection module is used to input the perspective transformed image into a pre-trained vehicle detection model, identify the vehicle position and bounding box in the image, and obtain the specific position of the vehicle in the image; A feature extraction module is used to extract the color, shape and texture features of the vehicle from the image according to the specific position to obtain vehicle feature information; A trajectory matching module is used to determine the corresponding relationship between vehicles in different frames and determine the moving trajectory of the vehicle based on the vehicle feature information by using a feature matching algorithm; The multi-target tracking module is used to determine the occlusion relationship between vehicles in a vehicle-dense area based on the movement trajectory and the vehicle feature information using a multi-target tracking algorithm to obtain the position of the occluded vehicle.

[0015] In a third aspect, the present invention further provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for panoramic safety monitoring of a parking lot as described above is implemented.

[0016] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned parking lot panoramic safety monitoring methods.

[0017] Compared with the prior art, the present invention has the following beneficial effects: the present invention discloses a method and system for panoramic safety monitoring of a parking lot, including obtaining a real-time video stream of the parking lot, performing denoising preprocessing on each frame of the image to obtain a clear video stream; according to the clear video stream, using an adaptive illumination compensation algorithm to adjust the brightness and contrast of the image to obtain an illumination compensation image; according to the illumination compensation image, determining whether the image is collected under adverse weather conditions, if so, using an image enhancement algorithm to remove rain, snow and reflection interference to obtain an enhanced image, if not, directly making the illumination compensation image an enhanced image; according to the enhanced image, using a perspective transformation algorithm to correct the image in the image; The perspective transformed image is obtained by using the vehicle image viewing angle; the perspective transformed image is input into a pre-trained vehicle detection model to identify the vehicle position and bounding box in the image to obtain the specific position of the vehicle in the image; according to the specific position, the color, shape and texture features of the vehicle are extracted from the image to obtain the vehicle feature information; according to the vehicle feature information and the specific position, a feature matching algorithm is used to determine the correspondence between the vehicles in different frames to determine the movement trajectory of the vehicle; according to the movement trajectory and the vehicle feature information, a multi-target tracking algorithm is used in a vehicle-dense area to determine the occlusion relationship between the vehicles to obtain the position of the occluded vehicle.

[0018] This method proposes to cope with the impact of adverse weather conditions through adaptive illumination compensation and image enhancement algorithms, which can automatically detect rain, snow and reflective interference in the image and repair and enhance it, thereby improving the clarity and usability of the monitoring image. This method also combines deep learning techniques, such as vehicle detection models based on convolutional neural networks and multi-target tracking algorithms, to provide higher accuracy in complex scenes, such as densely populated areas and occluded areas. Especially in the case of occlusion, the combination of Kalman filtering and Bayesian network models can more accurately determine the position of the occluded vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the process flow of the panoramic safety monitoring method for a parking lot provided by the first embodiment of the present invention; Figure 2 It is a schematic diagram of the structure of a panoramic safety monitoring system for a parking lot provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0020] 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.

[0021] Reference Figure 1 The first embodiment of the present invention provides a parking lot panoramic security monitoring method, comprising the following steps: S11, obtaining a real-time video stream of the parking lot, and performing denoising preprocessing on each frame of the image to obtain a clear video stream; S12, according to the clear video stream, using an adaptive illumination compensation algorithm to adjust the brightness and contrast of the image to obtain an illumination compensated image; S13, judging whether the illumination compensation image is an image collected under bad weather conditions, if so, removing rain, snow and reflection interference by using an image enhancement algorithm to obtain an enhanced image, if not, directly using the illumination compensation image as the enhanced image; S14, according to the enhanced image, using a perspective transformation algorithm to correct the perspective of the vehicle image in the image to obtain a perspective transformed image; S15, inputting the perspective transformed image into a pre-trained vehicle detection model, identifying the vehicle position and bounding box in the image, and obtaining the specific position of the vehicle in the image; S16, extracting color, shape and texture features of the vehicle from the image according to the specific position to obtain vehicle feature information; S17, judging the correspondence between vehicles in different frames using a feature matching algorithm according to the vehicle feature information and the specific position, and determining the movement trajectory of the vehicle; S18, based on the movement trajectory and the vehicle feature information, in a vehicle dense area, a multi-target tracking algorithm is used to determine the occlusion relationship between vehicles to obtain the position of the occluded vehicle.

[0022] In step S11, a real-time video stream of the parking lot is obtained, and each frame of the image is subjected to denoising preprocessing to obtain a clear video stream.

[0023] In one implementation, a real-time video stream of a parking lot is obtained, and a distributed computing framework is used to divide the video stream into multiple subtasks, and each frame of the image is processed in parallel to obtain an image sequence; According to the image sequence, each frame of the image is subjected to multi-scale decomposition using wavelet transform to obtain wavelet coefficients of different frequency bands; According to the wavelet coefficient, a comparison is made with a preset noise threshold, and the wavelet coefficients smaller than the noise threshold are set to zero to obtain a second wavelet coefficient after denoising; According to the second wavelet coefficients, an inverse wavelet transform is performed to reconstruct a denoised image after denoising; According to the denoised image, a bilateral filtering algorithm is used to perform edge-preserving smoothing processing on each frame of the denoised image to obtain a smoothed image after smoothing processing; According to the smoothed image, each frame of the smoothed image is re-encoded into a video stream to obtain a clear video stream of real-time monitoring of the parking lot.

[0024] Exemplarily, first, a real-time video stream of a parking lot is obtained through a network camera, and the video format is a 1080P high-definition video encoded in H.264 with a frame rate of 25fps. The distributed computing framework is used to segment and parallelize the video stream, which can greatly improve the processing efficiency. For example, a large parking lot may have hundreds of cameras, generating a large amount of video data per second. By distributing these data to multiple servers for simultaneous processing, near real-time image analysis can be achieved. Then, the video stream is decoded using the FFmpeg library and converted into a frame-by-frame image sequence, the image format is PNG, and the resolution is 1920x1080. Next, a wavelet transform is applied to each frame of the image, and the Haar wavelet is used to perform a three-level decomposition of the image to obtain low-frequency approximate coefficients and high-frequency detail coefficients. According to experience, the noise threshold is set to 10, and the wavelet coefficients are subjected to soft threshold denoising, and the high-frequency detail coefficients with an absolute value less than 10 are set to zero. Then, the denoised wavelet coefficients are subjected to a three-level inverse wavelet transform to reconstruct the denoised image. In order to further eliminate noise and retain edge details, the bilateral filtering algorithm is used to process the image, setting the spatial domain standard deviation to 5, the gray value domain standard deviation to 1, and the number of iterations to 3. Finally, the processed image frame is re-encoded into a video stream using the H.264 encoder, and the encoding parameters are set to a fixed bit rate of 1Mbps and a GOP length of 25 frames. By continuously performing the above real-time denoising processing on the parking lot video stream, the clarity of the monitoring image can be effectively improved, providing high-quality input data for subsequent vehicle detection and recognition algorithms, and improving the performance and reliability of the entire intelligent parking system.

[0025] In step S12, based on the clear video stream, an adaptive illumination compensation algorithm is used to adjust the brightness and contrast of the image to obtain an illumination compensated image.

[0026] In one implementation, brightness analysis is performed on the clear video stream to obtain an average brightness value and a brightness distribution histogram of the image; According to the average brightness value, determine whether it falls within a preset brightness threshold range, if so, then no illumination compensation processing is required, if not, then perform illumination compensation processing; Among them, the illumination compensation processing includes: According to the brightness distribution histogram, a histogram equalization algorithm is used to perform adaptive brightness adjustment on the image to make the brightness distribution of the image more uniform, thereby obtaining a brightness compensated image; According to the brightness compensated image, a Retinex algorithm is used to perform contrast enhancement processing on the image to highlight the texture detail information of the image, thereby obtaining a light compensated image.

[0027] Exemplarily, obtaining the original image to be processed is a key step in the intelligent parking system, and a high-definition camera is used to capture real-time images. For brightness analysis of the acquired image, the image processing library can be used to calculate the average brightness value and generate a brightness distribution histogram. For example, the average brightness value of a parking lot image is 128 (range 0-255), and the brightness distribution histogram presents a bimodal distribution, indicating that there is a significant contrast between light and dark in the image. The preset brightness threshold range is usually set according to empirical values, such as 80-180. If the average brightness of the image falls within this range, no illumination compensation is required. However, in actual applications, the lighting conditions of the parking lot may change significantly due to factors such as weather changes and the passage of time. For example, the average brightness may drop to 60 on a cloudy day, and illumination compensation processing is required at this time. Histogram equalization is a commonly used adaptive brightness adjustment method. For images that require illumination compensation, the algorithm can redistribute pixel brightness values ​​to make the brightness distribution more uniform. In parking lot scenes, this processing can effectively improve the visibility of shadow areas and make vehicles parked in dark corners easier to identify. The Retinex algorithm is an image enhancement method based on the visual characteristics of the human eye. Applying this algorithm in parking lot monitoring can further enhance image contrast and highlight key features such as vehicle outlines and license plates. For example, for a parking lot image with uneven lighting, the Retinex algorithm can simultaneously brighten the shadow area and maintain the details of the highlight area, making the entire picture clearer and more recognizable. Through the above-mentioned illumination compensation processing, an image with optimized lighting conditions can be obtained. This processing is of great significance for the subsequent steps of the intelligent parking system, such as parking space occupancy detection and license plate recognition. For example, in low-light conditions such as night or cloudy days, images with illumination compensation can significantly improve the accuracy of license plate recognition, thereby improving the reliability and user experience of the entire system. The advantage of this illumination compensation method lies in its adaptability and robustness. Whether it is sunny, cloudy or night, the system can automatically adjust the processing parameters according to the actual lighting conditions to ensure that the output image quality is always maintained at an ideal level. This not only improves the adaptability of the system, but also reduces the need for manual intervention and reduces maintenance costs. At the same time, by retaining more image detail information, higher-quality training data is provided for subsequent deep learning models, which helps to improve the performance of the entire intelligent parking system.

[0028] In step S13, based on the illumination compensation image, it is determined whether the image is collected under adverse weather conditions. If so, an image enhancement algorithm is used to remove rain, snow and reflection interference to obtain an enhanced image. If not, the illumination compensation image is directly used as the enhanced image.

[0029] In one implementation, judging whether a preset bad weather determination condition is met based on the illumination compensation image, if so, obtaining the image features of the illumination compensation image, if not, directly making the illumination compensation image an enhanced image; According to the image features, a random forest algorithm is used to determine whether the illumination compensation image contains rain and snow interference and reflection interference. If so, an image segmentation algorithm is used to segment the illumination compensation image to obtain the area to be enhanced that contains rain and snow interference and reflection interference. If not, an image segmentation algorithm is used to segment the illumination compensation image to obtain an unclear image that is too exposed or has too many noise points, thereby obtaining the area to be enhanced. According to the area to be enhanced, an image restoration algorithm is used to remove rain and snow interference and reflection interference in the area to obtain a restored image; According to the restored image and the illumination compensation image, the restored image is fused with the illumination compensation image to obtain a fused enhanced image.

[0030] For example, image processing in bad weather conditions for smart parking systems is a complex and important task. First, the system needs to identify bad weather based on preset judgment conditions. These conditions may include features such as the overall brightness, contrast, and tone distribution of the image. For example, in heavy rain, the image may appear overall dark and with reduced contrast; while in heavy snow, the image may have large areas of highlights. Once it is determined that the image was captured in bad weather, the system will extract image features. These features may include texture information, edge distribution, color histogram, etc.

[0031] The random forest algorithm uses these features to determine whether there is rain, snow and reflection interference in the image. The advantage of random forest is that it can handle high-dimensional features and is robust to noise. If interference is detected, the system uses an image segmentation algorithm to locate the interference area. This involves region growing-based methods or semantic segmentation networks. For example, for rain line interference, its slender shape features can be used for segmentation; while for water reflection, its brightness and texture features may need to be considered. For the segmented interference area, the image restoration algorithm plays a key role. Common methods include patch-based restoration and deep learning methods. For example, for the license plate area blocked by rain lines, the system may refer to the surrounding undisturbed areas to infer the original appearance of the blocked part. The fusion of the restored image with the original illumination compensation image is a delicate process. This usually involves weighted averaging or multi-scale fusion techniques to ensure that the restored area transitions naturally with the surrounding environment. For example, when dealing with water reflection, the fusion process needs to consider the brightness gradient of the reflective area to avoid abrupt boundaries.

[0032] The application of convolutional neural networks aims to further enhance image quality, especially to recover detailed features of vehicle surfaces. This includes the use of advanced architectures such as residual networks or generative adversarial networks. For example, for license plates blurred by rain and snow, CNN can learn to reconstruct clear characters; for car bodies wet by rain, the network can restore the original color and texture. This series of processing not only improves image quality, but more importantly, enhances the accuracy of subsequent vehicle identification and parking space detection. For example, in heavy rain, the processed image can clearly show the license plate number blurred by rain, greatly improving the success rate of license plate recognition. At the same time, by removing the reflection of accumulated water, the system can more accurately judge the occupancy status of parking spaces and avoid misjudging empty parking spaces as occupied due to reflection. These improvements directly improve the operational efficiency and user experience of smart parking lots in bad weather.

[0033] In step S14, based on the enhanced image, a perspective transformation algorithm is used to correct the perspective of the vehicle image in the image to obtain a perspective transformed image.

[0034] In one implementation, a vehicle change comparison is performed based on the enhanced image to obtain a vehicle angle change and a vehicle distance change; According to the vehicle angle change, a perspective transformation matrix angle calculation is performed to obtain a rotation angle parameter of the perspective transformation matrix; According to the change in the vehicle distance, a perspective transformation matrix scaling calculation is performed to obtain a scaling scale parameter of the perspective transformation matrix; According to the enhanced image, the rotation angle parameter and the scaling scale parameter, the vehicle image is subjected to perspective transformation processing, the vehicle image perspective in the enhanced image is corrected, the influence of the vehicle angle change and the distance change on the image perspective is eliminated, and the perspective transformed image after perspective correction is obtained.

[0035] In step S15, the perspective transformed image is input into a pre-trained vehicle detection model to identify the vehicle position and bounding box in the image, and obtain the specific position of the vehicle in the image.

[0036] In one implementation, based on the perspective transformed image, a pre-trained deep learning-based vehicle detection model is used to perform vehicle detection on the perspective transformed image to obtain a candidate vehicle area; According to the candidate vehicle area, the vehicle bounding box is accurately located by a bounding box regression algorithm to obtain the position coordinates and bounding box of the vehicle in the image; According to the position coordinates and the bounding box, the vehicle area is finely segmented in combination with an image segmentation algorithm to obtain a vehicle mask area and the specific position of the vehicle in the image.

[0037] It should be noted that after obtaining the perspective transformed image, image preprocessing is performed first. This step aims to improve image quality and lay the foundation for subsequent vehicle detection. Common preprocessing methods include Gaussian filtering denoising and histogram equalization enhancement. For example, for a vehicle image taken on a rainy day, Gaussian filtering can effectively remove the noise caused by raindrops, while histogram equalization can enhance the image contrast and make the vehicle outline clearer. After preprocessing, a pre-trained deep learning model is used for vehicle detection. Model compression techniques, such as knowledge distillation or pruning, are used here to reduce the model size and increase the running speed. For example, it originally took 100 Storage space The model only needs 20 , and the reasoning speed is increased by 30% while maintaining a detection accuracy of more than 95%.

[0038] After detecting the candidate area, the bounding box regression algorithm is used for precise positioning. This step can optimize the initial detection results and provide more accurate vehicle location information. For example, for a partially obscured car, the initial detection can only frame 60% of the car body, while the bounding box regression can expand it to more than 90%, greatly improving the positioning accuracy. Next, the image segmentation algorithm is used to finely segment the vehicle area. Common methods include Ability to generate pixel-level vehicle masks. This is especially useful for complex scenes, such as in crowded parking lots, where accurate segmentation can help distinguish different closely parked vehicles.

[0039] After segmentation, feature extraction is performed on the vehicle mask area. This step can obtain the vehicle's color, model and other attribute features. For example, the main color of the vehicle body can be determined through color histogram analysis, while the general outline of the vehicle can be identified through edge detection and shape analysis, so as to preliminarily determine whether it is a sedan or an SUV. Finally, the extracted features are matched with the preset vehicle template library. The specific vehicle model can be determined by calculating the Euclidean distance or cosine similarity between feature vectors. For example, a red, streamlined vehicle with a highly matched feature to the Ferrari 458 in the template library will be identified as this model by the system. This whole process can not only accurately locate and identify the vehicle, but also provide rich vehicle attribute information. In practical applications, such as intelligent transportation systems, this precise vehicle recognition can be used in many aspects such as traffic flow statistics and violation detection, greatly improving traffic management efficiency.

[0040] In step S16, according to the specific position, the color, shape and texture features of the vehicle are extracted from the image to obtain vehicle feature information.

[0041] It should be noted that vehicle feature extraction is a key step in achieving vehicle tracking. The color histogram feature can effectively characterize the overall color distribution of the vehicle. The HSV color space can be used to quantify the hue, saturation, and brightness into 8, 3, and 3 intervals, respectively, to obtain a 72-dimensional feature vector. For example, the color histogram of a red car has a higher frequency in the hue range of 0-45 degrees, while the saturation and brightness are more evenly distributed. The HOG feature focuses on describing the contour and shape of the vehicle, which is represented by calculating the gradient direction histogram of the local area of ​​the image. For an SUV, its HOG feature has a strong gradient response in the vertical direction, reflecting the high characteristics of the vehicle body. The LBP feature can capture the texture information of the vehicle surface, such as details such as windows and lights. The combination of these three features can fully describe the appearance characteristics of the vehicle and improve the accuracy of recognition.

[0042] In step S17, based on the vehicle feature information and the specific position, a feature matching algorithm is used to determine the correspondence between different frames of the vehicle to determine the movement trajectory of the vehicle.

[0043] In one implementation, based on the vehicle feature information, color histogram features, HOG shape features, and LBP texture features of vehicles in the area are extracted to obtain a vehicle feature vector; According to the vehicle feature vector, a vehicle feature library is established to store the vehicle feature vector detected in each frame, and each feature vector is mapped with the corresponding vehicle ID and frame number to obtain a mapping relationship; According to the specific position and the mapping relationship, all detected vehicle bounding boxes are obtained in two adjacent frames of images. For each vehicle bounding box in the previous frame, the vehicle bounding box with the closest feature distance is found in the next frame. If the feature distance is less than a preset threshold, it is determined that the two bounding boxes belong to the same vehicle, and the line connecting the center points of the two bounding boxes is used as the motion displacement vector of the vehicle between the two frames to obtain the vehicle movement trajectory.

[0044] It should be noted that establishing a vehicle feature library is the basis for vehicle tracking. The mapping relationship between each feature vector and the vehicle ID and frame number can be stored using a hash table for fast retrieval. For example, the vehicle ID can be used as the key and the corresponding feature vector and frame number list as the value. This structure allows for fast updating and querying of feature information of a specific vehicle in different frames, providing support for subsequent tracking algorithms.

[0045] Vehicle matching between adjacent frames is the core of the tracking algorithm. The feature distance is calculated using Euclidean distance or cosine similarity. Setting an appropriate threshold is crucial for accurate matching. For example, when the threshold is set too low, the same vehicle will be misclassified as different vehicles in different frames; when it is set too high, different vehicles will be incorrectly matched together. A reasonable threshold is the mean of the Euclidean distance of the feature vector plus two standard deviations, which can accommodate most normal situations while excluding abnormal matches.

[0046] The calculation of the displacement vector not only reflects the vehicle's state of motion, but can also be used to predict the vehicle's future position. For example, for a vehicle traveling in a straight line at a constant speed, its displacement vectors for several consecutive frames should be equal. If there is a sudden change, it means that the vehicle is accelerating, decelerating, or turning. This information is very valuable for understanding vehicle behavior and predicting potential traffic conditions. The vehicle trajectory obtained by connecting the displacement vectors can be used for a variety of advanced analyses. For example, the main driving routes in a parking lot can be identified, abnormal behaviors such as reverse driving or frequent lane changes can be discovered, and potential congestion areas can be predicted.

[0047] Trajectory data can also be used to optimize parking lot layout, such as adjusting the angle of parking spaces according to the turning radius of vehicles, or adjusting the width of main aisles according to driving frequency. This feature matching-based vehicle tracking method is highly robust and can cope with complex situations such as partial occlusion of vehicles and changes in lighting.

[0048] In step S18, based on the movement trajectory and the vehicle feature information, a multi-target tracking algorithm is used in a vehicle-dense area to determine the occlusion relationship between vehicles and obtain the position of the occluded vehicle.

[0049] In one embodiment, according to the moving trajectory, in a vehicle-dense area, a Kalman filter algorithm is used to track multiple vehicles to obtain a target motion trajectory of each vehicle; Extracting the motion characteristics of the target vehicle according to the target motion trajectory, wherein the motion characteristics include speed, acceleration and motion direction; According to the vehicle feature information, the appearance features of the target vehicle are extracted by using an appearance feature extraction algorithm for the target vehicle, wherein the appearance features include the color and model of the vehicle; According to the motion features and the appearance features, a Bayesian network model is used to judge the occlusion relationship between vehicle targets, determine the occluded vehicle target, and obtain the position of the occluded vehicle.

[0050] It should be noted that vehicle target extraction often uses background difference method or deep learning model. Taking background difference method as an example, moving vehicles can be identified by comparing the difference between the current frame and the background model. If the model uses Gaussian mixture model, for parking lot scenes, stationary vehicles will gradually be absorbed into the background, while moving vehicles will be detected.

[0051] The Kalman filter algorithm plays a key role in multi-target tracking. It continuously optimizes the estimation of the vehicle position through two steps: prediction and update.

[0052] For example, for a car traveling at a constant speed of 25 km / h, the Kalman filter can predict the approximate position of the vehicle in the next frame based on the observation results of the previous frames, and make corrections when new observation data arrives. Vehicle motion feature extraction provides an important basis for subsequent analysis.

[0053] The speed can be calculated by dividing the displacement between adjacent frames by the time interval; the acceleration is the rate of change of the speed over time; the direction of movement can be represented by the angle of the displacement vector. These features can reflect the driving state of the vehicle, such as sudden braking, turning, etc. Appearance feature extraction is the basis of vehicle recognition. Color features can be represented by color histograms. Vehicle model recognition can use deep learning models, such as , classifying vehicles into cars, SUVs, trucks, etc. License plate recognition requires first locating the license plate area and then using optical character recognition technology to read the characters. The Bayesian network model performs well in dealing with vehicle occlusion relationships. It can comprehensively consider factors such as the position, speed, and size of the vehicle to infer the probability of occlusion. For example, when a large truck intersects the trajectory of a small car, the model tends to believe that the small car has a higher probability of being occluded. For occluded vehicles, the particle filter algorithm can effectively predict their positions. The algorithm generates a large number of weighted particles to represent the possible states of the target. For example, for an occluded vehicle, hundreds of particles can be generated based on its previous motion state, distributed around possible locations. Over time, particles with larger weights will gradually concentrate near the true position. Finally, the predicted position is fused with the known trajectory to obtain more accurate tracking results.

[0054] This step can use methods such as weighted average to comprehensively consider the credibility of the prediction results and the continuity of the historical trajectory. For example, if the predicted position deviates greatly from the extended trajectory, the trajectory information may be more trusted, thereby avoiding sudden changes in the tracking results.

[0055] In summary, the present invention discloses a method and system for panoramic safety monitoring of a parking lot, comprising obtaining a real-time video stream of a parking lot, performing denoising preprocessing on each frame of an image to obtain a clear video stream; according to the clear video stream, using an adaptive illumination compensation algorithm to adjust the brightness and contrast of the image to obtain an illumination compensation image; according to the illumination compensation image, judging whether the image is collected under adverse weather conditions, if so, using an image enhancement algorithm to remove rain, snow and reflection interference to obtain an enhanced image, if not, directly making the illumination compensation image an enhanced image; according to the enhanced image, using a perspective transformation algorithm to correct the perspective of a vehicle image in the image to obtain a perspective transformation image; inputting the perspective transformation image into a pre-trained vehicle detection model, identifying the vehicle position and bounding box in the image, and obtaining the specific position of the vehicle in the image; according to the specific position, extracting the color, shape and texture features of the vehicle from the image to obtain vehicle feature information; according to the vehicle feature information and the specific position, using a feature matching algorithm to judge the corresponding relationship between vehicles in different frames, and determining the moving trajectory of the vehicle; according to the moving trajectory and the vehicle feature information, in a vehicle-dense area, using a multi-target tracking algorithm to judge the occlusion relationship between vehicles, and obtaining the position of the occluded vehicle.

[0056] Adaptive illumination compensation and image enhancement algorithms are used to cope with the impact of adverse weather conditions. Rain, snow and reflective interference in images can be automatically detected and repaired and enhanced, thereby improving the clarity and usability of surveillance images. This method also combines deep learning techniques, such as vehicle detection models based on convolutional neural networks and multi-target tracking algorithms, to provide higher accuracy in complex scenes, such as densely populated areas and occluded areas. Especially in the case of occlusion, the combination of Kalman filtering and Bayesian network models can more accurately determine the position of the occluded vehicle.

[0057] Reference Figure 2 The second embodiment of the present invention provides a parking lot panoramic security monitoring system, including: The video stream acquisition and denoising module is used to acquire the real-time video stream of the parking lot and perform denoising preprocessing on each frame of the image to obtain a clear video stream; An illumination compensation module, used to adjust the brightness and contrast of an image using an adaptive illumination compensation algorithm to obtain an illumination compensated image; The image enhancement module is used to determine whether the image is collected under adverse weather conditions. If so, an image enhancement algorithm is used to remove rain, snow and reflection interference to obtain an enhanced image. If not, the illumination compensation image is directly used as the enhanced image. A perspective transformation module, used to correct the vehicle image viewing angle in the image using a perspective transformation algorithm according to the enhanced image to obtain a perspective transformed image; A vehicle detection module is used to input the perspective transformed image into a pre-trained vehicle detection model, identify the vehicle position and bounding box in the image, and obtain the specific position of the vehicle in the image; A feature extraction module is used to extract the color, shape and texture features of the vehicle from the image according to the specific position to obtain vehicle feature information; A trajectory matching module is used to determine the corresponding relationship between vehicles in different frames and determine the moving trajectory of the vehicle based on the vehicle feature information by using a feature matching algorithm; The multi-target tracking module is used to determine the occlusion relationship between vehicles in a vehicle-dense area based on the movement trajectory and the vehicle feature information using a multi-target tracking algorithm to obtain the position of the occluded vehicle.

[0058] It should be noted that a parking lot panoramic security monitoring device provided in an embodiment of the present invention is used to execute all process steps of a parking lot panoramic security monitoring method in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be described in detail.

[0059] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a parking lot panoramic safety monitoring program. When the processor executes the computer program, the steps in the above-mentioned parking lot panoramic safety monitoring method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as a parking lot panoramic security monitoring module.

[0060] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0061] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0062] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0063] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0064] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0065] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0066] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A parking lot panoramic security monitoring method, characterized in that: Executed by a computer, including: Obtain the real-time video stream of the parking lot, and perform denoising preprocessing on each frame to obtain a clear video stream; According to the clear video stream, an adaptive illumination compensation algorithm is used to adjust the brightness and contrast of the image to obtain an illumination compensated image; According to the illumination compensation image, determine whether it is an image collected under bad weather conditions. If so, use an image enhancement algorithm to remove rain, snow and reflection interference to obtain an enhanced image. If not, directly use the illumination compensation image as the enhanced image. According to the enhanced image, a perspective transformation algorithm is used to correct the perspective of the vehicle image in the image to obtain a perspective transformed image; Inputting the perspective transformed image into a pre-trained vehicle detection model to identify the vehicle position and bounding box in the image to obtain the specific position of the vehicle in the image; According to the specific position, extracting the color, shape and texture features of the vehicle from the image to obtain vehicle feature information; According to the vehicle feature information and the specific position, a feature matching algorithm is used to judge the correspondence between the vehicles in different frames to determine the movement trajectory of the vehicle; According to the movement trajectory and the vehicle feature information, in a vehicle dense area, a multi-target tracking algorithm is used to determine the occlusion relationship between vehicles to obtain the position of the occluded vehicle.

2. The parking lot panoramic security monitoring method according to claim 1, characterized in that: The method of obtaining a real-time video stream of the parking lot and performing denoising preprocessing on each frame of the image to obtain a clear image includes: Obtain the real-time video stream of the parking lot, use the distributed computing framework to divide the real-time video stream of the parking lot into multiple subtasks, and process each frame of the image in parallel to obtain an image sequence; According to the image sequence, each frame of the image is subjected to multi-scale decomposition using wavelet transform to obtain wavelet coefficients of different frequency bands; According to the wavelet coefficient, a comparison is made with a preset noise threshold, and the wavelet coefficients smaller than the noise threshold are set to zero to obtain a second wavelet coefficient after denoising; According to the second wavelet coefficients, an inverse wavelet transform is performed to reconstruct a denoised image after denoising; According to the denoised image, a bilateral filtering algorithm is used to perform edge-preserving smoothing processing on each frame of the denoised image to obtain a smoothed image after smoothing processing; According to the smoothed image, each frame of the smoothed image is re-encoded into a video stream to obtain a clear video stream of real-time monitoring of the parking lot.

3. The parking lot panoramic security monitoring method according to claim 1, characterized in that: According to the clear video stream, the brightness and contrast of the image are adjusted by using an adaptive illumination compensation algorithm to obtain an illumination compensated image, including: According to the clear video stream, brightness analysis is performed to obtain an average brightness value and a brightness distribution histogram of the image; According to the average brightness value, determine whether it falls within a preset brightness threshold range, if so, then no illumination compensation processing is required, if not, then perform illumination compensation processing; Among them, the illumination compensation processing includes: According to the brightness distribution histogram, a histogram equalization algorithm is used to perform adaptive brightness adjustment on the image to make the brightness distribution of the image more uniform, thereby obtaining a brightness compensated image; According to the brightness compensated image, a Retinex algorithm is used to perform contrast enhancement processing on the image to highlight texture detail information of the image, thereby obtaining a light compensated image.

4. The parking lot panoramic security monitoring method according to claim 1, characterized in that: The step of judging whether the image is collected under bad weather conditions according to the illumination compensation image, and if so, obtaining an enhanced image by removing rain, snow and reflection interference using an image enhancement algorithm, and if not, directly making the illumination compensation image an enhanced image includes: According to the illumination compensation image, determine whether the preset bad weather determination condition is met, if yes, obtain the image features of the illumination compensation image, if no, directly make the illumination compensation image an enhanced image; According to the image features, a random forest algorithm is used to determine whether the illumination compensation image contains rain and snow interference and reflection interference. If so, an image segmentation algorithm is used to segment the illumination compensation image to obtain the area to be enhanced that contains rain and snow interference and reflection interference. If not, an image segmentation algorithm is used to segment the illumination compensation image to obtain an unclear image that is too exposed or has too many noise points, thereby obtaining the area to be enhanced. According to the area to be enhanced, an image restoration algorithm is used to remove rain and snow interference and reflection interference in the area to obtain a restored image; According to the restored image and the illumination compensation image, the restored image is fused with the illumination compensation image to obtain a fused enhanced image.

5. The parking lot panoramic security monitoring method according to claim 1, characterized in that: The step of correcting the vehicle image viewing angle in the image using a perspective transformation algorithm according to the enhanced image to obtain a perspective transformed image comprises: Comparing vehicle changes according to the enhanced image to obtain vehicle angle changes and vehicle distance changes; According to the vehicle angle change, a perspective transformation matrix angle calculation is performed to obtain a rotation angle parameter of the perspective transformation matrix; According to the change in the vehicle distance, a perspective transformation matrix scaling calculation is performed to obtain a scaling scale parameter of the perspective transformation matrix; According to the enhanced image, the rotation angle parameter and the scaling scale parameter, the vehicle image is subjected to perspective transformation processing, the vehicle image perspective in the enhanced image is corrected, the influence of the vehicle angle change and the distance change on the image perspective is eliminated, and the perspective transformed image after perspective correction is obtained.

6. The parking lot panoramic security monitoring method according to claim 1, characterized in that: The step of inputting the perspective transformed image into a pre-trained vehicle detection model, identifying the vehicle position and bounding box in the image, and obtaining the specific position of the vehicle in the image includes: According to the perspective transformed image, a pre-trained deep learning-based vehicle detection model is used to perform vehicle detection on the perspective transformed image to obtain a candidate vehicle area; According to the candidate vehicle area, the vehicle bounding box is accurately located by a bounding box regression algorithm to obtain the position coordinates and bounding box of the vehicle in the image; According to the position coordinates and the bounding box, the vehicle area is finely segmented in combination with an image segmentation algorithm to obtain a vehicle mask area and the specific position of the vehicle in the image.

7. The parking lot panoramic security monitoring method according to claim 6, characterized in that: According to the perspective transformed image, a pre-trained vehicle detection model based on deep learning is used to perform vehicle detection on the perspective transformed image to obtain a candidate vehicle area. The training process of the vehicle detection model includes: Initialize the parameters of the deep learning algorithm and set the initial candidate vehicle area as the first position; Iterate according to the convolutional neural network to obtain the second position and record the number of iterations; Determine whether the second position is better than the first position, if so, update the second position to the first position; if not, discard the second position; Continue to the next iteration, when the number of iterations is greater than or equal to the preset number of iterations, output the current first position as the optimal candidate vehicle area.

8. The parking lot panoramic security monitoring method according to claim 1, characterized in that: The step of using a feature matching algorithm to judge the correspondence between different frames of the vehicle according to the vehicle feature information and the specific position, and determining the moving trajectory of the vehicle includes: According to the vehicle feature information, color histogram features, HOG shape features and LBP texture features of vehicles in the area are extracted to obtain a vehicle feature vector; According to the vehicle feature vector, a vehicle feature library is established to store the vehicle feature vector detected in each frame, and each feature vector is mapped with the corresponding vehicle ID and frame number to obtain a mapping relationship; According to the specific position and the mapping relationship, all detected vehicle bounding boxes are obtained in two adjacent frames of images. For each vehicle bounding box in the previous frame, the vehicle bounding box with the closest feature distance is found in the next frame. If the feature distance is less than a preset threshold, it is determined that the two bounding boxes belong to the same vehicle, and the line connecting the center points of the two bounding boxes is used as the motion displacement vector of the vehicle between the two frames to obtain the vehicle movement trajectory.

9. The parking lot panoramic security monitoring method according to claim 1, characterized in that: The method of determining the occlusion relationship between vehicles in a densely populated area using a multi-target tracking algorithm based on the movement trajectory and the vehicle feature information to obtain the position of the occluded vehicle includes: According to the moving trajectory, in the vehicle dense area, a Kalman filter algorithm is used to track multiple vehicles to obtain the target motion trajectory of each vehicle; Extracting the motion characteristics of the target vehicle according to the target motion trajectory, wherein the motion characteristics include speed, acceleration and motion direction; According to the vehicle feature information, the appearance features of the target vehicle are extracted by using an appearance feature extraction algorithm for the target vehicle, wherein the appearance features include the color and model of the vehicle; According to the motion features and the appearance features, a Bayesian network model is used to judge the occlusion relationship between vehicle targets, determine the occluded vehicle target, and obtain the position of the occluded vehicle.

10. A parking lot panoramic security monitoring system, characterized in that: The system comprises: The video stream acquisition and denoising module is used to acquire the real-time video stream of the parking lot and perform denoising preprocessing on each frame of the image to obtain a clear video stream; An illumination compensation module, used to adjust the brightness and contrast of an image using an adaptive illumination compensation algorithm to obtain an illumination compensated image; The image enhancement module is used to determine whether the image is collected under adverse weather conditions. If so, an image enhancement algorithm is used to remove rain, snow and reflection interference to obtain an enhanced image. If not, the illumination compensation image is directly used as the enhanced image. A perspective transformation module, used to correct the vehicle image viewing angle in the image using a perspective transformation algorithm according to the enhanced image to obtain a perspective transformed image; A vehicle detection module is used to input the perspective transformed image into a pre-trained vehicle detection model, identify the vehicle position and bounding box in the image, and obtain the specific position of the vehicle in the image; A feature extraction module is used to extract the color, shape and texture features of the vehicle from the image according to the specific position to obtain vehicle feature information; A trajectory matching module is used to determine the corresponding relationship between vehicles in different frames and determine the moving trajectory of the vehicle based on the vehicle feature information by using a feature matching algorithm; The multi-target tracking module is used to determine the occlusion relationship between vehicles in a vehicle-dense area based on the movement trajectory and the vehicle feature information using a multi-target tracking algorithm to obtain the position of the occluded vehicle.

Citation Information

Patent Citations

  • Vehicle tracking method, system and device and storage medium

    CN117132950A

  • Parking lot indoor vehicle tracking method

    CN118587678A

  • Method for tracking and identifying vehicles in parking lot

    CN118608566A

  • Deep learning-based camera-crossing vehicle target tracking method, system and device in expressway tunnel, and medium

    CN119359769A

Cited By

  • Panoramic image brightness abnormal area detection and adjustment method

    CN120013932A

  • Over-the-horizon target detection and ghost probe early warning method, equipment and medium

    CN120411873A

  • Traffic accident ranging system based on computer vision

    CN120445163A

  • Feeder line fault monitoring and alarming method and system based on machine vision

    CN120707887A

  • Electrified road transport vehicle detection method and system based on machine vision

    CN121170749A