Algorithm for detecting highway spilled objects at low frame rate based on image partitioning

Through the low frame rate detection algorithm based on image chunking, the problem of low heating efficiency of highway sprinkler detection system in winter is solved, and efficient and low-energy sprinkler detection is achieved, suitable for low-temperature environments.

CN119625663AActive Publication Date: 2025-03-14SOUTH CHINA UNIV OF TECH +1

Patent Information

Application Number
CN202510164986.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-03-14
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

When used in winter, the existing highway sprinkler detection system is affected by the upper underground temperature limit, and the heating effect is not obvious. External equipment needs to be heated and temperature-regulated, resulting in high energy consumption and low efficiency.

Method used

A low-frame rate detection algorithm based on image chunking is adopted to achieve efficient detection of highway spills through video frame extraction, road area identification, block processing, extended block grayscale calculation, suspected motion target extraction and spilling discrimination.

Benefits of technology

This algorithm reduces the calculation amount through block processing, improves detection speed, reduces energy consumption, and realizes efficient sprinkler detection at low frame rates. It is suitable for highway monitoring in winter low temperature environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625663A_ABST
    Figure CN119625663A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of video analysis, and discloses a low-frame-rate expressway spilled object detection algorithm based on image partitioning, which sequentially comprises the steps of video frame extraction, automatic road region recognition, road partitioning, region block expansion, expansion block grey-scale map calculation, suspected moving object extraction and spilled object judgment. According to the method, the detected image area is partitioned, then each area is independently processed, if the expansion area corresponding to the area has obvious pixel change, foreground detection is carried out on the area, and then the foreground target obtained in each area is merged to obtain the whole foreground image. And carrying out follow-up processing of throwing object target verification on the foreground image. Due to the fact that obvious space-time imbalance exists in highway traffic flow, obvious continuous scenes without traffic flow exist in different positions and different time periods of a monitoring area, the huge calculation cost generated by detecting a whole picture can be avoided in a partitioning mode, and the calculation amount is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of video analysis, and in particular to an algorithm for detecting highway spilled objects at a low frame rate based on image segmentation. Background Art

[0002] Highway spill identification mainly refers to a series of cognitive and analytical processes, including identifying various abnormal objects that appear on the highway, judging their sources, properties, and possible impacts on traffic.

[0003] For example, the spilled object detection method, device, electronic device and storage medium disclosed in the Chinese patent application number CN202110125460.7, the spilled object detection method includes: obtaining an original image of a road; segmenting the original image to obtain a segmentation map of the original image, wherein the segmentation map contains semantic information of multiple non-spilled objects; synthesizing the segmentation map according to a preset generative adversarial network to obtain a composite image of the road; comparing the original image and the composite image to obtain a difference feature map between the original image and the composite image; determining whether there is spilled objects on the road according to the difference feature map.

[0004] This technology obtains a synthetic image of the road by synthesizing the segmented images. In essence, it is based on foreground detection of the entire image or road area, and there is a situation where the image area to be processed is large. In addition, in the current technology, the foreground detection algorithm is calculated based on each pixel, which has a large amount of calculation and the related algorithm has high requirements on machine performance. Summary of the invention

[0005] The purpose of this application is to provide an algorithm for detecting highway spills at a low frame rate based on image segmentation, so as to solve the problem that the existing system proposed in the background technology is not effective in heating when used in winter due to the upper limit of underground temperature, and external equipment is still needed to adjust the indoor heating temperature.

[0006] To achieve the above purpose, the present application discloses the following technical solution: an algorithm for detecting highway spills at a low frame rate based on image segmentation, which comprises the following steps in sequence: Video frame extraction: Get full-frame images in high-frame rate videos and extract one image every F frames; Automatically identify road areas: Identify the extracted images to obtain road areas; Road block division: Divide the obtained road area into N*N blocks; Area block expansion: Expand the edge of each block outward by size s to cover the scattered objects falling on the boundary, and obtain the extend-block block; Grayscale image calculation of extended blocks: Calculate the grayscale image of each extend-block. When the number of points in the grayscale images corresponding to two adjacent pictures exceeds M, perform GMM background modeling on the consecutive K frames of the extend-block corresponding to the later extracted picture of the two adjacent pictures, and extract the foreground target. Extracting suspected moving targets: extracting suspicious targets from the foreground targets, tracking the suspicious targets, and extracting stationary targets; Identification of scattered objects: The stationary target is traced back L frames for target matching to obtain its position in the L frame, and it is determined whether there is a change between its position in the L frame and the position in the current frame. If there is a change, it means that the motion state of the stationary target has changed from moving to stationary, and it is a scattered object, so it is reported. Otherwise, it is judged as a false alarm and the stationary target is discarded.

[0007] Preferably, the step of acquiring a full-frame image in a high frame rate video specifically includes: Full-frame images of high-frame rate videos are obtained from road cameras, and one image is extracted every F frames.

[0008] Preferably, the step of identifying the extracted image to obtain the road area specifically includes: The images extracted from the video frames are identified by a deep learning image semantic segmentation model to obtain ROI regions {[x1, y1], [x2, y2], [x3, y3]...[xn, yn]} where target detection is required, where xn and yn represent the coordinate positions of the center of each region in the image.

[0009] Preferably, the step of dividing the obtained road area into N*N blocks specifically includes: Draw a polygon grayscale image grep according to the obtained ROI area; A preprocessed image is obtained by performing a bitwise AND operation on the extracted image and the polygon grayscale image; The preprocessed image is divided into N×N blocks.

[0010] Preferably, the area block expansion specifically includes: The size of each block is [x, y, w, h], where x is the horizontal coordinate of the block in the image, y is the vertical coordinate of the block in the image, w is the length of the block, and h is the width of the block; Expand the edge of the block by size s to obtain extend-block blocks. The area of ​​each extend-block block is [x, y, w+2s, h+2s].

[0011] Preferably, the calculation of the extended block grayscale image specifically includes: Calculate the grayscale image of each extend-block block in frame t, recorded as , where i and j are the corresponding rows and columns of the extend-block in the N×N blocks respectively; like , then perform GMM background modeling on the (i, j)th block of the t frame and the K consecutive frames to extract the foreground target.

[0012] Preferably, extracting the suspected moving target specifically includes: The extracted foreground target is tracked using a target tracking algorithm. Based on the IOU of the current frame and the historical frame, the suspected target in different frames is associated and the motion trajectory of the suspected target is analyzed. The IOU calculation formula is: Among them, A is the current block and B is the historical frame.

[0013] Preferably, the scattered object identification specifically includes: Set a stationary IOU threshold Ths, and compare the calculated IOU value corresponding to each target foreground with the stationary IOU threshold Ths. When the IOU value is greater than the stationary IOU threshold Ths, the suspected target is judged to be stationary and defined as the stationary target. The target motion trajectory of the stationary target is traced back to determine whether the state of the stationary target is from moving to stationary and meets the movement characteristics of scattered objects. If so, report the scattered objects. Otherwise, it is judged as a false alarm and the stationary target is discarded.

[0014] Preferably, the target motion trajectory backtracking specifically includes: A corner detection algorithm is used to extract feature values ​​of the stationary target to form a feature vector representing target feature point information, and a target matching template is used to match the historical frame image to achieve target registration; Set the window offset , get the grayscale change expression of the pixel before and after the moving window, and define the corner response value to quickly find the corner point; the grayscale change expression of the pixel is ,in, is the pixel coordinate corresponding to the window, is a window function, for The gray value of the pixel at the coordinate, for Gray value of the pixel at the coordinate; The extracted feature values ​​are classified using a clustering algorithm, and the boundary points of stationary targets are removed using a Gaussian filter method. The images to be matched are overlapped and placed in a coordinate system. The slopes of the straight lines between the extracted feature points are first calculated. The same or similar feature points are correctly matched, and then the Hausdorff distance is used for accurate registration. The similarity between two image blocks is determined using the absolute error sum algorithm, which is: , where, in the search graph S, take (i, j) as the upper left corner, remove the M×m size subgraph, and calculate its similarity with the template, Search for graph S The pixel value of the point, is the pixel value of the matching image at coordinate (s, t); Set a sliding window to cover the template image in sequence to obtain all the pixels in the window coverage area, and use the window to cover the image to be matched to obtain the pixels; subtract the pixels in the template coverage area from the pixels in the coverage area to be matched to obtain the absolute value sum of the grayscale differences of all the pixels; move the window on the image to be matched, and repeat the calculation of the absolute value sum, and end when the set search range is exceeded; Find the window with the smallest SAD value within the search range as the target that best matches the template, obtain the coordinate point U of the matching target, and obtain the position sequence of the stationary target from the tLth frame to the tth frame before it stops. .

[0015] Preferably, the determining whether the state of the stationary target is from moving to stationary and meets the motion characteristics of the thrown object specifically includes: The position change of the stationary target from the tL frame to the t frame is determined. If there is a position change, it means that the state of the stationary target is from moving to stationary and meets the motion characteristics of the scattered object.

[0016] Technical effect: The algorithm of the present application for detecting spilled objects on highways at a low frame rate based on image segmentation divides the detected picture area into blocks, and then processes each area independently. If there is an obvious pixel change in the extended area corresponding to the block area, foreground detection is performed on this area, and then the foreground targets obtained in each area are merged to obtain the entire foreground image, and then the foreground image is subsequently processed to verify the target of the spilled objects. Due to the obvious spatiotemporal imbalance of highway traffic, there will be scenes with obvious continuous lack of traffic at different locations and different time periods in the monitoring area. The huge computational cost of detecting the entire picture can be avoided by segmenting the image, effectively reducing the amount of calculation. Therefore, the present application can effectively improve the speed of the detection algorithm, making the algorithm have better landing value. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of an algorithm for detecting highway spilled objects at a low frame rate based on image segmentation provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present application are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0020] In this article, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprising..." do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.

[0021] In the management of highways, the identification of scattered objects is not only conducive to improving the road environment, but also to improving the driving safety of vehicles on the road. Therefore, accurate identification of scattered objects has far-reaching significance for the supervision of driving behavior, the improvement of vehicle driving safety, and the maintenance of highways. In this regard, this embodiment discloses how Figure 1 The algorithm shown is a low frame rate algorithm for detecting spilled objects on highways based on image segmentation, which includes video frame extraction, automatic recognition of road areas, road segmentation, area block expansion, grayscale image calculation of expanded blocks, extraction of suspected moving targets and spilled object identification.

[0022] Below, the specific content of each step is explained in detail.

[0023] Video frame extraction: Get full-frame images in high-frame rate videos and extract one image every F frames.

[0024] Among them, the full-frame image is obtained from the high-frame rate video of the road camera.

[0025] Automatically identify road areas: Identify the extracted images to obtain road areas. Specifically include: The images extracted from the video frames are identified by a deep learning image semantic segmentation model to obtain ROI regions {[x1, y1], [x2, y2], [x3, y3]...[xn, yn]} where target detection is required, where xn and yn represent the coordinate positions of the center of each region in the image.

[0026] Road block division: Divide the obtained road area into N*N blocks. Specifically including: Draw a polygon grayscale image grep according to the obtained ROI area; A preprocessed image is obtained by performing a bitwise AND operation on the extracted image and the polygon grayscale image; The preprocessed image is divided into N×N blocks.

[0027] Block extension: Expand the edge of each block by a size of s to cover the scattered objects on the boundary, and obtain the extend-block block. Specifically, it includes: The size of each block is [x, y, w, h], where x is the horizontal coordinate of the block in the image, y is the vertical coordinate of the block in the image, w is the length of the block, and h is the width of the block; Expand the edge of the block outward by size s to obtain extend-block blocks. The area of ​​each extend-block block is [x, y, w+2s, h+2s]. The purpose of each extend-block block is to completely cover the small scattered objects that fall on the boundary of the original block.

[0028] Grayscale image calculation of extended blocks: Calculate the grayscale image of each extend-block. When the number of points in the grayscale images corresponding to two adjacent pictures exceeds M, perform GMM background modeling on the consecutive K frames of the extend-block corresponding to the later extracted picture of the two adjacent pictures, and extract the foreground target. Specifically include: Calculate the grayscale image of each extend-block block in frame t, recorded as , where i and j are the corresponding rows and columns of the extend-block in the N×N blocks respectively; like , then perform GMM background modeling on the (i, j)th block of the t frame and the K consecutive frames to extract the foreground target.

[0029] Extract suspected moving targets: extract suspicious targets from the foreground targets, track the suspicious targets, and extract stationary targets. Specifically include: The extracted foreground target is tracked using a target tracking algorithm. Based on the IOU of the current frame and the historical frame, the suspected target in different frames is associated and the motion trajectory of the suspected target is analyzed. The IOU calculation formula is: Among them, A is the current block and B is the historical frame.

[0030] Identification of scattered objects: Go back L frames to match the static object, obtain its position in the L frame, and determine whether there is a change between its position in the L frame and the current frame. If there is a change, it means that the motion state of the static object has changed from motion to stillness, and it is a scattered object, so it is reported. Otherwise, it is judged as a false alarm and the static object is discarded. Specifically, it includes: Set a stationary IOU threshold Ths, and compare the calculated IOU value corresponding to each target foreground with the stationary IOU threshold Ths. When the IOU value is greater than the stationary IOU threshold Ths, the suspected target is judged to be stationary and defined as the stationary target. The target motion trajectory of the stationary target is traced back to determine whether the state of the stationary target is from moving to stationary and meets the movement characteristics of scattered objects. If so, report the scattered objects. Otherwise, it is judged as a false alarm and the stationary target is discarded.

[0031] In the identification of scattered objects, the process of tracing the target motion trajectory specifically includes: A corner detection algorithm is used to extract feature values ​​of the stationary target to form a feature vector representing target feature point information, and a target matching template is used to match the historical frame image to achieve target registration; Set the window offset , get the grayscale change expression of the pixel before and after the moving window, and define the corner response value to quickly find the corner point; the grayscale change expression of the pixel is ,in, is the pixel coordinate corresponding to the window, is a window function, for The gray value of the pixel at the coordinate, for Gray value of the pixel at the coordinate; The extracted feature values ​​are classified using a clustering algorithm, and the boundary points of stationary targets are removed using a Gaussian filter method. The images to be matched are overlapped and placed in a coordinate system. The slopes of the straight lines between the extracted feature points are first calculated. The same or similar feature points are correctly matched, and then the Hausdorff distance is used for accurate registration. The similarity between two image blocks is determined using the absolute error sum algorithm, which is: , where, in the search graph S, take (i, j) as the upper left corner, remove the M×m size subgraph, and calculate its similarity with the template, Search for graph S The pixel value of the point, is the pixel value of the matching image at coordinate (s, t); Set a sliding window to cover the template image in sequence to obtain all the pixels in the window coverage area, and use the window to cover the image to be matched to obtain the pixels; subtract the pixels in the template coverage area from the pixels in the coverage area to be matched to obtain the absolute value sum of the grayscale differences of all the pixels; move the window on the image to be matched, and repeat the calculation of the absolute value sum, and end when the set search range is exceeded; Find the window with the smallest SAD value within the search range as the target that best matches the template, obtain the coordinate point U of the matching target, and obtain the position sequence of the stationary target from the tLth frame to the tth frame before it stops. .

[0032] By acquiring the above position sequence, it is determined whether the state of the stationary target is from moving to stationary and meets the motion characteristics of the scattered object, specifically including: The position change of the stationary target from the tL frame to the t frame is determined. If there is a position change, it means that the state of the stationary target is from moving to stationary and meets the motion characteristics of the scattered object.

[0033] Based on the above, the algorithm of low frame rate detection of spilled objects on highways based on image segmentation in this embodiment divides the detected picture area into blocks, and then processes each area independently. If there is an obvious pixel change in the extended area corresponding to the block area, foreground detection is performed on this area, and then the foreground targets obtained in each area are merged to obtain the entire foreground image, and then the foreground image is subsequently processed for target verification of the spilled objects. Due to the obvious spatiotemporal imbalance of highway traffic, there will be scenes with obvious continuous lack of traffic at different locations and different time periods in the monitoring area. The huge computational cost of detecting the entire picture can be avoided by segmenting, effectively reducing the amount of calculation. It has a good promoting effect on reducing the cost of machine application and improving the response efficiency of the detection algorithm, and has higher landing value.

[0034] Finally, it should be noted that the above are only preferred embodiments of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. An algorithm for detecting highway spills at a low frame rate based on image segmentation, characterized in that: The following steps are included in sequence: Video frame extraction: Get full-frame images in high-frame rate videos and extract one image every F frames; Automatically identify road areas: Identify the extracted images to obtain road areas; Road block division: Divide the obtained road area into N*N blocks; Area block expansion: Expand the edge of each block outward by size s to cover the scattered objects falling on the boundary, and obtain the extend-block block; Grayscale image calculation of extended blocks: Calculate the grayscale image of each extend-block. When the number of points in the grayscale images corresponding to two adjacent pictures exceeds M, perform GMM background modeling on the consecutive K frames of the extend-block corresponding to the later extracted picture of the two adjacent pictures, and extract the foreground target. Extracting suspected moving targets: extracting suspicious targets from the foreground targets, tracking the suspicious targets, and extracting stationary targets; Identification of scattered objects: The stationary target is traced back L frames for target matching to obtain its position in the L frame, and it is determined whether there is a change between its position in the L frame and the position in the current frame. If there is a change, it means that the motion state of the stationary target has changed from moving to stationary, and it is a scattered object, so it is reported. Otherwise, it is judged as a false alarm and the stationary target is discarded.

2. The algorithm for detecting highway spills based on low frame rate image segmentation according to claim 1 is characterized in that: The method of obtaining a full-frame image in a high frame rate video specifically includes: Full-frame images of high-frame rate videos are obtained from road cameras, and one image is extracted every F frames.

3. The algorithm for detecting highway spills based on low frame rate image segmentation according to claim 1 is characterized in that: The step of identifying the extracted image to obtain the road area specifically includes: The images extracted from the video frames are identified by a deep learning image semantic segmentation model to obtain ROI regions {[x1, y1], [x2, y2], [x3, y3]...[xn, yn]} where target detection is required, where xn and yn represent the coordinate positions of the center of each region in the image.

4. The algorithm for detecting highway spills based on low frame rate image segmentation according to claim 3 is characterized in that: The step of dividing the obtained road area into N*N blocks specifically includes: Draw a polygon grayscale image grep according to the obtained ROI area; A preprocessed image is obtained by performing a bitwise AND operation on the extracted image and the polygon grayscale image; The preprocessed image is divided into N×N blocks.

5. The algorithm for detecting highway spills based on low frame rate based on image segmentation according to claim 4 is characterized in that: The area block expansion specifically includes: The size of each block is [x, y, w, h], where x is the horizontal coordinate of the block in the image, y is the vertical coordinate of the block in the image, w is the length of the block, and h is the width of the block; Expand the edge of the block by size s to obtain extend-block blocks. The area of ​​each extend-block block is [x, y, w+2s, h+2s].

6. The algorithm for detecting highway spillage based on low frame rate image segmentation according to claim 1 is characterized in that: The extended block grayscale image calculation specifically includes: Calculate the grayscale image of each extend-block block in frame t, recorded as , where i and j are the corresponding rows and columns of the extend-block in the N×N blocks respectively; like , then perform GMM background modeling on the (i, j)th block of the t frame and the K consecutive frames to extract the foreground target.

7. The algorithm for detecting highway spills based on low frame rate image segmentation according to claim 6 is characterized in that: The extracting of the suspected moving target specifically includes: The extracted foreground target is tracked using a target tracking algorithm. Based on the IOU of the current frame and the historical frame, the suspected target in different frames is associated and the motion trajectory of the suspected target is analyzed. The IOU calculation formula is: Among them, A is the current block and B is the historical frame.

8. The algorithm for detecting highway spills based on image segmentation at a low frame rate according to claim 7 is characterized in that: The scattered object identification specifically includes: Set a stationary IOU threshold Ths, and compare the calculated IOU value corresponding to each target foreground with the stationary IOU threshold Ths. When the IOU value is greater than the stationary IOU threshold Ths, the suspected target is judged to be stationary and defined as the stationary target. The target motion trajectory of the stationary target is traced back to determine whether the state of the stationary target is from moving to stationary and meets the movement characteristics of scattered objects. If so, report the scattered objects. Otherwise, it is judged as a false alarm and the stationary target is discarded.

9. The algorithm for detecting highway spills based on image segmentation at a low frame rate according to claim 8 is characterized in that: The target motion trajectory backtracking specifically includes: A corner detection algorithm is used to extract feature values ​​of the stationary target to form a feature vector representing target feature point information, and a target matching template is used to match the historical frame image to achieve target registration; Set the window offset , get the grayscale change expression of the pixel before and after the moving window, and define the corner response value to quickly find the corner point; the grayscale change expression of the pixel is ,in, is the pixel coordinate corresponding to the window, is a window function, for The gray value of the pixel at the coordinate, for Gray value of the pixel at the coordinate; The extracted feature values ​​are classified using a clustering algorithm, and the boundary points of stationary targets are removed using a Gaussian filter method. The images to be matched are overlapped and placed in a coordinate system. The slopes of the straight lines between the extracted feature points are first calculated. The same or similar feature points are correctly matched, and then the Hausdorff distance is used for accurate registration. The similarity between two image blocks is determined using the absolute error sum algorithm, which is: , where, in the search graph S, take (i, j) as the upper left corner, remove the M×m size subgraph, and calculate its similarity with the template, It is the search graph S The pixel value of the point, is the pixel value of the matching image at coordinate (s, t); Set a sliding window to cover the template image in sequence to obtain all the pixels in the window coverage area, and use the window to cover the image to be matched to obtain the pixels; subtract the pixels in the template coverage area from the pixels in the coverage area to be matched to obtain the absolute value sum of the grayscale differences of all the pixels; move the window on the image to be matched, and repeat the calculation of the absolute value sum, and end when the set search range is exceeded; Find the window with the smallest SAD value within the search range as the target that best matches the template, obtain the coordinate point U of the matching target, and obtain the position sequence of the stationary target from the tLth frame to the tth frame before it stops. .

10. The algorithm for detecting highway spills based on image segmentation at a low frame rate according to claim 9 is characterized in that: The step of judging whether the state of the stationary target is from moving to stationary and meets the motion characteristics of the scattered object specifically includes: The position change of the stationary target from the tL frame to the t frame is determined. If there is a position change, it means that the state of the stationary target is from moving to stationary and meets the motion characteristics of the scattered object.

Citation Information

Patent Citations

  • Throssed object detection method and device, electronic equipment and storage medium

    CN114913488A

  • Highway thrown object detection method and device based on background model and tracking

    CN116434160A

  • System and method for identifying and detecting dynamic and static spilled objects on expressway

    CN119207120A

Cited By

  • Backlight source online detection method based on optical equipment

    CN120213422A

  • Throwing object motion analysis system and method applied to expressway

    CN121236718A

  • A litter motion analysis system and method applied to a highway

    CN121236718B