Forest fire scene multi-live-wire fusion parameter calculation method and device based on image skeleton algorithm
Through the forest fire field multi-fire line fusion parameter calculation method based on image skeleton algorithm, the problem of difficulty in quantifying the fire line fusion behavior in the existing technology is solved, and high-precision fire field area extraction and fire line fusion parameter calculation are realized, adapting to complex terrain conditions, and supporting fire field dynamic monitoring and early warning.
Patent Information
- Application Number
- CN202510362312.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-11
Smart Images

Figure CN120298928A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of forest fire monitoring and early warning, and particularly to a method and device for calculating multi-fireline fusion parameters of a forest fire scene based on an image skeleton algorithm. Background Art
[0002] Forest fires are extremely destructive natural disasters with a fast spreading speed and a wide range of hazards, posing a serious threat to the ecological environment, social economy, and the safety of human life and property. Real-time monitoring and accurate analysis of the dynamic behavior of the fire scene are the keys to improving the efficiency of fire emergency response.
[0003] In the prior art, after obtaining the fire scene images by means of satellite remote sensing, unmanned aerial vehicle monitoring, etc., the boundary changes of the fire scene are mostly analyzed through thermal infrared or visible light imaging. However, in the face of the complex fusion behaviors (such as multiple firelines converging, intersecting, or separating simultaneously) during the propagation process, traditional technologies are difficult to efficiently and accurately quantify their geometric characteristics and fusion speed, especially under dynamic changes and complex terrain conditions. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method and device for calculating multi-fireline fusion parameters of a forest fire scene based on an image skeleton algorithm. By extracting the fireline skeletons and combining geometric feature analysis with time evolution calculation, the included angle and fusion speed of multiple fireline fusions are accurately calculated, providing key data support for the behavior modeling and early warning of complex fire scenes.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions: A method for calculating multi-fireline fusion parameters of a forest fire scene based on an image skeleton algorithm, comprising the following steps:
[0006] Step 1: Obtain a real-time image sequence of the forest fire scene through an image acquisition device arranged in the forest, and then perform image preprocessing;
[0007] Step 2: Extract the fireline skeletons;
[0008] Step 3: Calculate the multi-fireline fusion points and included angles;
[0009] Step 4: Calculate the multi-fireline fusion speed;
[0010] Step 5: Output and visualize the results.
[0011] In a preferred embodiment, in Step 1, the collected images are segmented by a pre-trained CNN model, the fire and non-fire pixels are classified, and then binary processing is performed according to the classification results to remove noise interference and enhance the image contrast, preparing for subsequent skeleton extraction.
[0012] In a preferred embodiment, step 2 specifically includes:
[0013] Step 21: Segment the fire scene image through a pre-trained CNN model, classify the fire and non-fire pixels, and label them.
[0014] Step 22: Binarize the image according to the segmentation result, with the fire area being 1 and the non-fire area being 0.
[0015] Step 23: Extract the outer contour of the target area from the binarized image; identify the places where the pixel values change through an edge detection algorithm, and thus obtain the boundary of the fire scene area in the image.
[0016] Step 24: Convert the target area in the binarized image into a slender single-pixel-wide skeleton structure.
[0017] Step 25: Identify the main structural path representing the target area in the skeleton image and optimize the path.
[0018] In a preferred embodiment, step 24 specifically includes:
[0019] Step 241: Input the binarized image; the input image is denoted as I(x, y), where x, y ∈ {0, 1}, and the output is initialized as S(x, y) = I(x, y).
[0020] Step 242: Iterative thinning; that is, gradually remove the outer layer pixels of the target area to thin it into a single-pixel-wide skeleton; the thinning algorithm checks the neighborhood of each target pixel to determine whether it can be removed; the removed pixels are boundary pixels; each iteration strips off one layer of pixels, gradually reducing the width of the target area until it reaches a stable state of single-pixel width.
[0021] Step 243: Convergence detection to generate the skeleton; Convergence condition: After each iteration, compare the current image S k (x, y) with the previous image S k-1 (x, y). If S k (x, y) = S k-1 (x, y), then it converges, and S k (x, y) is the final skeleton image.
[0022] In a preferred embodiment, step 25 specifically includes:
[0023] Step 251: Identify the skeleton endpoints: Construct a 3×3 convolution kernel Kernel with a central value of 10 and surrounding eight-neighborhood values of 1; Through the Convolve convolution operation, convert the skeleton image into an integer type for processing and calculate the neighborhood sum of each pixel; The judgment condition for an endpoint is that the neighborhood sum is 11, that is, the central pixel value is 10, and there is exactly one neighbor value of 1, and at the same time, this pixel must belong to the skeleton itself; Extract the endpoint coordinates and convert them into coordinates;
[0024] Step 252: Calculate the distance from the skeleton endpoints to the boundary: Extract all the skeleton point coordinates in the skeleton image; Input the skeleton point and boundary point coordinates, and calculate the Euclidean distance from each skeleton point to the nearest boundary point; For each skeleton point, calculate its distance to all boundary points and take the minimum value, and construct a distance array with the minimum value of all skeleton points to the boundary points; Map the calculated distance back to the skeleton image to generate a distance map distance_map, where the initial value of non-skeleton points is infinity, and the distance of skeleton points corresponds to the calculation result;
[0025] Step 253: Limit the main path of the skeleton within the binary image through the logical operation Skeleton[~binary_image]=false;
[0026] Step 254: Based on the identified endpoints and calculated distances, traverse the list of skeleton endpoint coordinates, calculate the Euclidean distance for each pair of endpoints, record the maximum distance and the corresponding endpoints Best_pair, and if there are valid endpoints, use them as the starting point Start and ending point End of the main path;
[0027] Step 255: Propose a path extraction method based on dynamic cost for generating the main path from the starting point to the ending point.
[0028] In a preferred embodiment, the step 255 specifically includes:
[0029] Step 2551: Initialize the path list Path and the current point Current_point, with the initial value being the starting point Start;
[0030] Step 2552: In each iteration, construct a cost array cost_array with the initial value being the flipped image of the skeleton;
[0031] Step 2553: According to the distance map distance_map, set the cost of the skeleton points close to the boundary to be high to avoid the path passing through the boundary;
[0032] Step 2554: Use the path planning algorithm route_through_array to calculate the sub-path from the current point to the ending point; Add the sub-path to the total path;
[0033] Step 2555: If the distance between the current point and the boundary is less than the threshold, remove the point and re-plan the path;
[0034] Step 2556: Finally, obtain the backbone main path.
[0035] In a preferred embodiment, step 3 specifically includes:
[0036] Step 31: Smooth the path: Convert the original backbone path into a smooth continuous curve to eliminate noise, jagged effects, and local irregularities; Use the interpolation technique based on B-spline to smooth the path. By performing parametric spline fitting on the set of two-dimensional coordinates (x, y) of the path, generate a parametric smooth curve; Control the smoothness of the generated curve and ensure that the smooth path has evenly distributed sampling points by controlling the smoothing factor and the number of output points;
[0037] is a set of two-dimensional coordinate points, N is the number of points on the smooth path, and the spline interpolation generates a continuous function S(t) = (x(t), y(t)), t ∈ [0, 1], where t is a parametric variable, and the points on the smoothed path are obtained from S(t k ) at evenly sampled points t k ;
[0038] Step 32: Detection of local maximum curvature: Based on the smoothed path, by analyzing the local geometric property curvature of the curve, identify the points of local maximum curvature and define them as inflection points, thereby capturing the key turning positions of the path; Use the curvature calculation method in differential geometry to calculate the curvature value of each point on the smoothed path and detect the curvature through threshold analysis;
[0039] For the path point coordinates t(x, y):
[0040]
[0041] k(t) represents the local bending degree of the curve at t. When the curvature of a certain point is detected as the local maximum, this point is considered as the inflection point I;
[0042] Step 33: Path connection: Based on the starting point, the detected inflection points, and the ending point, generate a simplified and ordered path, connect all key points, and form the final main path representation for subsequent angle calculation or visualization; Linearly interpolate to connect the starting point, inflection points, and ending point in sequence;
[0043] Step 34: Angle calculation: For each inflection point I, find its previous inflection point P pre and the next inflection point P next in the path connection index, construct vectors and Calculate the included angle through the geometric analysis algorithm: where θ ∈ [0, 180], and are the direction vectors of adjacent live wires respectively.
[0044] In a preferred embodiment, step 4 specifically includes:
[0045] Step 41: Based on multi-frame time-series images, track the change in the position of the fusion point of the live wires;
[0046] Step 43: Use the frame difference method to calculate the movement speed of multiple live wires at the fusion point. The formula is as follows: where d is the moving distance of the fusion point between two frames, and Δt is the frame interval time.
[0047] In a preferred embodiment, step 5 specifically includes: outputting the included angle and speed data of the multi-live wire fusion; dynamically displaying the skeletonization result and its fusion characteristics of the fire scene live wire through a visualization tool.
[0048] The present invention provides a device for calculating multi-live wire fusion parameters in a forest fire scene based on an image skeleton algorithm. When running the method for calculating multi-live wire fusion parameters in a forest fire scene based on an image skeleton algorithm, it further includes a visualization device.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] 1) High-precision fire scene area extraction: Through the trained convolutional neural network (CNN) model for image segmentation, it can effectively identify the characteristic differences between the fire and non-fire areas, accurately extract the fire scene area, and at the same time remove the interference of complex backgrounds such as smoke and trees to ensure the accuracy of subsequent analysis.
[0051] 2) Efficient skeletonization processing: Using the morphological skeletonization algorithm combined with pruning technology, quickly extract the main skeleton structure consistent with the fire scene contour, remove redundant branches, and retain key morphological information, providing reliable basic data for calculating the live wire fusion parameters.
[0052] 3) Precise quantification of fusion parameters: By analyzing the topological structure and geometric features (such as coordinates, curvature, direction vectors) of the fusion point, and combining the vector included angle formula to calculate the fusion included angle, it can accurately quantify the characteristics of the live wire intersection, providing a scientific basis for evaluating the dynamic evolution of the fire scene.
[0053] 4) Dynamic tracking and speed calculation: Based on the time-series analysis of multi-frame images, continuously track the moving trajectory of the fusion point, and calculate the fusion speed of multiple live wires through the position change and time interval, realizing real-time monitoring and dynamic analysis of the fire scene spreading process.
[0054] 5) Adaptive Image Acquisition: By means of equipment such as thermal imagers or infrared cameras carried by drones, images of the fire scene are collected from multiple angles with high flexibility, adapting to complex terrains and environmental conditions, ensuring the comprehensiveness and real-time nature of the data, and providing strong support for the application of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 Schematic diagram of the original image;
[0056] Figure 2 Classification result diagram of the CNN model of the preferred embodiment of the present invention;
[0057] Figure 3 Schematic diagram of the binarization result of the preferred embodiment of the present invention;
[0058] Figure 4 Schematic diagram of the binarized image skeletonization of the preferred embodiment of the present invention;
[0059] Figure 5 Schematic diagram of the main path of the skeleton of the preferred embodiment of the present invention;
[0060] Figure 6 Schematic diagram of the B-spline smoothed main path of the preferred embodiment of the present invention;
[0061] Figure 7 Schematic diagram of the local maximum curvature points of the preferred embodiment of the present invention;
[0062] Figure 8 Schematic diagram of the path connection of the preferred embodiment of the present invention;
[0063] Figure 9 Schematic diagram of the calculation of the fire line fusion angle of the preferred embodiment of the present invention;
[0064] Figure 10 Schematic diagram of the calculation of the fire line fusion speed of the preferred embodiment of the present invention;
[0065] Figure 11 System flow chart of the preferred embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0066] The present invention will be further described below in conjunction with the drawings and embodiments.
[0067] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.
[0068] Note that the terms used here are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0069] A method and device for calculating multi-fireline fusion parameters based on an image skeleton algorithm, referring to Figures 1-11 , the method includes the following steps:
[0070] 1. Image preprocessing
[0071] Obtain a real-time image sequence of the forest fire scene through various means such as high-definition cameras arranged in the forest and camera devices carried by drones.
[0072] Segment the collected images through a pre-trained CNN model, classify the fire and non-fire pixels, and then perform binary processing according to the classification results to remove noise interference and enhance the image contrast, preparing for subsequent skeleton extraction.
[0073] 2. Fireline skeleton extraction
[0074] Process the binary image using a morphology-based skeletonization algorithm; extract the skeleton lines of the fire scene boundary to form the geometric central axes of multiple firelines.
[0075] Apply the morphological thinning algorithm. In the analysis of the fire scene image, a series of image processing steps can effectively extract the key features of the fire area. First, classify the fire and non-fire pixels in the fire scene image through a pre-trained CNN model and label them respectively. Then, convert the original image into a binary image containing only the fire area and the background according to the model classification results, which can simplify the image and highlight the fire area. Next, identify the external contour of the target area in the image to provide accurate geometric information for subsequent analysis. Subsequently, use the skeletonization algorithm to convert the fire area in the binary image into a slender skeleton structure, retaining the core shape of the area and simplifying the image, providing a convenient path for further analysis. Finally, by identifying the skeleton endpoints and extracting the main path, ensure that the path is smooth and accurate, avoiding interference from irrelevant parts. This series of processing steps helps to extract the main direction and morphological features of the fire spread in the fire scene image, thus providing reliable data support for fire trend prediction and fireline analysis. The steps involved are:
[0076] Segment the original fire scene image: Segment the fire scene image through a pre-trained CNN model, classify the fire and non-fire pixels and label them.
[0077] Binarize the fire scene image: Binarize the image according to the segmentation result, where the fire area is 1 and the non-fire area is 0. The purpose is to highlight the difference between the fire scene area (such as flames or smoke) and the background, facilitating subsequent analysis. This processing method helps remove noise and extract the outline and features of the fire area.
[0078] Obtain the boundary of the binarized image: Extract the outer contour of the target area from the binarized image. By using an edge detection algorithm, the places where pixel values change can be identified, and thus the boundary of the fire scene area in the image can be obtained.
[0079] The edge detection algorithm used in the present invention is different from the conventional gradient-based edge detection. Instead, it is a contour-based method, which is convenient for directly extracting the boundary of the target area from the binarized image. Based on the Marching Square algorithm, the image is divided into several 2×2 grids, and the contour line is determined to pass through which position according to the values of the four grids.
[0080] A=0 B=0 C=0 D=1
[0081] As shown in the example table, if A = 0, B = 0, C = 0, D = 1, then the contour line enters from CD and exits from BD. The specific position is calculated by linear interpolation. According to the set level value (here it is 0.5), assuming the coordinates of point A are (x, y), then the penetration point of the contour line is (x + 1, y + 0.5), and the exit point is (x + 0.5, y + 1).
[0082] This step helps determine the shape and scope of the fire area, providing accurate geometric information for subsequent analysis and processing (such as path extraction, fire trend prediction, etc.). The data after boundary extraction is usually used for further image segmentation, feature extraction, and region recognition.
[0083] Skeletonize the binarized image: Convert the target area in the binarized image into a slender single-pixel-wide skeleton structure. First, perform a skeletonization operation on the input binarized image to extract the centerline structure of the target area in the image. By calling the skeletonization algorithm (Skeletonize), the binarized image is converted into a skeleton image, aiming to retain the topological structure of the binarized area while simplifying it into a single-pixel-wide line representation.
[0084] The implementation of the Skeletonize function is usually based on the thinning algorithm, which is a classic method for morphological skeletonization. The thinning algorithm iteratively removes the outer layer of pixels in the target region, gradually "thinning" the region into a one-pixel-wide skeleton while avoiding breaking the connectivity of the region. The skeleton can be regarded as the set of maximum points of the shortest distances from all pixels in the target region to the boundary. For each pixel in the target region, the skeleton points are those that are farthest from the boundary. The thinning algorithm makes the remaining pixels gradually approach the medial axis by continuously removing boundary pixels. This set is usually called the "Medial Axis Transform" (MAT), and the main steps are as follows:
[0085] 1. Input binary image: The first step of skeletonization is to prepare the input data, which is a binary image. A binary image means that each pixel in the image takes only two possible values, usually represented by 0 and 1. In this representation, 0 usually corresponds to the background region (e.g., black), and 1 corresponds to the target region (e.g., white). The input image can be denoted as I(x, y), where x, y ∈ {0, 1}, and the output is initialized as S(x, y) = I(x, y).
[0086] 2. Iterative thinning: The core step of skeletonization is iterative thinning, that is, by gradually removing the outer layer of pixels in the target region, "thinning" it into a single-pixel-wide skeleton. The Zhang-Suen Thinning Algorithm is often used in the Skeletonize function. The thinning algorithm checks the neighborhood of each target pixel to determine whether it can be removed. The removed pixels are usually boundary pixels, and removing them will not affect the topological structure of the target region. Each iteration peels off one layer of pixels, gradually reducing the width of the target region until it reaches a stable state of single-pixel width. The Zhang's algorithm divides each iteration into two sub-steps (sub-iterations) and executes them alternately to ensure the uniformity and connectivity of the thinning process.
[0087] (1) Neighborhood check: For each target pixel P(x, y), that is, S(x, y) = 1, check its eight-connected region, and the eight-connected region is as follows:
[0088] P2 P3 P4 P1 P P5 P8 P7 P6
[0089] (2) Removal conditions for the first sub-iteration: Check the following conditions
[0090] 1) Check the number of neighboring target pixels: N(P) = ∑ i,j∈N(P) S(i, j), and it is required that 2 ≤ N(P) ≤ 6. N(P) is the pixel value of 1 in the eight-neighborhood;
[0091] 2 ≤ N(P) ensures that the pixel is not an isolated point, and N(P) ≤ 6 ensures that the pixel is not an interior point.
[0092] 2) Check the transition count T(P): T(P) is the number of times of switching from 0 to 1 in the eight-neighborhood. Traverse the eight-neighborhood (P1 - P2 - P3 ---- P8) clockwise, and it is required that T(P) = 1.
[0093] 3) Check the neighborhood combination condition: P2·P4·P6 = 0 or P4·P6·P8 = 0, that is, at least one neighbor is the background.
[0094] If all the above conditions are met, it is marked as removable. After this scan, the marked pixels are uniformly set to 0.
[0095] (3) The second sub-iteration removal condition: Check the following conditions
[0096] 1) and 2) are the same as the first sub-iteration removal conditions;
[0097] 3) P2·P4·P8 = 0 or P2·P6·P8 = 0. The pixels that meet the conditions will be removed.
[0098] In each iteration, the first and second sub-iterations are executed to remove the pixels that meet the conditions; update S(x, y) to the current result and continue the next iteration; in each iteration, one layer of boundary pixels is stripped, and the width of the target area gradually decreases.
[0099] The k-th iteration: S k (x, y) = S k-1 (x, y) - R k (x, y), R k (x, y) is the set of pixels removed in the k-th iteration.
[0100] 3. Convergence detection to generate the skeleton
[0101] Convergence condition: After each iteration (including the first and second sub-iterations), compare the current image S k (x, y) and the previous image S k-1 (x, y). If S k (x, y) = S k-1 (x, y), then it converges, and S k (x, y) is the final skeleton image.
[0102] Extract the main path of the skeleton and optimize the skeleton: Identify the main structural path representing the target area from the skeleton image and optimize the path. The steps are as follows:
[0103] 1. Identify the endpoints of the skeleton: Construct a 3×3 convolutional kernel Kernel with a central value of 10 and the values of its eight neighboring regions being 1. Through the Convolve convolution operation, convert the skeleton image into an integer form for processing and calculate the neighborhood sum of each pixel. The judgment condition for an endpoint is that the neighborhood sum is 11, that is, the central pixel value is 10, and there is exactly one neighbor value of 1. At the same time, this pixel must belong to the skeleton itself. Extract the endpoint coordinates and convert them into coordinates. The significance of this step is that the distance map provides key information for subsequent path optimization. By quantifying the proximity of the skeleton points to the boundary, potential risk points close to the boundary can be identified and avoided in path planning. In addition, this method uses vectorized calculation, avoiding point-by-point looping and improving the processing efficiency of large-scale images.
[0104] 2. Calculate the distance from the endpoints of the skeleton to the boundary: To further analyze the geometric characteristics of the skeleton, the present invention proposes a method for calculating the distance from the skeleton points to the boundary of the binary region.
[0105] Extract all the skeleton point coordinates in the skeleton image; input the skeleton point and boundary point coordinates, and calculate the Euclidean distance from each skeleton point to the nearest boundary point.
[0106] For each skeleton point, calculate its distance to all boundary points, take the minimum value, and construct a distance array with the minimum values of all skeleton points to the boundary points.
[0107] Map the calculated distances back to the skeleton image to generate a distance map distance_map, where the initial value of non-skeleton points is infinity, and the distances of skeleton points correspond to the calculation results.
[0108] 3. Limit the main path of the skeleton within the binary image through the logical operation Skeleton[~binary_image]=false.
[0109] 4. Based on the identification of endpoints and the calculation of distances, the present invention further designs a method for finding the two endpoints on the skeleton that are farthest apart: Traverse the list of skeleton endpoint coordinates, calculate the Euclidean distance for each pair of endpoints, record the maximum distance and the corresponding endpoints Best_pair. If there are valid endpoints, use them as the starting point Start and the ending point End of the main path.
[0110] 5. Finally, the present invention proposes a path extraction method based on dynamic cost for generating the main path from the starting point to the ending point.
[0111] (1) Initialize the path list Path and the current point Current_point, with the initial value being the starting point
[0112] Start.
[0113] (2) In each iteration, construct a cost array cost_array with the initial value being the flipped image of the skeleton.
[0114] (3) According to the distance map distance_map, set the cost of the skeleton points near the boundary to be high to avoid the path passing through the boundary.
[0115] (4) Use the path planning algorithm route_through_array to calculate the sub-path from the current point to the end point. Add the sub-path to the total path.
[0116] (5) If the distance between the current point and the boundary is less than the threshold, remove the point and re-plan the path.
[0117] (6) Finally, obtain the main path of the skeleton.
[0118] 3. Multi-firewire fusion points and angle calculation
[0119] Since the obtained skeleton points are dense, the main path of the skeleton is irregular and not smooth, so further smooth processing is performed on the skeleton to extract the key nodes of each firewire:
[0120] (1) Smooth the path: Convert the original skeleton path into a smooth continuous curve to eliminate noise, sawtooth effects, and local irregularities. Use the interpolation technique based on B-spline to smooth the path. By performing parametric spline fitting on the set of two-dimensional coordinates (x, y) of the path, a parametric smooth curve is generated. Control the smoothness of the generated curve and ensure that the smooth path has uniformly distributed sampling points by controlling the smoothing factor and the number of output points.
[0121] is a set of two-dimensional coordinate points, N is the number of points on the smooth path, and the spline interpolation generates a continuous function S(t) = (x(t), y(t)), t ∈ [0, 1], where t is the parametric variable, and the points on the smoothed path are obtained from S(t k ) at uniformly sampled points t k obtained above.
[0122] (2) Detection of local maximum curvature: Based on the smoothed path, by analyzing the local geometric property curvature of the curve, identify the points of local maximum curvature and define them as inflection points, thereby capturing the key turning positions of the path; use the curvature calculation method in differential geometry to calculate the curvature value of each point on the smoothed path and detect the curvature through threshold analysis.
[0123] For the path point coordinates t(x, y):
[0124]
[0125] k(t) represents the local curvature of the curve at t. When the curvature at a certain point is detected as the local maximum, this point is considered as the inflection point I.
[0126] (3) Path connection: Based on the starting point, the detected inflection points, and the ending point, generate a simplified and ordered path to connect all key points, forming the final representation of the main path for subsequent angle calculation or visualization. Linear interpolation is used to connect the starting point, inflection points, and ending point in sequence.
[0127] (4) Angle calculation: For each inflection point I, find its previous inflection point P pre (or the starting point) and the next inflection point P next (or the ending point) in the path connection index, and construct vectors and Through the geometric analysis algorithm, calculate the angle: where θ ∈ [0, 180], and are the direction vectors of adjacent fire lines respectively.
[0128] 4. Calculation of multi-fire line fusion speed
[0129] Based on multi-frame sequential images, track the position change of the fusion points of the fire lines;
[0130] Use the frame difference method to calculate the movement speed of the multi-fire lines at the fusion points. The formula is as follows: where d is the moving distance of the fusion point between two frames, and Δt is the frame interval time.
[0131] 5. Result output and visualization
[0132] Output the angle and speed data of the multi-fire line fusion;
[0133] Through the visualization tool, dynamically display the skeletonization result of the fire line in the fire scene and its fusion characteristics.
[0134] Through a series of image processing and analysis techniques, the method of the present invention realizes the efficient calculation of the fusion parameters of the fire line in a forest fire scene. First, a thermal imager or an infrared camera and other devices are carried by a drone to collect real-time images of the fire scene, ensuring that the data comprehensively reflects the dynamics of the fire scene. Then, the trained convolutional neural network (CNN) model is used to segment the images, accurately extract the fire scene area and remove background interference. Subsequently, through binary processing, the fire scene and non-fire areas are clearly distinguished, and the morphological skeletonization algorithm is used to extract the fire scene skeleton. The pruning algorithm is combined to optimize the main skeleton structure to make it consistent with the fire scene contour. On this basis, the fire line fusion points are identified and geometric features are extracted, the fusion angle is calculated, and finally, the trajectory of the fusion points is tracked through multiple frames of images to calculate the fusion speed of multiple fire lines. Combining deep learning and image processing techniques, this method can accurately quantify the spatio-temporal characteristics of the fire spread, providing a scientific basis and technical support for forest fire monitoring and prevention and control.
Claims
1. A method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm, characterized in that, It includes the following steps: Step 1: Obtain a real-time image sequence of the forest fire scene through an image acquisition device arranged in the forest, and then perform image preprocessing; Step 2: Extract the fire line skeleton; Step 3: Calculate the multi-fire line fusion points and angles; Step 4: Calculate the multi-fire line fusion speed; Step 5: Output and visualize the results.
2. The method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm according to claim 1, wherein, In Step 1, the collected images are segmented by a pre-trained CNN model, the fire and non-fire pixels are classified, and then binaryzation processing is performed according to the classification results to remove noise interference and enhance the image contrast, preparing for subsequent skeleton extraction.
3. A method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm according to claim 1, characterized in that The specific steps of Step 2 include: Step 21: Segment the fire scene image by a pre-trained CNN model, classify the fire and non-fire pixels and label them; Step 22: Binaryze the image according to the segmentation result, with the fire area being 1 and the non-fire area being 0; Step 23: Extract the outer contour of the target area from the binary image; identify the places where the pixel values change through an edge detection algorithm to obtain the boundary of the fire scene area in the image; Step 24: Convert the target area in the binary image into a slender single-pixel-wide skeleton structure; Step 25: Identify the main structure paths representing the target area in the skeleton image and optimize the paths.
4. A method for calculating multi-fire line fusion parameters of a forest fire field based on an image skeleton algorithm according to claim 3, characterized in that, The specific steps of Step 24 include: Step 241: Input the binary image; the input image is denoted as I(x,y), x,y∈{0,1}, and the initial output is S(x,y)=I(x,y); Step 242: Iterative thinning; that is, gradually remove the outer layer pixels of the target area and thin it into a single-pixel-wide skeleton; the thinning algorithm checks the neighborhood of each target pixel to determine whether it can be removed; the removed pixels are boundary pixels; each iteration strips off one layer of pixels, gradually reducing the width of the target area until it reaches a stable state of single-pixel width; Step 243: Convergence detection to generate a skeleton; Convergence condition: After each iteration, compare the current image S k (x,y) with the previous image S k-1 (x,y). If S k (x,y) = S k-1 (x,y), then convergence is achieved, and S k (x,y) is the final skeleton image.
5. The method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm according to claim 3, characterized in that, The specific steps of Step 25 include: Step 251: Identify the skeleton endpoints: Construct a 3×3 convolution kernel Kernel with a central value of 10 and surrounding eight-neighborhood values of 1; through the Convolve convolution operation, convert the skeleton image into an integer for processing, calculate the neighborhood sum of each pixel; the judgment condition for the endpoints is that the neighborhood sum is 11, that is, the central value pixel is 10, and there is exactly one neighbor value of 1, and at the same time this pixel must belong to the skeleton itself; extract the endpoint coordinates and convert them into coordinates; Step 252: Calculate the distance from the skeleton endpoints to the boundary: Extract all the skeleton point coordinates in the skeleton image; input the skeleton point and boundary point coordinates, calculate the Euclidean distance from each skeleton point to the nearest boundary point; for each skeleton point, calculate its distance to all boundary points and take the minimum value, and construct a distance array with the minimum value of all skeleton points to boundary points; map the calculated distance back to the skeleton image to generate a distance map distance_map, where the initial value of non-skeleton points is infinity and the distance of skeleton points corresponds to the calculation result; Step 253: Limit the main skeleton path within the binary image through the logical operation Skeleton[~binary_image]=false; Step 254: Based on identifying endpoints and calculating distances, traverse the list of skeleton endpoint coordinates, calculate the Euclidean distance for each pair of endpoints, record the maximum distance and the corresponding endpoints Best_pair. If there are valid endpoints, use them as the starting point Start and the ending point End of the main path. Step 255: Propose a path extraction method based on dynamic cost to generate the main path from the starting point to the ending point.
6. The method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm according to claim 5, wherein The specific steps of Step 255 include: Step 2551: Initialize the path list Path and the current point Current_point, with the initial value being the starting point Start. Step 2552: In each iteration, construct the cost array cost_array, with the initial value being the flipped image of the skeleton. Step 2553: According to the distance map distance_map, set the cost of the skeleton points close to the boundary to be high to avoid the path passing through the boundary. Step 2554: Use the path planning algorithm route_through_array to calculate the sub-path from the current point to the ending point; add the sub-path to the total path. Step 2555: If the distance between the current point and the boundary is less than the threshold, remove the point and re-plan the path. Step 2556: Finally, obtain the main skeleton path.
7. A method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm according to claim 1, characterized in that, The specific steps of Step 3 include: Step 31: Smooth the path: Convert the original skeleton path into a smooth continuous curve to eliminate noise, jagged effects, and local irregularities; use the interpolation technique based on B-spline to smooth the path. By performing parametric spline fitting on the set of two-dimensional coordinates (x, y) of the path, generate a parametric smooth curve; control the smoothness of the generated curve and ensure that the smooth path has uniformly distributed sampling points by controlling the smoothing factor and the number of output points. is a two-dimensional coordinate point set, N is the number of smooth path points, and a continuous function S(t) = (x(t), y(t)) is generated by spline interpolation, where t ∈ [0, 1], t is a parameterized variable, and the smoothed path points are obtained from S(t k ) at uniformly sampled points t k ; Step 32: Detect the local maximum curvature points: Based on the smoothed path, by analyzing the local geometric property curvature of the curve, identify the points with local maximum curvature and define them as inflection points to capture the key turning positions of the path; use the curvature calculation method in differential geometry to calculate the curvature value for each point of the smoothed path and detect the curvature through threshold analysis. For the path point coordinates t(x, y): k(t) represents the local bending degree of the curve at t. When the curvature of a certain point is detected as the local maximum, this point is considered as the inflection point I. Step 33: Path connection: Based on the starting point, the detected inflection points, and the ending point, generate a simplified and ordered path to connect all the key points to form the final representation of the main path for subsequent angle calculation or visualization; linearly interpolate to connect the starting point, inflection points, and ending point in sequence. Step 34: Angle calculation: For each inflection point I, find its previous inflection point P in the path connection index pre and its next inflection point P next , construct vectors and Through the geometric analysis algorithm, calculate the included angle: where θ ∈ [0, 180], and are the direction vectors of adjacent live wires respectively.
8. A method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm according to claim 1, characterized in that The specific steps of Step 4 include: Step 41: Based on multi-frame temporal images, track the change in the position of the fusion points of the fire lines. Step 43: Calculate the moving speed of multiple live wires at the fusion point using the frame difference method. The formula is as follows: where d is the moving distance of the fusion point between two frames, and Δt is the frame interval time.
9. A method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm according to claim 1, characterized in that, The specific steps of Step 5 include: Output the angles and speed data of the multi-fire line fusion; dynamically display the skeletonization results and their fusion characteristics of the fire lines in the fire scene through a visualization tool.
10. A multi-fire-line fusion parameter calculation device for forest fire scenes based on an image skeleton algorithm, characterized in that, Running a method for calculating multi-fire line fusion parameters of a forest fire scene based on an image skeleton algorithm as described in any one of claims 1-9 further includes a visualization device.