A method for detecting explosion fireball contours based on convex hull algorithm

Through the method based on the convex hull algorithm, the problem of incomplete extraction of the explosive fireball contour is solved. The image segmentation and convex hull algorithm are used to obtain the complete contour of the explosive fireball, achieving efficient and accurate contour detection and dynamic analysis.

CN115937160BActive Publication Date: 2025-08-19NORTHWEST INST OF NUCLEAR TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211626531.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2025-08-19
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

The prior art is difficult to obtain the complete profile of the target area of the explosive fireball, resulting in difficulty or inaccurate extraction of characteristic parameters such as the profile and center of mass.

Method used

Using a method based on the convex hull algorithm, the original image of the explosive fireball is segmented and denoised, the edges of the sub-region are extracted, the boundary point coordinate sets are merged, and the Graham scanning algorithm is used to solve the smallest external polygon to obtain the complete outline of the explosive fireball.

Benefits of technology

It realizes the acquisition of the complete outline of the explosive fireball in the non-connected area, improves image processing efficiency, reduces the impact of background interference and smoke, and the obtained outline is accurate and suitable for dynamic analysis in video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937160B_ABST
    Figure CN115937160B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for detecting the outline of an explosion fireball, and specifically to a method for detecting the outline of an explosion fireball based on a convex hull algorithm, which solves the technical problem that existing methods for extracting the outline of an explosion fireball cannot obtain the complete outline of a target area of an explosion fireball. The present invention segments the original image of the explosion fireball directly or after grayscale conversion to obtain a binary image of the explosion fireball image, uses morphological operations to denoise the binary image, extracts the edges of the explosion fireball sub-regions, obtains a set of boundary coordinates of the explosion fireball sub-regions, and uses a convex hull algorithm to solve the minimum circumscribed polygon in the set of boundary coordinates of the explosion fireball sub-regions to obtain the complete outline of the explosion fireball. The explosion fireball outline detection method provided by the present invention has accurate detection results and high image processing efficiency, and can be applied to the dynamic analysis of explosion fireballs in videos.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for detecting the contour of an explosion fireball, and in particular to a method for detecting the contour of an explosion fireball based on a convex hull algorithm. Background Art

[0002] Fireball parameters and their evolution are crucial for studying blast damage and explosive performance. Researchers are currently investigating fireball parameter measurement and detection techniques, including: simulating fireball diameter using explosive properties, measuring fireball characteristic parameters using thermal infrared instruments, and measuring fireballs using high-speed cameras. These studies primarily focus on simulating explosive thermobaric characteristics and fireball temperature distribution, while relatively little research has focused on extracting characteristic parameters such as the fireball's contour and center of mass.

[0003] The current basic process for extracting characteristic parameters of explosive fireballs based on image processing techniques is as follows: first, extract a differential image of the fireball background; second, extract a binary image using threshold segmentation; and finally, use image segmentation methods such as region growing and nearest neighbor to determine the target region of the fireball. The edges of the target region are then extracted to obtain the fireball outline, from which characteristic parameters such as the center of mass can be derived. However, the formation of explosive fireballs is often accompanied by thick smoke and dust, and may also be accompanied by factors such as flying flames and background interference. Therefore, it is difficult to grow the target region of the fireball into a connected whole using image segmentation methods alone. As a result, the extracted fireball outline consists of several disconnected subregions, making the extraction of characteristic parameters such as the fireball outline and center of mass difficult or inaccurate. Summary of the Invention

[0004] The purpose of the present invention is to solve the technical problem that the existing explosion fireball contour extraction method cannot obtain the complete contour of the explosion fireball target area, and to provide an explosion fireball contour detection method based on a convex hull algorithm.

[0005] The design idea of the present invention is:

[0006] To address the difficulty in obtaining a complete segmented image of a fireball due to factors such as smoke and dust accompanying the fireball's generation process, resulting in poor fireball contour extraction, this paper proposes a fireball contour detection method based on a convex hull algorithm. First, the original fireball image is directly segmented and, after denoising and other processing, an image of the target area of the fireball is obtained. Next, the edges of the target sub-areas of the fireball are extracted, resulting in a set of boundary point coordinates for the target sub-areas. Based on this, the coordinate sets of all target sub-area boundary points are merged to construct a set of boundary points for the target area of the fireball. Finally, the convex hull algorithm is used to solve the minimum circumscribed polygon of the boundary point set of the target area of the fireball to obtain the complete outline of the target area of the fireball.

[0007] To achieve the above object, the technical solution adopted by the present invention is:

[0008] A method for detecting the contour of an explosion fireball based on a convex hull algorithm is characterized in that it includes the following steps:

[0009] Step 1: Obtain an original image of an explosion fireball including k sub-areas, where k is an integer greater than or equal to 1, and the original image of the explosion fireball is an RGB image or a grayscale image;

[0010] Step 2: If the original image of the explosion fireball is an RGB image, convert the original image of the explosion fireball into a grayscale image, and then execute step 3; if the original image of the explosion fireball is a grayscale image, directly execute step 3;

[0011] Step 3: Segment the grayscale image to obtain a segmented binary image;

[0012] Step 4: De-noising the binary image obtained in step 3;

[0013] Step 5: Detect the edges of k sub-regions in the binary image obtained by denoising in Step 4 in the image coordinate system, and calculate the boundary coordinates of the k sub-regions;

[0014] Step 6: The boundary coordinates of the k sub-regions are recorded as S1=(S 11 , S 12 ,…,S 1n ), S2=(S 21 , S 22 ,…,S 2m ),…,Sk=(S k1 , S k2 ,…,S ki ), where n, m, ..., i are the number of boundary points of each sub-region, and are all integers greater than or equal to 3; the boundary coordinates of the k sub-regions are merged to construct a set of boundary points S = (S1, S2, ..., Sk) of the explosion fireball;

[0015] Step 7: Use the Graham scanning algorithm to extract the minimum circumscribed polygon connection points in the set S, connect all the connection points into a closed polygon, and obtain the outline of the explosion fireball.

[0016] Furthermore, step five is specifically as follows:

[0017] In the image coordinate system, a high-pass filter algorithm is used to detect the edges of k sub-regions in the binary image denoised in step 4, and the boundary coordinates of all k sub-regions are calculated based on the high-pass filter convolution kernel ken.

[0018] Furthermore, the high-pass filter convolution kernel ken is:

[0019]

[0020] Furthermore, step four specifically includes: performing denoising processing on the binary image obtained in step three by sequentially performing erosion operation and dilation operation.

[0021] Furthermore, in step 4:

[0022] The calculation window sizes of the erosion operation and the dilation operation are consistent;

[0023] The calculation windows of the erosion operation and the dilation operation are both 5×5.

[0024] Furthermore, in step three, a global threshold method is used to segment the grayscale image to obtain a segmented binary image.

[0025] Furthermore, step three is specifically as follows:

[0026] 3.1. The threshold thr is calculated by the following formula. The threshold thr is two-thirds of the difference between the maximum and minimum grayscale points in the grayscale image:

[0027] thr=(max(piexls)-min(piexls))*2 / 3

[0028] Among them, max(piexls) is the grayscale value of the maximum grayscale point in the grayscale image, and min(piexls) is the grayscale value of the minimum grayscale point in the grayscale image;

[0029] 3.2. Set the grayscale values of pixels in the grayscale image whose grayscale values are greater than or equal to the threshold thr to 1, and set the grayscale values of pixels whose grayscale values are less than the threshold thr to 0, as shown in the following formula to obtain the segmented binary image:

[0030]

[0031] Among them, binaryimg is the pixel grayscale value of each point in the grayscale image in the binary image, and piexl is the grayscale of each point in the grayscale image.

[0032] Furthermore, in step 2, if the original image of the explosion fireball is an RGB image, the average value method is used to convert the original image of the explosion fireball into a grayscale image according to the following formula:

[0033] gray=(R+G+B) / 3

[0034] Among them, gray, R, G, and B represent the grayscale values of the output grayscale image and the pixel grayscale values of the red, green, and blue channels of the original image of the explosion fireball, respectively.

[0035] Furthermore, step seven specifically includes the following steps:

[0036] 7.1. Get the point with the smallest ordinate y in the set S, and get the lowest point in the set S, denoted as P0;

[0037] 7.2. Calculate the cosine of the angle between the line connecting the remaining points and P0 and the X-axis, and sort the remaining points from large to small according to the cosine of the angle between the line connecting the remaining points and P0 and the X-axis. The sorted points are recorded as P1, P2, P3, ..., P N , and push P0 and P1 into the stack in sequence, where N is the number of all points in the set S except P0, and N is an integer greater than or equal to 3;

[0038] 7.3. Select points in the order of set S. Calculate the vector between the first point below the top of the stack and the top of the stack, and the vector between the top of the stack and the previous point. Determine whether the directions of the two vectors change counterclockwise. If so, push the current point onto the stack. Otherwise, push the top of the stack and the current point onto the stack. Then select the next point in the order of set S.

[0039] 7.4. Use the same method as step 7.3 to traverse all points in the set S in the order in which they appear.

[0040] 7.5. Connect the points in the stack in sequence into closed lines in the image coordinate system to obtain the minimum circumscribed polygon of the point set S and the outline of the explosion fireball.

[0041] Compared with the prior art, the present invention has the following beneficial technical effects:

[0042] 1. The fireball contour detection method provided by the present invention does not require the fireball to be a complete connected area. Instead, it uses a set of boundary points of its sub-areas to characterize the fireball contour. It also provides an accurate contour calculation method, which can obtain the complete contour of the fireball. The obtained fireball contour is accurate, and the image processing efficiency is high. This method can be applied to the dynamic analysis of fireballs in videos.

[0043] 2. The explosion fireball contour detection method provided by the present invention uses a global threshold method to segment the grayscale image and perform denoising, which can effectively reduce the influence of background interference, flying flames and smoke on the extraction of the explosion fireball area;

[0044] 3. The calculation window sizes of the erosion operation and the dilation operation in the present invention are consistent, which can ensure that the image of the explosion fireball sub-region after denoising remains basically unchanged. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is an operational flow chart of an embodiment of a method for detecting an explosion fireball contour based on a convex hull algorithm according to the present invention;

[0046] Figure 2 The original image of the explosion fireball obtained in the embodiment of the present invention;

[0047] Figure 3 The binary image after noise removal obtained in step 4 in the embodiment of the present invention;

[0048] Figure 4 This is a schematic diagram of the edges of the k sub-regions obtained in step five of the embodiment of the present invention;

[0049] Figure 5 This is a schematic diagram of the k sub-region edge point sets obtained in step five in an embodiment of the present invention;

[0050] Figure 6 Schematic diagram of the convex hull algorithm of step seven in an embodiment of the present invention;

[0051] Figure 7 The figure is a superposition of the explosion fireball outline and the original image of the explosion fireball obtained in an embodiment of the present invention;

[0052] Figures 8-11 These are respectively superimposed images of explosion fireball contours of different shapes extracted using the method of the present invention and the original image of the explosion fireball. DETAILED DESCRIPTION

[0053] In order to make the purpose, advantages and features of the present invention more clear, the following further describes in detail the explosion fireball contour detection method based on the convex hull algorithm proposed by the present invention in conjunction with the drawings and specific embodiments.

[0054] like Figure 1As shown, a method for detecting the contour of an explosion fireball based on a convex hull algorithm includes the following steps:

[0055] Step 1: Get Figure 2 The original image of the explosion fireball shown includes k sub-areas, where k is an integer greater than or equal to 1.

[0056] The fireball image can be captured by a high-speed camera, drone, or standard camera, or it can be a video clip containing the fireball. In step 1, the original fireball image must be an RGB or grayscale image.

[0057] Step 2: The explosion fireball image obtained in step 1 is an RGB image. Use the average method to convert the original explosion fireball image into a grayscale image according to the following formula:

[0058] gray=(R+G+B) / 3

[0059] Among them, gray represents the grayscale value of the output grayscale image, and R, G, and B are the pixel grayscale values of the red, green, and blue channels of the original image of the explosion fireball, respectively.

[0060] In other embodiments, if the acquired explosion fireball image is a grayscale image, step three is directly executed.

[0061] Step 3: Use the global threshold method to perform threshold segmentation on the grayscale image to obtain the segmented binary image

[0062] 3.1. The threshold thr is calculated by the following formula. The threshold thr is two-thirds of the difference between the maximum and minimum grayscale points in the grayscale image:

[0063] thr=(max(piexls)-min(piexls))*2 / 3

[0064] Among them, max(piexls) is the grayscale value of the maximum grayscale point in the grayscale image, and min(piexls) is the grayscale value of the minimum grayscale point in the grayscale image;

[0065] 3.2. Set the grayscale values of pixels in the grayscale image whose grayscale values are greater than or equal to the threshold thr to 1, and set the grayscale values of pixels whose grayscale values are less than the threshold thr to 0, as shown in the following formula to obtain the segmented binary image:

[0066]

[0067] Among them, binaryimg is the pixel grayscale value of each point in the grayscale image in the binary image, and piexl is the grayscale of each point in the grayscale image.

[0068] Since the explosion fireball scene is usually relatively simple and the brightness of the explosion fireball is significantly higher than the background, the threshold segmentation method adopts the global threshold method. The grayscale image segmentation method is not limited to the global threshold method. In other embodiments, other segmentation methods in the field of image processing can be used.

[0069] Step 4: Apply corrosion and dilation operations to the binary image obtained in step 3 to remove the noise of the binary image and obtain the following: Figure 3 The binary image after denoising is shown.

[0070] Since the binary image generated in step 3 has significant noise, morphological operations are used to effectively remove this noise. To preserve the fireball's outline size as much as possible, the calculation window size for the erosion and dilation operations is the same, 5×5.

[0071] Step 5: Detect using high-pass filtering algorithm in the image coordinate system Figure 3 The edges of each sub-region in the , according to the following high-pass filter convolution kernel ken, calculate the boundary coordinates of all sub-regions:

[0072]

[0073] The edges of the k sub-regions extracted are as follows Figure 4 shown.

[0074] Because explosions are often accompanied by smoke and dust, the binary image of the target area of the explosion fireball is usually composed of several disconnected subregions. Using segmentation and denoising algorithms, it is difficult to grow the target area of the explosion fireball into a complete region. Therefore, step five uses a high-pass filter algorithm to detect the edges of k subregions in the binary image and calculates the boundary coordinates of the k subregions using the high-pass filter convolution kernel.

[0075] Step 6: The boundary coordinates of k non-connected sub-regions are recorded as S1=(S 11 , S 12 ,…,S 1n ), S2=(S 21 , S 22 ,…,S 2m ),…,Sk=(S k1 , S k2 ,…,S ki ), where n, m, ..., i are the number of boundary points of each sub-region, all of which are integers greater than or equal to 1. The boundary coordinates of all sub-regions are merged to construct a set of boundary points S = (S1, S2, ..., Sk) of the explosion fireball target region, as shown in Figure 5 shown.

[0076] Step 7: Use Graham scanning algorithm to extract the minimum circumscribed polygon of each point in set S. The algorithm diagram is as follows: Figure 6 As shown, connect all connection points into a closed polygon to obtain the outline of the explosion fireball. The specific steps are as follows:

[0077] 7.1. Get the point with the smallest ordinate y in the set S, and get the lowest point in the set S, denoted as P0;

[0078] 7.2. Calculate the cosine of the angle between the line connecting the remaining points and P0 and the X-axis, and sort the remaining points from large to small according to the cosine of the angle between the line connecting the remaining points and P0 and the X-axis. The sorted points are recorded as P1, P2, P3, ..., P N , and push P0 and P1 into the stack in sequence, where N is the number of all points in the set S except P0, and N is an integer greater than or equal to 3;

[0079] 7.3. Select points in the order of set S. Calculate the vector between the first point below the top of the stack and the top of the stack, and the vector between the top of the stack and the current point. Determine whether the directions of the two vectors change counterclockwise. If so, push the point in the set directly onto the stack. Otherwise, push the top of the stack, push the current point onto the stack, and then select the next point in the order of set S.

[0080] 7.4. Use the same method as step 7.3 to traverse all points in the set S in the order in which they appear.

[0081] 7.5. Connect the points in the stack into closed lines in the image coordinate system to obtain the minimum circumscribed polygon of the point set S, as shown in the following example: Figure 7 The silhouette of the exploding fireball is shown.

[0082] Among them, in step 7.3, taking P2 as an example, the calculation is as follows: calculate the two vectors between P0 and P1, and P1 and P2 and judge and Is it rotating counterclockwise? If so, push P2 directly into the stack; otherwise, push P1 out of the stack, then push P2 into the stack, and select the next point P3 according to the order in the set S.

[0083] Figures 8-11The following images show the overlay of the contours of explosion fireballs of different shapes extracted using the present invention and the original image of the explosion fireball. It can be seen that the contours of the explosion fireballs obtained using the method provided by the present invention are highly consistent with the original image, and the contour acquisition effect is good. The present invention solves the problem of difficulty in constructing a complete segmented image of the target area. The extracted contour information is accurate and the processing speed is fast. It can be applied to image-based extraction of parameters such as explosion fireball contours and video-based near-real-time fireball tracking.

[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present invention.

Claims

1. A method for detecting the contour of an explosion fireball based on a convex hull algorithm, characterized in that: The following steps are involved: Step 1: Obtain an original image of an explosion fireball including k sub-areas, where k is an integer greater than or equal to 1, and the original image of the explosion fireball is an RGB image or a grayscale image; Step 2: If the original image of the explosion fireball is an RGB image, convert the original image of the explosion fireball into a grayscale image, and then execute step 3; if the original image of the explosion fireball is a grayscale image, directly execute step 3; Step 3: Use the global threshold method to segment the grayscale image to obtain a segmented binary image; specifically: 3.

1. The threshold thr is calculated by the following formula. The threshold thr is two-thirds of the difference between the maximum and minimum grayscale points in the grayscale image: thr=(max(piexls)-min(piexls))*2 / 3 Among them, max(piexls) is the grayscale value of the maximum grayscale point in the grayscale image, and min(piexls) is the grayscale value of the minimum grayscale point in the grayscale image; 3.

2. Set the grayscale values of pixels in the grayscale image whose grayscale values are greater than or equal to the threshold thr to 1, and set the grayscale values of pixels whose grayscale values are less than the threshold thr to 0, as shown in the following formula to obtain the segmented binary image: Among them, binaryimg is the pixel grayscale value of each point in the grayscale image in the binary image, and piexl is the grayscale of each point in the grayscale image; Step 4: De-noising the binary image obtained in step 3; Step 5: Detect the edges of k sub-regions in the binary image obtained by denoising in Step 4 in the image coordinate system, and calculate the boundary coordinates of the k sub-regions; Step 6: The boundary coordinates of the k sub-regions are recorded as S1=(S 11 , S 12 ,…,S 1n ), S2=(S 21 , S 22 ,…,S 2m ),…,Sk=(S k1 , S k2 ,…,S ki ), where n, m, ..., i are the number of boundary points of each sub-region, and are all integers greater than or equal to 3; the boundary coordinates of the k sub-regions are merged to construct a set of boundary points S = (S1, S2, ..., Sk) of the explosion fireball; Step 7: Use the Graham scanning algorithm to extract the minimum circumscribed polygon connection points in the set S, connect all the connection points into a closed polygon, and obtain the outline of the explosion fireball.

2. The method for detecting the contour of an explosion fireball based on a convex hull algorithm according to claim 1, wherein: Step 5 is as follows: In the image coordinate system, a high-pass filter algorithm is used to detect the edges of k sub-regions in the binary image denoised in step 4, and the boundary coordinates of all k sub-regions are calculated based on the high-pass filter convolution kernel ken.

3. The method for detecting the contour of an explosion fireball based on a convex hull algorithm according to claim 2, wherein: The high-pass filter convolution kernel ken is:

4. The method for detecting the contour of an explosion fireball based on a convex hull algorithm according to claim 3, wherein: Step 4 is specifically as follows: the binary image obtained in step 3 is subjected to denoising processing by sequentially performing corrosion operation and dilation operation.

5. The method for detecting the contour of an explosion fireball based on a convex hull algorithm according to claim 4, wherein: In step 4: The calculation window sizes of the erosion operation and the dilation operation are consistent; The calculation windows of the erosion operation and the dilation operation are both 5×5.

6. The method for detecting the contour of an explosion fireball based on a convex hull algorithm according to claim 5, wherein: In step 2, if the original image of the explosion fireball is an RGB image, the average value method is used to convert the original image of the explosion fireball into a grayscale image according to the following formula: gray=(R+G+B) / 3 Among them, gray, R, G, and B represent the grayscale values of the output grayscale image and the pixel grayscale values of the red, green, and blue channels of the original image of the explosion fireball, respectively.

7. The method for detecting the contour of an explosion fireball based on a convex hull algorithm according to any one of claims 1 to 6, characterized in that: Step seven specifically includes the following steps: 7.

1. Get the point with the smallest ordinate y in the set S, and get the lowest point in the set S, denoted as P0; 7.

2. Calculate the cosine of the angle between the line connecting the remaining points and P0 and the X-axis, and sort the remaining points from large to small according to the cosine of the angle between the line connecting the remaining points and P0 and the X-axis. The sorted points are recorded as P1, P2, P3, ..., P N , and push P0 and P1 into the stack in sequence, where N is the number of all points in the set S except P0, and N is an integer greater than or equal to 3; 7.

3. Select points in the order of set S. Calculate the vector between the first point below the top of the stack and the top of the stack, and the vector between the top of the stack and the current point. Determine whether the directions of the two vectors change counterclockwise. If so, push the current point onto the stack. Otherwise, push the top of the stack and the current point onto the stack. Then select the next point in the order of set S. 7.

4. Use the same method as step 7.3 to traverse all points in the set S in the order in which they appear. 7.

5. Connect the points in the stack in sequence into closed lines in the image coordinate system to obtain the minimum circumscribed polygon of the point set S and the outline of the explosion fireball.

Citation Information

Patent Citations

  • Optimal external ellipse extraction method for irregular small body navigation centroid

    CN109238268A