A security monitoring method and system for a smart park

CN122138063BActive Publication Date: 2026-10-20GUANGZHOU WUYE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610234984.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-27
Publication Date
2026-10-20
Estimated Expiration
2046-02-27

AI Technical Summary

Technical Problem

[0005]常规的直方图均衡化是针对单个图像进行的,没有考虑图像帧之间的动态关系,如果直接对园区监控视频中的每个视频帧独立进行直方图均衡化,增强后的园区监控视频会出现不连续的现象,影响视频的流畅性;而且常规的直方图均衡化只考虑灰度值的频数分布,而没有考虑灰度值对应的像素点在视频中的运动特征,这导致增强后的园区监控视频中运动特征不突出,影响对运动物体的识别,进而影响对园区安全事件的及时发现和处理

Benefits of technology

本发明通过对图像组中的所有视频帧一起进行直方图均衡化,使得图像组中视频帧之间的对比度的变化更加平缓,提高了增强后的监控视频的流畅性;另外,本发明通过动态信息评估值和灰度值的整合系数的计算,使视频帧中属于运动特征的细节信息得以增强,避免了对比度过度增强导致属于运动特征的细节丢失,减少了增强后的园区监控视频中的噪声干扰;同时,使得视频帧在光线变化和动态场景下更加稳定,突出增强后的园区监控视频中的运动特征,提高对运动物体的识别准确性,进而实现对园区安全事件的及时发现和处理。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138063B_ABST
    Figure CN122138063B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image contrast enhancement, and particularly relates to a safety monitoring method and system for a smart park, which comprises the following steps: dividing park monitoring videos into multiple image groups; dividing the last video frame in the image group into multiple image blocks of the same size; calculating a dynamic information evaluation value of a pixel point in the image block according to a matching degree and a motion vector between corresponding optimal matching blocks of the image block in adjacent two video frames; calculating an integration coefficient of each gray value according to a comprehensive frequency of each gray value and its adjacent gray value and the dynamic information evaluation value, so as to process the comprehensive frequency of each gray value, obtain a gray histogram constructed by the processed comprehensive frequency, and perform histogram equalization on the video frame in the image group; and obtaining each enhanced image group to form an enhanced monitoring video, so as to facilitate safety monitoring. The application enhances the detail information belonging to the motion feature in the video frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image contrast enhancement technology. More specifically, this invention relates to a security monitoring method and system for smart parks. Background Technology

[0002] With the continuous expansion of the park's scale and the increasing demand for security, the park monitoring system has become an important means of ensuring park security.

[0003] However, due to the complexity and diversity of the park environment, the quality of park surveillance videos is often affected by a variety of factors. Among them, insufficient light and excessive light can both lead to low image contrast in park surveillance videos, resulting in unclear surveillance videos and affecting the timely detection and handling of park security incidents.

[0004] To improve the quality and usability of the park's surveillance videos, image enhancement technology is applied to the monitoring system. Among them, histogram equalization is a commonly used image enhancement method. It adjusts the grayscale histogram of the image to make the grayscale value distribution of the image more uniform, thereby improving the contrast and brightness of the image. This technology is particularly effective when processing images with low contrast caused by insufficient light or excessive light.

[0005] Conventional histogram equalization is performed on a single image and does not consider the dynamic relationship between image frames. If histogram equalization is performed independently on each video frame in the park surveillance video, the enhanced park surveillance video will exhibit discontinuities, affecting the smoothness of the video. Moreover, conventional histogram equalization only considers the frequency distribution of gray values, without taking into account the motion characteristics of the pixels corresponding to the gray values ​​in the video. This results in motion features not being prominent in the enhanced park surveillance video, affecting the identification of moving objects and consequently hindering the timely detection and handling of park security incidents. Summary of the Invention

[0006] To address the technical problem that conventional histogram equalization can easily lead to jumps and blurred motion features in surveillance videos, affecting recognition accuracy and security monitoring, this invention provides solutions in the following aspects.

[0007] In a first aspect, the present invention provides a security monitoring method for a smart park, comprising: dividing a collected park monitoring video into multiple image groups using inter-frame coding technology; dividing the last video frame in each image group into multiple image blocks of the same size; sequentially obtaining, in reverse order, the best matching block corresponding to each image block in each video frame, and the matching degree and motion vector between the best matching blocks corresponding to each image block in two adjacent video frames using motion estimation; and calculating the image block's position within the image block based on the matching degree and motion vector between the best matching blocks corresponding to each image block in two adjacent video frames. The dynamic information evaluation value of each pixel is calculated. Based on the dynamic information evaluation value and gray value of each pixel, the dynamic information evaluation value and comprehensive frequency of each gray value are calculated. Based on the comprehensive frequency of each gray value and its adjacent gray values ​​and the dynamic information evaluation value, the integration coefficient of each gray value is calculated. The comprehensive frequency of each gray value is processed by the integration coefficient to obtain the processed comprehensive frequency of each gray value, and a gray-level histogram is constructed. Based on the gray-level histogram of each image group, histogram equalization is performed on the video frames in each image group. The obtained enhanced image groups are combined into an enhanced monitoring video for security monitoring.

[0008] This invention divides park surveillance video into multiple image groups using inter-frame coding technology. Based on the grayscale values ​​of pixels in all video frames within an image group, it obtains the processed comprehensive frequency of each grayscale value. Then, using a constructed grayscale histogram, it performs histogram equalization on all video frames within the image group, resulting in smoother contrast changes between video frames and improved smoothness of the enhanced surveillance video. Furthermore, this invention calculates the dynamic information evaluation value of pixels in an image block based on the matching degree and motion vector between the best-matching blocks corresponding to two adjacent video frames. Based on the dynamic information evaluation value of the pixels and their grayscale values, it calculates the dynamic information evaluation value of each grayscale value and the comprehensive frequency of the image. The frequency aggregation method calculates the aggregation coefficient for each grayscale value based on the combined frequency of each grayscale value and its adjacent grayscale values, as well as the dynamic information evaluation value. This aggregation coefficient is then used to process the combined frequency of each grayscale value, resulting in a grayscale histogram. The calculation of the dynamic information evaluation value and the aggregation coefficient of the grayscale values ​​enhances the details of motion features in the video frame, preventing the loss of motion features due to excessive contrast enhancement. Simultaneously, it makes the video frame more stable under changing lighting conditions and dynamic scenes, highlighting the motion features in the enhanced park surveillance video, improving the accuracy of identifying moving objects, and ultimately enabling timely detection and handling of park security incidents.

[0009] Preferably, the step of dividing the acquired park surveillance video into multiple image groups using inter-frame coding technology includes: inserting a keyframe into the park surveillance video every preset number of video frames according to the set keyframe interval to form a new image group; then the image group contains a keyframe and multiple prediction frames, and the prediction frames include forward prediction frames and bidirectional prediction frames.

[0010] Preferably, the step of obtaining the best matching block corresponding to the image patch in each video frame in reverse order through motion estimation includes: for the first... For any image patch in the nth video frame, motion estimation is performed at the nth... The best matching block for the image block is obtained in the nth video frame; for the image block in the nth... The best matching block in the nth video frame, through motion estimation, is... The best matching block is obtained from the first video frame; the process is repeated cyclically in descending order of video frame number until the image block is obtained from the second video frame. The best matching block in each video frame; Less than And integers greater than 1 This represents the total number of video frames contained in the image group.

[0011] Preferably, the motion estimation includes: for the first The nth image patch is determined in the previous video frame using a search algorithm. Multiple candidate image patches of the nth image patch are calculated using motion estimation criteria. The matching degree between each image patch and each candidate image patch is used to determine the candidate image patch with the highest matching degree, which is then selected as the first candidate image patch. The best matching block for each image block in the previous video frame.

[0012] Preferably, the calculation of the dynamic information evaluation value of pixels in the image block includes: using the ratio of the magnitude of the motion vector between the best matching blocks corresponding to the image block in two adjacent video frames to the displacement threshold as the base, and using the sum of 0.5 and the natural exponential function as the exponent to perform an exponential operation to obtain an intermediate value; wherein, the independent variable of the natural exponential function is the negative of the matching degree between the best matching blocks corresponding to the image block in two adjacent video frames; and extracting the minimum value from the intermediate values ​​corresponding to all two adjacent video frames as the dynamic information evaluation value of pixels in the image block.

[0013] This invention achieves sensitive capture of real moving targets and eliminates noise-induced false motion interference by exponentially processing the magnitude of the motion vector and the degree of matching, and by taking the minimum value of the intermediate value between multiple video frames. This ensures that the dynamic information evaluation value can objectively reflect the true motion intensity of the pixel.

[0014] Preferably, the step of calculating the dynamic information evaluation value and comprehensive frequency of each grayscale value based on the dynamic information evaluation value and grayscale value of the pixel includes: for all video frames in the image group, counting the grayscale values ​​equal to... The number of all pixels, used as the grayscale value. The overall frequency; calculate the gray value equal to The average of the dynamic information evaluation values ​​of all pixels is used as the grayscale value. The dynamic information evaluation value.

[0015] This invention deeply couples static frequency distribution with dynamic motion features by statistically analyzing the number of pixels with the same grayscale value in all video frames within an image group and the average value of dynamic information evaluation values, laying a feature foundation for subsequent adjustment of the grayscale histogram from both spatiotemporal dimensions.

[0016] Preferably, the step of calculating the integration coefficient of each grayscale value based on the combined frequency and dynamic information evaluation value of each grayscale value and its adjacent grayscale values ​​includes: grayscale value The integration coefficient is equal to the grayscale value. The sum of the dynamic information evaluation value and a natural index term; wherein, the index of the natural index term is: for grayscale values The weighted summation of the dynamic information evaluation values ​​of each adjacent grayscale value is the negative of the summation. In this weighted summation, the weight of each adjacent grayscale value is the proportion of its overall frequency in the total frequency of all adjacent grayscale values. The adjacent grayscale values ​​include grayscale values... Gray values ​​with an upward offset of -2, -1, 1, and 2 on the grayscale axis.

[0017] This invention calculates an integration coefficient that includes adjacent gray values ​​and uses the proportion of comprehensive frequency to weight and compensate the motion features of adjacent gray values, so that the integration coefficient can accurately identify gray ranges with significant motion features, thereby enhancing the algorithm's adaptive expression capability for complex dynamic scenes.

[0018] Preferably, the step of processing the comprehensive frequency of each gray value by integrating the integration coefficient to obtain the processed comprehensive frequency of each gray value includes: multiplying the integration coefficient of each gray value by the comprehensive frequency of each gray value to obtain the processed comprehensive frequency of each gray value.

[0019] This invention uses integration coefficients to weight the comprehensive frequency of each gray value and constructs a gray-level histogram. Through mathematical means, the weight of gray levels carrying dynamic information in the histogram is increased, so that the constructed gray-level histogram can preferentially represent the moving area.

[0020] Preferably, the security monitoring includes: inputting the enhanced monitoring video into a pre-trained target detection model to identify moving targets in the video; marking the moving targets with bounding boxes and outputting the category labels of the moving targets.

[0021] Secondly, the present invention provides a security monitoring system for smart parks, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the aforementioned security monitoring method for smart parks is implemented.

[0022] By adopting the above technical solution, a computer program for a security monitoring method for smart parks is generated and stored in a memory for loading and execution by a processor. Terminal devices are then created based on the memory and processor for convenient use.

[0023] The beneficial effects of this invention are as follows: This invention performs histogram equalization on all video frames in an image group, resulting in smoother contrast changes between video frames and improving the fluency of the enhanced surveillance video. Furthermore, by calculating the integration coefficient of dynamic information evaluation values ​​and grayscale values, this invention enhances the details of motion features in the video frames, avoiding the loss of motion features due to excessive contrast enhancement and reducing noise interference in the enhanced park surveillance video. Simultaneously, it makes the video frames more stable under changing lighting and dynamic scenes, highlighting motion features in the enhanced park surveillance video, improving the accuracy of moving object recognition, and ultimately enabling timely detection and handling of park security incidents. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating a security monitoring method for a smart park according to the present invention; Figure 2 This is a schematic diagram illustrating the original surveillance video frames before processing; Figure 3 This is a schematic diagram illustrating a surveillance video frame enhanced by existing technology; Figure 4 This is a schematic diagram illustrating the enhanced surveillance video frame of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0027] This invention discloses a security monitoring method for smart parks, referring to... Figure 1 This includes steps S1-S5: S1. Collect park surveillance video and divide the park surveillance video into multiple image groups using inter-frame coding technology.

[0028] Specifically, surveillance cameras installed throughout the park collect park surveillance videos.

[0029] Among them, surveillance cameras should be selected with high resolution (such as 1080p or higher) to ensure clear video capture. For surveillance cameras installed in outdoor environments, they should be dustproof and waterproof. In addition, for surveillance cameras installed indoors, wall-mounted or ceiling-mounted brackets should be used to ensure camera stability. For surveillance cameras installed outdoors, sturdy brackets and rain covers should be used to ensure that the equipment can work normally in inclement weather.

[0030] For example, Figure 2 This is a schematic diagram of the original surveillance video frame before processing. The image shows an unprocessed raw video image directly captured by a surveillance camera in a real-world smart park scenario. The overall image exhibits low contrast and significant limitations in grayscale distribution. As can be seen, the boundaries of background buildings, road textures, and shadow areas within the monitored area are blurred, resulting in insufficient visual depth. Particularly in dynamic areas involving pedestrian and vehicle movement, the grayscale difference between moving targets and the background environment is minimal, and their edge details are submerged in the static background and system background noise. This undifferentiated raw state weakens the system's ability to capture key motion features, making it susceptible to visual fatigue from slight fluctuations in lighting conditions during continuous playback. Furthermore, it directly limits the sensitivity of the backend target detection model in recognizing security events.

[0031] By strategically deploying surveillance cameras, the security and management efficiency of the park can be effectively improved, providing strong support for the park's operation. Therefore, the installation locations of surveillance cameras include, but are not limited to, park entrances and exits, main roads and passages, building entrances and exits (including entrances and exits of office buildings, warehouses, dormitories, etc.), warehouses and storage areas, data centers and computer rooms, perimeter areas (including park walls and fences), and special areas (including substations and hazardous materials storage areas).

[0032] It should be noted that the video frames in the park surveillance video change continuously. Directly performing histogram equalization on each video frame independently would result in inconsistent brightness and contrast changes between adjacent video frames, causing a sense of jump and affecting the smoothness of the video. Therefore, this invention uses inter-frame coding technology to divide the park surveillance video into multiple image groups and performs histogram equalization on all video frames in each image group together, ensuring the smoothness of the enhanced park surveillance video.

[0033] Furthermore, through inter-frame coding technology, the park surveillance video is divided into multiple Group of Pictures (GoP). A GoP is a sequence of video frames between two adjacent keyframes, starting from one keyframe and ending at the next. Therefore, a GoP contains multiple video frames, which consist of one keyframe (I-frame, Intra-coded Frame) and multiple prediction frames. In other words, each GoP contains one keyframe and multiple prediction frames, including forward prediction frames (P-frame, Predicted Frame) and bidirectional prediction frames (B-frame, Bi-directional Frame).

[0034] The division of image groups mainly relies on the insertion of keyframes, which is based on the set keyframe interval. Therefore, the keyframe interval determines the number of video frames in a group of images; based on the set keyframe interval... In the park's surveillance video, every Each video frame is inserted with a keyframe to form a new image group; each resulting image group contains One video frame, The number of all video frames contained in the image group, and .

[0035] For example, if the keyframe interval is 15 frames, a keyframe will be inserted every 15 video frames in the park surveillance video to form a new image group containing 16 video frames.

[0036] Among them, keyframe interval The keyframe interval is an integer between [5, 30]. In other embodiments, the keyframe interval is set to 15. The specific values ​​can be set according to the actual application scenario and requirements.

[0037] S2. In reverse order, the best matching block corresponding to the image block in each video frame is obtained sequentially through motion estimation, as well as the matching degree and motion vector between the best matching blocks corresponding to the image block in two adjacent video frames, and then the dynamic information evaluation value of the pixels in the image block is calculated.

[0038] It should be noted that motion analysis essentially identifies moving objects or areas by detecting pixel changes between consecutive frames. This is a crucial technique in park surveillance videos because the core objective of surveillance is to detect anomalies in real time. Park environments are places with frequent personnel movement and complex activities. Motion analysis helps surveillance systems capture and process this dynamic information more efficiently. Therefore, the motion characteristics of pixels are important information. If only the distribution of grayscale values ​​is considered without considering the motion state of pixels, the enhanced park surveillance video will lose important dynamic information, thus affecting the timely detection and handling of park security incidents.

[0039] Furthermore, it should be noted that, therefore, this invention obtains the matching degree and motion vector between the best matching blocks corresponding to two adjacent video frames by performing motion estimation on the video frames in the image group, and calculates the dynamic information evaluation value of the pixels in the image block. This value is used to process the comprehensive frequency of grayscale values, so that the grayscale histogram constructed based on the comprehensive frequency of each grayscale value is used to perform histogram equalization on the video frames in the image group. This results in enhanced park surveillance video with prominent motion features, improving the accuracy of identifying moving objects, and thus enabling timely detection and handling of park security incidents.

[0040] 1. Divide the last video frame in the image group into multiple image blocks of the same size. In reverse order, obtain the best matching block corresponding to each image block in each video frame through motion estimation, as well as the matching degree and motion vector between the best matching blocks corresponding to the image blocks in two adjacent video frames.

[0041] Specifically, each image group contains These video frames, arranged chronologically, are numbered sequentially from 1 to... , This represents the total number of video frames contained in the image group.

[0042] Furthermore, the first Each video frame is divided into multiple image blocks of the same size; the size of each image block is 11×11.

[0043] Furthermore, regarding the first The first video frame Image blocks Through motion estimation, in the first Image blocks are obtained from each video frame. The best matching block, as the first Image blocks In the The best matching block corresponding to each video frame For the first Best matching block in each video frame Through motion estimation, in the first Find the best matching block in each video frame The best matching block, as the first Image blocks In the The best matching block in each video frame Video frame number The value ranges from Up to 1, that is, obtaining the 1st digit in reverse order. Image blocks The best matching block corresponding to each video frame, until the first... Image blocks In the The best matching block corresponding to each video frame Time stops, and at this point, the first [number] is obtained. Image blocks The best matching block among all video frames.

[0044] Among them, through motion estimation, in the th Image blocks are obtained from each video frame. The specific method for obtaining the best matching block is as follows: through a search algorithm, in the th... Multiple candidate image patches are identified from each video frame, and image patches are calculated using motion estimation criteria. The candidate image patch with the highest matching degree is selected as the final image patch. The best matching block.

[0045] Among them, through motion estimation, in the th Find the best matching block in each video frame The specific method for obtaining the best matching block is as follows: through a search algorithm, in the th... Multiple candidate image blocks are identified from each video frame, and the best matching block is calculated using motion estimation criteria. The candidate image patch with the highest matching degree is selected as the best matching patch. The best matching block.

[0046] In addition, image patches are calculated using motion estimation criteria. And each candidate image patch, and the best matching patch The matching degree of each candidate image patch is calculated, and then all matching degrees are normalized.

[0047] It should be noted that motion vectors and matching degree can provide quantitative information on the motion of image blocks, which can capture pixel-level motion more accurately than simple image differencing or other simple methods.

[0048] The choice of search algorithm directly affects the efficiency and accuracy of motion estimation. Commonly used search algorithms include, but are not limited to, the Full Search Algorithm, the Three-Step Search Algorithm, the Diamond Search Algorithm, and the Hexagon-Based Search Algorithm. The Full Search Algorithm searches one by one, which is computationally intensive but highly accurate. The Three-Step Search Algorithm reduces computation by gradually narrowing the search range. The Diamond Search Algorithm uses a diamond structure for searching, balancing computation and accuracy. The Hexagon-Based Search Algorithm uses a hexagonal structure for searching, further optimizing search efficiency. Moreover, the Full Search Algorithm, the Three-Step Search Algorithm, the Diamond Search Algorithm, and the Hexagon-Based Search Algorithm are all well-known technologies and will not be elaborated upon here.

[0049] The purpose of motion estimation is to find the best matching block among multiple candidate image blocks for an image patch. Therefore, a criterion is needed to determine the degree of matching between two image patches. Motion estimation criteria include, but are not limited to, minimum mean squared error (MSE), minimum mean absolute error (MAD), and maximum number of matching pixels. Moreover, minimum mean squared error, minimum mean absolute error, and maximum number of matching pixels are all well-known techniques and will not be elaborated here.

[0050] Furthermore, for image patches The best matching block between two adjacent video frames and Due to the best matching block It is in the The best matching block obtained from each video frame The optimal matching block was calculated using motion estimation criteria during this process. and best matching block The degree of matching, and denoted as Therefore, it is possible to obtain image patches. The best matching block between two adjacent video frames and The degree of matching between them can be used to obtain the degree of matching between the best matching blocks corresponding to the image blocks in two adjacent video frames.

[0051] Furthermore, for image patches The best matching block between two adjacent video frames and Best matching block Best matching block The displacement vector between two adjacent best-fit blocks is the same as the displacement vector between two adjacent best-fit blocks. and The motion vector of , and denoted as Therefore, it is possible to obtain image patches. The best matching block between two adjacent video frames and The motion vectors between the images can be used to obtain the degree of matching and motion vectors between the best matching blocks corresponding to the image blocks in two adjacent video frames.

[0052] 2. Calculate the dynamic information evaluation value of the pixels in the image block based on the matching degree and motion vector between the best matching blocks corresponding to the image block in two adjacent video frames.

[0053] Specifically, according to image blocks Calculate the image patch by considering the matching degree and motion vector between the best matching blocks in two adjacent video frames. Dynamic information evaluation value of medium pixel In other words, image patches The dynamic information evaluation value of all pixels is the same and equal to .

[0054] Among them, for image patches Image blocks The formula for calculating the dynamic information evaluation value of a pixel is as follows: ; In the formula, For image blocks The dynamic information evaluation value of the middle pixel, , For image blocks The best matching block between two adjacent video frames and The degree of matching and motion vectors between them Indicates the modulus, therefore, Represents image blocks The best matching block between two adjacent video frames and The magnitude of the motion vector between them. Displacement threshold This represents the total number of video frames contained in the image group. It is a natural exponential function. Used for image blocks The best matching block between two adjacent video frames and The degree of matching between them is inversely normalized; This indicates taking the minimum value.

[0055] Among them, displacement threshold The value range is [10, 40]. In this embodiment, the displacement threshold is... Set to 20, in other embodiments, the displacement threshold The specific values ​​can be set according to the actual application scenario and requirements.

[0056] It should be noted that the matching degree can help distinguish between real motion and false motion caused by noise, changes in lighting, etc. A high matching degree means that there are indeed corresponding similar blocks in adjacent frames, and the motion vector is more reliable. Therefore, by using the magnitude of the motion vector as the base and the matching degree as the exponent, on the basis of a large matching degree between the best matching blocks corresponding to the image block in two adjacent video frames, the larger the motion displacement, that is, the larger the magnitude of the motion vector, the greater the dynamic information evaluation value of the pixels in the image block.

[0057] S3. Calculate the dynamic information evaluation value and comprehensive frequency of each gray value based on the dynamic information evaluation value and gray value of each pixel; calculate the integration coefficient of each gray value based on the comprehensive frequency and dynamic information evaluation value of each gray value and its adjacent gray values.

[0058] Specifically, for all video frames in the image group, statistical analysis is performed on the grayscale values ​​of all pixels in all video frames: for grayscale values To obtain a grayscale value equal to All pixels, and use the number of all pixels as the grayscale value. The overall frequency count is calculated; the average value of the dynamic information evaluation value of all pixels is calculated, and the obtained average value is used as the gray value. The dynamic information evaluation value.

[0059] It should be noted that grayscale values ​​alone reflect the static features of a video frame, while dynamic information reflects the temporal changes within the video frame. By combining these two, we can gain a deeper understanding of the content within the video frame.

[0060] Furthermore, regarding grayscale values According to grayscale values The gray value is calculated by combining the comprehensive frequency of its adjacent gray values ​​and the dynamic information evaluation value. The integration coefficient, then the grayscale value The formula for calculating the integration coefficient is as follows: ; In the formula, grayscale value Integration coefficient, grayscale value Dynamic information evaluation value, grayscale value It is grayscale value Adjacent gray values, , These are grayscale values. The dynamic information evaluation value and comprehensive frequency, grayscale value The combined frequency, It is a natural exponential function.

[0061] Among them, for grayscale values Adjacent gray values , , , The normalized result of the combined frequency of these gray values To adjust grayscale values The dynamic information evaluation values ​​of adjacent gray values ​​are weighted; gray values The larger the dynamic information evaluation value, and the higher the gray value... The smaller the dynamic information evaluation value of adjacent gray values, the more it indicates that the gray value... The more obvious the motion features of the corresponding pixels, the better the grayscale value. The larger the integration coefficient is when the overall frequency is processed, the more the motion features in the video frame will be highlighted.

[0062] S4. Process the overall frequency of each gray value by integrating the coefficients to obtain the processed overall frequency of each gray value, and construct a gray histogram.

[0063] Specifically, based on the integration coefficient of each gray value, the comprehensive frequency of each gray value is processed, and the product of the integration coefficient and the comprehensive frequency of each gray value is taken as the processed comprehensive frequency of each gray value. Based on the processed comprehensive frequencies of all gray values, a gray-level histogram is constructed, with the horizontal axis of the gray-level histogram representing the gray value and the vertical axis representing the processed comprehensive frequency of each gray value.

[0064] It should be noted that this invention processes the comprehensive frequency of grayscale values ​​through dynamic information evaluation values, and constructs a grayscale histogram based on the comprehensive frequency of each grayscale value after processing. In the grayscale histogram, the influence of grayscale values ​​that contain more dynamic information and have higher frequencies is highlighted, thereby highlighting the motion features in the enhanced park surveillance video and reducing the influence of grayscale values ​​with lower frequencies or less dynamic information, thereby reducing noise interference in the enhanced park surveillance video.

[0065] S5. Based on the grayscale histogram of each image group, perform histogram equalization on the video frames in each image group, and combine the obtained enhanced image groups into an enhanced monitoring video for security monitoring.

[0066] Specifically, based on the grayscale histogram of each image group, histogram equalization is performed on each video frame in the image group to obtain each enhanced video frame; all enhanced video frames are then combined into an enhanced image group; histogram equalization is a well-known technique and will not be described in detail here.

[0067] It should be noted that by constructing a grayscale histogram, histogram equalization is performed on all video frames in the image group together, making the contrast changes between video frames in the image group smoother, improving the smoothness of the enhanced surveillance video, and thus enabling timely detection and handling of security incidents in the park.

[0068] It should be further explained that by obtaining grayscale histograms and performing histogram equalization on the video frames in the image group, the details of motion features in the enhanced video frames are enhanced, avoiding the loss of details of motion features due to excessive contrast enhancement. In addition, it can also enhance the stability of the enhanced video frames under changes in lighting and dynamic scenes, highlight the motion features in the enhanced park surveillance video, improve the accuracy of identifying moving objects, and thus achieve timely detection and handling of park security incidents.

[0069] Furthermore, the obtained enhanced image groups are combined to form an enhanced surveillance video. A pre-trained target detection model is selected, which is responsible for identifying people and vehicles in the video and marking them with bounding boxes. Therefore, the enhanced surveillance video is input into the target detection model to perform target monitoring on the enhanced surveillance video, obtain multiple moving targets, and mark each moving target with bounding boxes. At the same time, the category label of each detected moving target is output to realize the security monitoring of the park.

[0070] Among them, object detection models include, but are not limited to, YOLOv5 (You Only Look Once version 5), YOLOv7 (You Only Look Once version 7), and YOLOv8 (You Only Look Once version 8). These models are usually trained on large datasets (such as the COCO (Common Objects in COntext) dataset) and have the ability to recognize common objects.

[0071] There are two categories of labels for moving targets: people and vehicles.

[0072] For example, Figure 3 This is a schematic diagram of a surveillance video frame enhanced by existing technology. The original surveillance video frames before processing are continuously changing. However, in the enhanced video frames, because histogram equalization is performed independently on each frame, the brightness and contrast changes between adjacent frames are inconsistent, resulting in abrupt changes in background color. This inconsistency creates a noticeable jumpiness in actual monitoring, severely affecting video smoothness. Furthermore, because conventional histogram equalization only considers the static distribution of grayscale values ​​and not the motion state of pixels, the edges of vehicles and pedestrians in the enhanced video frames blend well with the background, and their motion characteristics are not prominent. This makes it easy for the enhanced video to lose important dynamic information, thus affecting the timely detection of security incidents in the park.

[0073] For example, Figure 4 This is a schematic diagram of the enhanced surveillance video frame according to the present invention. The diagram illustrates the video image enhancement result generated using the histogram equalization method of the present invention, which employs inter-frame coding technology, reverse motion estimation, and integrated coefficient correction. The target object in the image has a clear outline, and the overall visual contrast has been significantly improved. As can be seen from the diagram, the enhanced image is not a simple linear stretch of the entire image, but rather exhibits strong feature targeting. (1) Since the present invention introduces dynamic information evaluation value to reconstruct grayscale histogram, the grayscale range supporting motion features obtains a higher integration coefficient. This results in the edges of dynamic targets such as vehicles and people that are displaced in the picture being precisely enhanced, and their texture details are more prominent than the background, effectively solving the pain point of blurred motion features in the prior art.

[0074] (2) Thanks to dividing the video into image groups and implementing collaborative equalization within the group, the image eliminates the frequent changes in brightness and contrast caused by the independent processing of single frames in conventional algorithms. This processing method ensures that the visual energy distribution between adjacent video frames has a very high degree of continuity, so that the surveillance video can maintain high definition while showing a natural and stable sense of visual flow.

[0075] (3) By extracting motion features and suppressing background noise, this invention provides high-quality input data for the back-end prediction model. This enables the system to maintain a high degree of accuracy in identifying key elements such as people and vehicles when faced with drastic changes in light or dynamic and complex scenes, significantly improving the real-time response efficiency and early warning robustness of park security monitoring.

[0076] This invention also discloses a security monitoring system for smart parks, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a security monitoring method for smart parks according to the present invention.

[0077] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

Claims

1. A security monitoring method for smart parks, characterized in that, include: Inter-frame coding technology is used to divide the collected park surveillance video into multiple image groups; The last video frame in the image group is divided into multiple image blocks of the same size. In reverse order, the best matching block for each image block in each video frame is obtained sequentially through motion estimation, including: for the... For any image patch in the nth video frame, motion estimation is performed at the nth... The best matching block for the image block is obtained in the nth video frame; for the image block in the nth... The best matching block in the nth video frame, through motion estimation, is... The best matching block is obtained from the first video frame; the process is repeated cyclically in descending order of video frame number until the image block is obtained from the second video frame. The best matching block in each video frame; Less than And integers greater than 1 Given the number of all video frames in the image group, and the matching degree and motion vector between the best matching blocks corresponding to the image patch in two adjacent video frames; calculate the dynamic information evaluation value of the pixels in the image patch based on the matching degree and motion vector between the best matching blocks corresponding to the image patch in two adjacent video frames. Based on the dynamic information evaluation value and gray value of each pixel, calculate the dynamic information evaluation value and comprehensive frequency of each gray value; based on the comprehensive frequency and dynamic information evaluation value of each gray value and its adjacent gray values, calculate the integration coefficient of each gray value; process the comprehensive frequency of each gray value through the integration coefficient to obtain the processed comprehensive frequency of each gray value, and construct a gray-level histogram. Based on the grayscale histogram of each image group, histogram equalization is performed on the video frames in each image group, and the resulting enhanced image groups are combined into an enhanced surveillance video for security monitoring.

2. The security monitoring method for a smart park according to claim 1, characterized in that, The method involves dividing the acquired park surveillance video into multiple image groups using inter-frame coding technology, including: Based on the set keyframe interval, a keyframe is inserted into the park surveillance video every preset number of video frames to form a new image group; then the image group contains a keyframe and multiple prediction frames, the prediction frames include forward prediction frames and bidirectional prediction frames.

3. The security monitoring method for a smart park according to claim 1, characterized in that, The motion estimation includes: Regarding the first The nth image patch is determined in the previous video frame using a search algorithm. Multiple candidate image patches of the nth image patch are calculated using motion estimation criteria. The matching degree between each image patch and each candidate image patch is used to determine the candidate image patch with the highest matching degree, which is then selected as the first candidate image patch. The best matching block for each image block in the previous video frame.

4. A security monitoring method for a smart park according to claim 1, characterized in that, The evaluation value of the dynamic information of pixels in the calculated image block includes: Using the ratio of the magnitude of the motion vector between the best-matching blocks corresponding to two adjacent video frames of an image patch to the displacement threshold as the base, and using the sum of 0.5 and the natural exponential function as the exponent, an intermediate value is obtained by exponentiation; wherein, the independent variable of the natural exponential function is the negative of the matching degree between the best-matching blocks corresponding to two adjacent video frames of the image patch; the minimum value is extracted from the intermediate values ​​corresponding to all two adjacent video frames as the dynamic information evaluation value of the pixels in the image patch.

5. A security monitoring method for a smart park according to claim 1, characterized in that, The step of calculating the dynamic information evaluation value and comprehensive frequency of each grayscale value based on the dynamic information evaluation value and grayscale value of the pixel includes: For all video frames in the image group, the statistical grayscale value is equal to The number of all pixels, used as the grayscale value. The overall frequency; Calculate the grayscale value equals The average of the dynamic information evaluation values ​​of all pixels is used as the grayscale value. The dynamic information evaluation value.

6. A security monitoring method for a smart park according to claim 1, characterized in that, The calculation of the integration coefficient for each grayscale value based on the combined frequency and dynamic information evaluation value of each grayscale value and its adjacent grayscale values ​​includes: grayscale value The integration coefficient is equal to the grayscale value. The sum of the dynamic information evaluation value and a natural index term; wherein, the index of the natural index term is: for grayscale values The negative number of the weighted sum of the dynamic information evaluation values ​​of each adjacent gray value; In the weighted summation process, the weight of each adjacent gray value is the proportion of its combined frequency to the total combined frequency of all adjacent gray values; the adjacent gray values ​​include gray values... Gray values ​​with an upward offset of -2, -1, 1, and 2 on the grayscale axis.

7. A security monitoring method for a smart park according to claim 1, characterized in that, The process of processing the overall frequency of each grayscale value using an integration coefficient to obtain the processed overall frequency of each grayscale value includes: The processed comprehensive frequency of each grayscale value is obtained by multiplying the integration coefficient of each grayscale value by the comprehensive frequency of each grayscale value.

8. A security monitoring method for a smart park according to claim 1, characterized in that, The aforementioned security monitoring includes: The enhanced surveillance video is input into a pre-trained target detection model to identify moving targets in the video; the moving targets are marked with bounding boxes, and the category labels of the moving targets are output.

9. A security monitoring system for smart parks, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a security monitoring method for a smart park according to any one of claims 1-8.

Citation Information

Patent Citations

  • Motion-estimation-based road video stabilization method

    CN102202164A

  • Security and protection monitoring video real-time transmission method and system based on Internet of Things

    CN118612391A