A UAV forest fire prevention identification system and method based on machine vision
By deploying sensors in the fire monitoring area to collect wind speed and direction data, combined with the drone image to analyze smoke motion vectors, the problem of insufficient accuracy of optical flow algorithms in strong wind environments is solved, and the accuracy of early fire recognition and stability of detection is improved sex.
Patent Information
- Application Number
- CN202411311117.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-20
AI Technical Summary
In strong wind environments, it is difficult for the optical flow algorithm to accurately judge the movement characteristics of smoke, and may miss the early identification signal of the fire or falsely report non-fire events, causing the fire to spread to difficult to control.
Deploy sensors in the fire monitoring area to collect wind speed and wind direction data in real time, combine the drone image frame to analyze the smoke motion vector, compare the wind speed and wind direction data with the motion vector detected by the optical flow algorithm, judge the consistency of smoke motion trends and analyze vertical fluctuations Frequency anomalies and environmental interference degree, dynamically adjust the motion detection threshold of the optical flow algorithm to improve accuracy.
Effectively reduce the impact of wind interference on fire detection, improve the accuracy of early fire warnings, avoid false alarms or missed reports, and improve detection robustness and reliability.
Smart Images

Figure CN118839288B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of forest fire prevention, and in particular to a machine vision-based unmanned aerial vehicle forest fire prevention identification system and method. Background Art
[0002] UAV forest fire prevention identification based on machine vision is an intelligent system that uses advanced computer vision technology and UAV platforms to monitor, detect and prevent forest fires. UAVs are equipped with high-resolution cameras and infrared sensors to capture images and video data of forest areas in real time using machine vision technology. Machine vision algorithms can automatically analyze these images and identify possible signs of fire, such as smoke, fire or abnormal temperature. Compared with traditional ground monitoring, UAVs have flexible flight capabilities, can quickly cover large areas, and can observe some fire hazards at high altitudes that ground personnel cannot easily detect. For example, the optical flow algorithm is used to detect the movement direction and shape changes of smoke by analyzing the movement of pixels in continuous image frames. In the early stages of a fire, smoke usually has a unique upward trend accompanied by dynamic characteristics such as diffusion and curling. The machine vision system uses the optical flow algorithm to capture these subtle movement changes and can effectively distinguish smoke from other environmental objects (such as tree shaking, wind-blown dust, etc.). By accurately analyzing the rising speed and expansion pattern of smoke, the system can identify early signs of fire, thereby achieving more timely fire warnings.
[0003] The prior art has the following deficiencies:
[0004] The optical flow algorithm relies on detecting the movement trend of smoke to distinguish smoke from other environmental objects. However, in a strong wind environment, the movement direction and speed of smoke may be greatly affected by wind speed and direction, and may even show abnormal diffusion patterns, masking the rising characteristics of smoke in the early stages of a fire. Especially in the case of multiple wind layers, smoke may be blown away by wind fields at different heights, causing its movement pattern to become complicated, exceeding the processing capacity of the optical flow algorithm, making the optical flow algorithm ineffective in windy scenes, unable to accurately determine the movement characteristics of smoke, and may miss key identification signals of early fire smoke. In this way, the early stages of a fire may be ignored due to wind interference, causing the fire to spread to an uncontrollable level. At the same time, if the optical flow algorithm is distorted in a complex wind field environment, the system may misreport other non-fire events due to incorrect smoke movement pattern judgments. Summary of the invention
[0005] The purpose of the present invention is to provide a UAV forest fire prevention identification system and method based on machine vision to solve the shortcomings of the background technology.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a method for identifying forest fire prevention using a drone based on machine vision, comprising the following steps:
[0007] S1: Deploy several sensors in the fire monitoring area to collect wind speed and direction data in the environment in real time, collect continuous image frames through drones, and use optical flow algorithm to analyze the pixel motion in continuous image frames to generate smoke motion vectors;
[0008] S2: Compare the collected wind speed and direction data with the smoke motion vector detected by the optical flow algorithm to analyze whether the movement trend of the smoke is consistent, and divide it into consistent motion and inconsistent motion according to the analysis results;
[0009] S3: For inconsistent motion, analyze the distortion state of the smoke during vertical motion, determine the fluctuation range of the smoke deviating from the normal rising pattern, and evaluate the abnormal degree of the vertical rising trend of the smoke;
[0010] S4: Compare and analyze the smoke motion vector calculated by the optical flow algorithm with the system's built-in early-stage fire smoke feature model to determine the data deviation between the actual smoke motion vector and the predicted vector by the early-stage fire smoke feature model, and evaluate the degree of interference of environmental factors on smoke motion;
[0011] S5: Comprehensively analyze the abnormal degree of the vertical rising trend of smoke and the interference degree of environmental factors on smoke movement, evaluate the detection accuracy of the optical flow algorithm in a complex wind field environment, and divide it into accurate detection and inaccurate detection according to the evaluation results;
[0012] S6: For accurate detection, the detected smoke motion pattern is compared with historical fire data to identify whether it is the early stage of a fire; for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted based on the analysis results to improve the detection accuracy.
[0013] Preferably, in S2, the wind speed and wind direction changes in the environment are continuously monitored by wind speed sensors and wind direction sensors deployed in the fire monitoring area, and the collected wind speed and wind direction data are standardized, and continuous image frames are collected by drones, and the movement of pixels in the image is analyzed by an optical flow algorithm to generate a motion vector of the smoke, and the smoke motion vector includes a motion direction and a motion speed: the overall motion direction of the smoke is extracted from the motion vector of each smoke pixel calculated by the optical flow algorithm, which is achieved by calculating the average motion vector; the average motion speed of the smoke is calculated to determine the overall movement speed of the smoke; the wind direction data is compared with the smoke motion direction calculated by the optical flow algorithm:
[0014] Calculate the angle difference between wind direction and smoke movement direction , the formula is: ;in, The angle indicating the wind direction, Indicates the angle of smoke movement. If the angle difference is within the set angle threshold, it means that the direction of smoke movement is consistent with the wind direction; if the angle difference exceeds the angle threshold, it means that the direction of smoke movement is inconsistent with the wind direction; compare the wind speed data with the movement speed of the smoke: calculate the difference between the wind speed and the movement speed of the smoke , the formula is: in, Indicates the ambient wind speed, Indicates the speed of smoke detected by the optical flow algorithm; if the speed difference is within the speed threshold range, it means that the speed of smoke matches the wind speed; if the speed difference exceeds the speed threshold range, it means that the speed of smoke does not match the wind speed.
[0015] Preferably, based on the comparison results of direction and speed, it is determined whether the movement trend of the smoke is consistent with the ambient wind speed and direction:
[0016] If the direction of smoke movement is consistent with the wind direction, and the speed of smoke movement is consistent with the wind speed, it is judged as consistent movement; if the direction of smoke movement is inconsistent with the wind direction and there is a deviation between the speed and the wind speed, it is judged as inconsistent movement.
[0017] Preferably, in S3, the vertical movement trajectory of the smoke is analyzed, and a vertical fluctuation frequency anomaly value is generated according to the fluctuation amplitude presented by the vertical movement trajectory of the smoke, so as to evaluate the abnormal degree of the vertical rising trend of the smoke. Then, the method for obtaining the vertical fluctuation frequency anomaly value is as follows:
[0018] Use the optical flow algorithm to extract the vertical motion trajectory of the smoke from the continuous image frames, record the vertical position changing with time, and construct the corresponding time series x(t), where t represents time, x(t) is the vertical position of the smoke at each time point, and determine the number of vertical motion trajectory points collected per second , apply the window function to the time series and calculate the windowed signal , the expression is: ; In the formula, is the time series after removing the trend, As the window function, the time domain signal is transformed into Convert to frequency domain signal , the expression is: ; In the formula, is the kernel function of Fourier transform, N is the total number of sampling points, and f represents the frequency; the spectrum data calculated by fast Fourier transform will provide a frequency range from 0 to The frequency components , the frequency resolution is: ; Calculate the power spectrum density P(f), which represents the intensity of each frequency component. The calculation formula of power spectrum density is: ;in, is the amplitude of the frequency domain signal, and the main frequency component is extracted from the power spectrum , compare and analyze the main frequency component with the frequency of normal smoke diffusion in historical data, and calculate the abnormal value of vertical fluctuation frequency. The expression is: ; In the formula, is the vertical fluctuation frequency anomaly, is the frequency of normal smoke diffusion in historical data.
[0019] Preferably, a direction-speed consistency deviation index is generated according to the deviation of the actual vector direction and speed to evaluate the interference degree of environmental factors on the smoke movement. The method for obtaining the direction-speed consistency deviation index is:
[0020] The angle difference between the wind direction calculated in the S time period and the direction of smoke movement and the difference between wind speed and smoke movement speed Collect and construct a Bayesian network. and As wind speed and wind direction, a conditional probability table is defined for each node in the Bayesian network to represent the dependency between variables. Based on wind speed and wind direction, the directional deviation is calculated. The conditional probability , the expression is: ; In the formula, is the effect of the expected value of wind speed and wind direction on the direction deviation, σ is the standard deviation of the direction deviation; according to wind speed and temperature, the speed deviation is calculated The conditional probability , the expression is: ; In the formula, is the ambient temperature, is the influence of the expected values of wind speed and temperature on the speed deviation, q is the standard deviation of the speed deviation, and the conditional probability of the consistent deviation index of the direction speed is calculated. The expression is: ; In the formula, is the conditional probability of the direction and speed deviating from the index consistently, is the standard angle difference between the wind direction and the smoke movement direction under normal conditions in historical data, is the standard difference between wind speed and smoke movement speed under normal conditions in historical data; Bayesian network inference is used to calculate the direction speed consistency deviation index, and the expression is: ; In the formula, is the direction speed consistent deviation index.
[0021] Preferably, the vertical fluctuation frequency anomaly value and the directional speed consistency deviation index are converted into a first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model uses each group of first eigenvectors to predict the detection accuracy value label of the optical flow algorithm in a complex wind field environment as a prediction target, and takes minimizing the sum of prediction errors of the detection accuracy value labels of all optical flow algorithms in a complex wind field environment as a training target. The machine learning model is trained until the sum of prediction errors converges and the model training is stopped. The detection accuracy value of the optical flow algorithm in a complex wind field environment is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
[0022] Preferably, the acquired detection accuracy value of the optical flow algorithm in a complex wind field environment is compared with a pre-set reference threshold of the detection accuracy value of the optical flow algorithm in a complex wind field environment. If the detection accuracy value of the optical flow algorithm in the complex wind field environment is greater than or equal to the reference threshold of the detection accuracy value, it means that the detection accuracy of the optical flow algorithm in the complex wind field environment is high. In this case, an accurate detection signal is generated and it is classified as an accurate detection. If the detection accuracy value of the optical flow algorithm in the complex wind field environment is less than the reference threshold of the detection accuracy value, it means that the detection accuracy of the optical flow algorithm in the complex wind field environment is low. In this case, an inaccurate detection signal is generated and it is classified as an inaccurate detection.
[0023] Preferably, in S6, for accurate detection, the detected smoke movement pattern is compared with historical fire data to identify whether it is an early stage of a fire, specifically:
[0024] Smoke movement pattern data obtained from detection, direction vector : Indicates the direction of smoke movement; velocity vector : Indicates the speed of smoke movement; acceleration : Vertical acceleration of smoke during detection.
[0025] The dataset contains typical smoke movement patterns from the early stages of past fires, including: historical direction vectors : The direction of smoke movement in the early stage of the fire, the historical velocity vector : Smoke velocity in the early stages of a fire; historical acceleration : acceleration of smoke in the early stage of fire;
[0026] By calculating the angle θ between the actual direction vector and the historical direction vector, the directional consistency between the two can be calculated. The expression is: ; Calculate the speed similarity by calculating the difference between the actual speed and the historical speed , the expression is: ; Calculate acceleration consistency by calculating the difference between actual acceleration and historical acceleration , the expression is: ; Perform weighted summation to obtain a comprehensive similarity score ;
[0027] By comparing the actual smoke diffusion speed and diffusion range, the matching degree with the early smoke characteristics of the fire is calculated. , the expression is: ;in, and are the diffusion characteristics in actual and historical data, respectively;
[0028] The comprehensive similarity score Diffusion mode matching Compare with their corresponding thresholds respectively: if Greater than or equal to the similarity threshold and If the smoke movement pattern is less than or equal to the diffusion pattern matching threshold, the smoke movement pattern is judged to be in the early stage of fire; Less than the similarity threshold and If it is greater than the diffusion pattern matching threshold, it is judged that the smoke is not a fire feature.
[0029] Preferably, for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted according to the analysis results to improve the detection accuracy;
[0030] When the detection accuracy value generated in a fixed time period is less than the reference threshold of the detection accuracy value, the detection accuracy of the optical flow algorithm in a complex wind field environment is classified as inaccurate detection, and the detection accuracy values generated in subsequent fixed time periods that are less than the reference threshold of the detection accuracy value are collected, and a corresponding data set is established. After analyzing it, the abnormal degree of the detection accuracy of the optical flow algorithm in the subsequent fixed time period is determined, and the motion detection threshold of the optical flow algorithm is dynamically adjusted to improve the detection accuracy;
[0031] If the mean of the detection accuracy values in the data set is greater than or equal to the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is less than the reference threshold of the standard deviation of the detection accuracy values, the detection is accurate and stable and no adjustment is required; if the mean of the detection accuracy values is greater than or equal to the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is greater than or equal to the reference threshold of the standard deviation of the detection accuracy values, the detection is generally accurate but fluctuates greatly, and it is necessary to analyze environmental changes and dynamically adjust the threshold; if the mean of the detection accuracy values is less than the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is greater than or equal to the reference threshold of the standard deviation of the detection accuracy values, the detection is inaccurate and fluctuates greatly, and the threshold needs to be adjusted to introduce environmental data compensation; if the mean of the detection accuracy values is less than the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is less than the reference threshold of the standard deviation of the detection accuracy values, the detection is continuously inaccurate but stable, and the threshold needs to be adjusted to optimize the detection accuracy.
[0032] The present invention also provides a UAV forest fire prevention identification system based on machine vision, including a data acquisition module, a data comparison module, a smoke rise analysis module, a vector feature analysis module, a detection accuracy evaluation module and an identification and optimization module;
[0033] Data acquisition module: Several sensors are deployed in the fire monitoring area to collect wind speed and direction data in the environment in real time. Continuous image frames are collected by drones, and the optical flow algorithm is used to analyze the pixel motion in the continuous image frames to generate the motion vector of the smoke;
[0034] Data comparison module: compares the collected wind speed and direction data with the smoke motion vector detected by the optical flow algorithm to analyze whether the movement trend of the smoke is consistent, and divides it into consistent motion and inconsistent motion according to the analysis results;
[0035] Smoke rise analysis module: For inconsistent motion, analyze the distortion state of smoke during vertical motion, determine the fluctuation range of smoke deviation from the normal rise mode, and evaluate the abnormal degree of smoke vertical rise trend;
[0036] Vector feature analysis module: compares and analyzes the smoke motion vector calculated by the optical flow algorithm with the system's built-in early-stage fire smoke feature model to determine the data deviation between the actual smoke motion vector and the predicted vector by the early-stage fire smoke feature model, and evaluates the degree of interference of environmental factors on smoke motion;
[0037] Detection accuracy evaluation module: Comprehensively analyzes the abnormal degree of smoke vertical rising trend and the degree of interference of environmental factors on smoke movement, evaluates the detection accuracy of the optical flow algorithm in a complex wind field environment, and divides it into accurate detection and inaccurate detection according to the evaluation results;
[0038] Identification and optimization module: For accurate detection, the detected smoke motion pattern is compared with historical fire data to identify whether it is the early stage of a fire; for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted based on the analysis results to improve detection accuracy.
[0039] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0040] 1. The present invention deploys sensors in the fire monitoring area to collect wind speed and wind direction data in real time, and uses the optical flow algorithm to analyze the smoke motion vector in combination with the image frames collected by the drone. The system can judge the actual movement characteristics of the smoke by the influence of environmental factors on the smoke movement trend. The smoke movement direction and speed are analyzed, and combined with the historical fire data model, the system further optimizes the recognition of smoke movement in the early stage of the fire, reduces the impact of wind interference on system detection, and thus improves the accuracy of early warning of fire.
[0041] 2. The present invention introduces a dynamic adjustment mechanism to ensure that in the case of inaccurate detection, the optical flow algorithm can adaptively adjust the motion detection threshold, and optimize and adjust based on changes in the detection accuracy value and fluctuations in environmental factors. For changes in the mean and standard deviation of the detection results, the system can accurately analyze whether the detection accuracy is stable, and choose whether to adjust the threshold or introduce environmental data compensation according to different scenarios. It can significantly improve the robustness and reliability of detection in complex wind field environments, effectively avoid false alarms or missed alarms, and improve the accuracy and stability of fire detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0043] Figure 1 The figure is a flow chart of the method of the present invention.
[0044] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Example 1, please refer to Figure 1 As shown, the method for identifying forest fire prevention using a drone based on machine vision described in this embodiment includes the following steps:
[0047] S1: Deploy several sensors in the fire monitoring area to collect wind speed and direction data in the environment in real time, collect continuous image frames through drones, and use optical flow algorithm to analyze the pixel motion in continuous image frames to generate smoke motion vectors;
[0048] S2: Compare the collected wind speed and direction data with the smoke motion vector detected by the optical flow algorithm to analyze whether the movement trend of the smoke is consistent, and divide it into consistent motion and inconsistent motion according to the analysis results;
[0049] S3: For inconsistent motion, analyze the distortion state of the smoke during vertical motion, determine the fluctuation range of the smoke deviating from the normal rising pattern, and evaluate the abnormal degree of the vertical rising trend of the smoke;
[0050] S4: Compare and analyze the smoke motion vector calculated by the optical flow algorithm with the system's built-in early-stage fire smoke feature model to determine the data deviation between the actual smoke motion vector and the predicted vector by the early-stage fire smoke feature model, and evaluate the degree of interference of environmental factors on smoke motion;
[0051] S5: Comprehensively analyze the abnormal degree of the vertical rising trend of smoke and the interference degree of environmental factors on smoke movement, evaluate the detection accuracy of the optical flow algorithm in a complex wind field environment, and divide it into accurate detection and inaccurate detection according to the evaluation results;
[0052] S6: For accurate detection, the detected smoke motion pattern is compared with historical fire data to identify whether it is the early stage of a fire; for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted based on the analysis results to improve the detection accuracy.
[0053] In S1, several sensors are deployed in the fire monitoring area to collect wind speed and direction data in the environment in real time. Continuous image frames are collected by drones, and the optical flow algorithm is used to analyze the pixel motion in the continuous image frames to generate the motion vector of the smoke, specifically:
[0054] Various sensors are deployed in the fire monitoring area, mainly including wind speed sensors, wind direction sensors, temperature sensors and humidity sensors. Wind speed and wind direction are key parameters that help monitor the movement trend of smoke under different environmental conditions. Sensors should be arranged at different locations and heights in high-risk areas of fire to cover the entire monitoring range and ensure comprehensive environmental information. For example, sensors can be installed at the edge of the forest, on tree trunks at different heights, or small sensors can be installed on drones to achieve dynamic data collection.
[0055] Sensors transmit data such as wind speed, wind direction, and temperature in the environment in real time through wireless networks or wired connections. These data will be used as a comparison benchmark when analyzing smoke movement later. Drones patrol the fire monitoring area regularly or according to a predetermined plan. Drones are equipped with high-resolution cameras and infrared sensors to capture clear images and videos at different heights and angles. During the flight, drones collect continuous image frames at a certain frame rate (such as 10 frames per second or higher). These images can be visible light images, infrared thermal imaging images, or even multi-spectral images to capture the presence and morphological changes of smoke.
[0056] De-noising is performed on the collected images to reduce interference caused by camera shake, light changes or sensor noise to ensure clear images. In complex lighting conditions (such as strong light, shadows or at night), the images are optimized through contrast adjustment, brightness enhancement and other technologies to make the smoke features more obvious.
[0057] The optical flow algorithm is a technique used to analyze the movement of pixels in consecutive image frames. The motion vector of each pixel is generated by calculating the movement of each pixel in adjacent image frames. This algorithm is used to capture the movement trend and morphological changes of smoke in fire monitoring.
[0058] The system inputs adjacent image frames into the optical flow algorithm and generates motion vectors by analyzing the direction and speed of movement of each pixel. For smoke, the motion vector usually shows a vertical upward trend, accompanied by dynamic changes in diffusion and curling. In the early stages of a fire, smoke usually rises vertically. The optical flow algorithm can capture this upward trend by analyzing the motion vectors. Fire smoke will have obvious lateral diffusion during the rising process, and will show characteristics such as curling and twisting due to factors such as wind, and the optical flow algorithm can track these changes.
[0059] S2: Compare the collected wind speed and direction data with the smoke motion vector detected by the optical flow algorithm to analyze whether the movement trend of the smoke is consistent, and divide it into consistent motion and inconsistent motion according to the analysis results.
[0060] Wind speed sensors and wind direction sensors deployed in the fire monitoring area continuously monitor the wind speed and wind direction changes in the environment, and the collected wind speed and wind direction data are standardized. Wind speed data is usually in meters per second (m / s), and wind direction data is expressed in degrees (0° for north, 90° for east, etc.). These data will be used to compare with the smoke motion vector in subsequent steps. Continuous image frames are collected by drones, and the movement of pixels in the image is analyzed by the optical flow algorithm to generate the smoke motion vector. The smoke motion vector includes the direction of movement and the speed of movement: Direction of movement: The direction of movement of smoke can be expressed by angles on a two-dimensional plane (similar to wind direction data, 0° for north and 90° for east). Speed of movement: The speed of smoke movement is measured by the number of pixels moved per second, which is expressed as the actual speed (such as meters per second) after proportional conversion.
[0061] Calculation of smoke movement direction: The overall movement direction of the smoke is extracted from the motion vector of each smoke pixel calculated by the optical flow algorithm. This is achieved by calculating the average motion vector. This direction data will be used to compare with the wind direction data.
[0062] Smoke movement speed calculation: Calculate the average movement speed of the smoke to determine the overall movement speed of the smoke. The speed data will be compared and analyzed with the wind speed data to determine whether the smoke is affected by the ambient wind speed.
[0063] Compare and analyze the wind direction data with the smoke movement direction calculated by the optical flow algorithm:
[0064] Calculate angle difference: Calculate the angle difference between wind direction and smoke movement direction , the formula is: ;in, The angle indicating the wind direction, Indicates the angle of smoke movement.
[0065] Direction consistency judgment: If the angle difference is within the set angle threshold range, it means that the direction of smoke movement is consistent with the wind direction; if the angle difference exceeds the angle threshold, it means that the direction of smoke movement is inconsistent with the wind direction.
[0066] Compare the wind speed data to the speed of the smoke's movement:
[0067] Speed difference calculation: calculate the difference between wind speed and smoke movement speed , the formula is: in, Indicates the ambient wind speed, Indicates the speed of smoke detected by the optical flow algorithm. Set a threshold (such as 5% or 10%) based on the effect of wind speed on smoke.
[0068] Speed consistency judgment: If the speed difference is within the speed threshold range, it means that the movement speed of the smoke matches the wind speed; if the speed difference exceeds the speed threshold range, it means that the movement speed of the smoke does not match the wind speed.
[0069] Based on the comparison results of direction and speed, determine whether the movement trend of the smoke is consistent with the ambient wind speed and direction:
[0070] If the wind direction and speed are consistent with the direction and speed of smoke movement, the movement trend of the smoke matches the ambient wind field;
[0071] If the direction of smoke movement is consistent with the wind direction, and the speed of smoke movement is consistent with the wind speed, it is judged as consistent movement; this usually means that the smoke is a normal diffusion phenomenon affected by wind, such as fog, dust, etc.
[0072] If the direction of smoke movement is inconsistent with the wind direction, or there is a deviation between the speed and the wind speed, it is judged as inconsistent movement; this indicates that the smoke may not be affected by the environmental wind field, or that the smoke movement is caused by the fire, and further analysis is required.
[0073] S3: For inconsistent motion, analyze the distortion state of the smoke during vertical motion, determine the fluctuation range of the smoke deviating from the normal rising pattern, and evaluate the abnormal degree of the vertical rising trend of the smoke.
[0074] After detecting that the direction and speed of smoke movement are inconsistent with the ambient wind speed and direction, the vertical motion vector of smoke generated by the optical flow algorithm is extracted. The vertical motion vector represents the upward trend of smoke in the image frame, and usually changes along the vertical direction (Y axis) of the image. The total motion vector is decomposed into horizontal and vertical components, focusing on the size and change of the vertical component. In the early stage of a fire, smoke generally shows a strong vertical rise, so the significance of the vertical component is a key judgment indicator. Fire smoke will be affected by air disturbances, wind speed, etc. during the rise, showing a certain degree of distortion and rotation. Image processing technology is used to detect the morphological changes of smoke and identify whether nonlinear changes such as curling, folding, and distortion occur during the rise of smoke. Morphological edge tracking: Use edge detection algorithms (such as Canny edge detection) to identify the contours of smoke in the image and track the changes of these edges. If the contour is irregularly deformed or distorted during the rise, it indicates that the smoke may be subject to greater environmental interference or have fire characteristics.
[0075] Analyze the vertical movement trajectory of the smoke, generate the vertical fluctuation frequency anomaly value according to the fluctuation amplitude of the vertical movement trajectory of the smoke, and evaluate the abnormal degree of the vertical rising trend of the smoke. The method for obtaining the vertical fluctuation frequency anomaly value is as follows:
[0076] Use the optical flow algorithm to extract the vertical motion trajectory of the smoke from the continuous image frames, record the vertical position changing with time, and construct the corresponding time series x(t), where t represents time, x(t) is the vertical position of the smoke at each time point, and determine the number of vertical motion trajectory points collected per second , apply a window function (such as Hanning window, Hammer window, etc.) to the time series and calculate the windowed signal , the expression is: ; In the formula, is the time series after removing the trend, As the window function, the time domain signal is transformed into Convert to frequency domain signal , the expression is: ; In the formula, is the kernel function of Fourier transform, N is the total number of sampling points, and f represents the frequency; the spectrum data calculated by fast Fourier transform will provide a frequency range from 0 to (Nyquist frequency) , the frequency resolution is: ; Calculate the power spectrum density P(f), which represents the intensity of each frequency component. The calculation formula of power spectrum density is: ;in, is the amplitude of the frequency domain signal, and the main frequency component is extracted from the power spectrum , by comparing the distribution of the main frequency components, identifying the main fluctuation frequency in the vertical motion trajectory, comparing and analyzing the main frequency components with the frequency of normal smoke diffusion in historical data, and calculating the abnormal value of the vertical fluctuation frequency, the expression is: ; In the formula, is the vertical fluctuation frequency anomaly, is the frequency of normal smoke diffusion in historical data.
[0077] The larger the vertical fluctuation frequency anomaly value, the more abnormal the smoke is. When the vertical fluctuation frequency anomaly value increases, it means that the vertical movement frequency of the smoke is far beyond the normal range. Usually, the diffusion of smoke in the natural environment will show a low-frequency, stable vertical rise, while the smoke in the early stage of a fire is accompanied by rapid rise and frequent fluctuations.
[0078] When the vertical fluctuation frequency abnormal value is smaller, it means that the smoke has a low abnormal vertical upward trend, indicating that the vertical movement frequency of the smoke is far below the normal range, even close to static or horizontal diffusion. This means that the vertical upward trend of the smoke is extremely weak or has stopped.
[0079] S4: Compare and analyze the smoke motion vector calculated by the optical flow algorithm with the system's built-in early fire smoke characteristic model to determine the data deviation between the actual smoke motion vector and the predicted vector of the early fire smoke characteristic model, and evaluate the degree of interference of environmental factors on smoke movement.
[0080] By comparing and analyzing the smoke motion vector calculated by the optical flow algorithm with the system's built-in early-stage smoke feature model, the difference between the actual movement of smoke and the typical characteristics of fire smoke can be determined. First, the actual smoke motion vector generated by the optical flow algorithm includes information such as the direction and speed of the smoke, reflecting the actual movement trend of the smoke in space. On the other hand, the early-stage smoke feature model of a fire is a prediction model trained based on a large amount of fire data, which usually describes the typical rising and diffusion characteristics of smoke caused by fire, such as a strong vertical rising trend and a faster movement speed. By comparing these two sets of vectors, the system can calculate the direction deviation (calculated by the vector angle) and the speed deviation (calculated by the speed difference between the two), thereby evaluating the similarity between the actual smoke and the fire smoke. If the deviation is small, it means that the smoke movement conforms to the early characteristics of a fire and may be smoke caused by a fire; if the deviation is large and accompanied by interference from environmental factors (such as wind speed and wind direction), it means that the smoke movement is more likely to be natural diffusion under the influence of environmental factors.
[0081] According to the deviation of the actual vector direction and speed, the direction speed consistency deviation index is generated to evaluate the interference degree of environmental factors on the smoke movement. The method for obtaining the direction speed consistency deviation index is as follows:
[0082] The angle difference between the wind direction calculated in the S time period and the direction of smoke movement and the difference between wind speed and smoke movement speed Collect and construct a Bayesian network. and As wind speed and wind direction, a conditional probability table is defined for each node in the Bayesian network to represent the dependency between variables. Based on wind speed and wind direction, the directional deviation is calculated. The conditional probability , the expression is: ; In the formula, is the effect of the expected value of wind speed and wind direction on the direction deviation, σ is the standard deviation of the direction deviation; according to wind speed and temperature, the speed deviation is calculated The conditional probability , the expression is: ; In the formula, is the ambient temperature, is the influence of the expected values of wind speed and temperature on the speed deviation, q is the standard deviation of the speed deviation, and the conditional probability of the consistent deviation index of the direction speed is calculated. The expression is: ; In the formula, is the conditional probability of the direction and speed deviating from the index consistently, is the standard angle difference between the wind direction and the smoke movement direction under normal conditions in historical data , is the standard difference between wind speed and smoke movement speed under normal conditions in historical data; Bayesian network inference is used to calculate the direction speed consistency deviation index, and the expression is: ; In the formula, is the direction speed consistency deviation index.
[0083] The larger the direction-speed consistency deviation index is, the more obvious the inconsistency between the actual direction of smoke movement and the speed deviation is, indicating that the environmental factors interfere with the smoke movement to a greater extent. Generally, this means that external factors such as wind speed and wind direction have a strong impact on the smoke movement. For example, strong winds may cause the horizontal diffusion of smoke to increase while the vertical rise trend is weakened, resulting in a large deviation between the actual smoke movement direction and the typical vertical rise characteristics predicted by the fire model.
[0084] The smaller the direction-speed consistency deviation index is, the more consistent the actual movement direction and speed deviation of the smoke are, indicating that environmental factors have less interference with the movement of the smoke. In this case, the movement trend of the smoke is more consistent with the typical characteristics of the fire model, indicating that the smoke may be vertically rising and spreading due to the fire. At this time, environmental conditions such as wind speed, wind direction or temperature have a weaker effect on the movement of the smoke, and the movement pattern of the smoke is more stable.
[0085] S5: Comprehensively analyze the abnormal degree of the vertical rising trend of smoke and the interference degree of environmental factors on smoke movement, evaluate the detection accuracy of the optical flow algorithm in a complex wind field environment, and divide it into accurate detection and inaccurate detection according to the evaluation results.
[0086] The vertical fluctuation frequency anomaly and the directional speed consistency deviation index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model uses each group of first eigenvectors to predict the detection accuracy value label of the optical flow algorithm in a complex wind field environment as the prediction target, and takes minimizing the sum of the prediction errors of the detection accuracy value labels of all optical flow algorithms in a complex wind field environment as the training target. The machine learning model is trained until the sum of the prediction errors converges, and the model training is stopped. The detection accuracy value of the optical flow algorithm in a complex wind field environment is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
[0087] The method for obtaining the detection accuracy value of the optical flow algorithm in a complex wind field environment is: from the first eigenvector training data of the trained machine learning model, obtain the corresponding function expression: ; In the formula, is the output function of the model, is the vertical fluctuation frequency anomaly, is the direction speed consistent deviation index, is the detection accuracy value of the optical flow algorithm in a complex wind field environment.
[0088] The acquired detection accuracy value of the optical flow algorithm in a complex wind field environment is compared with the pre-set reference threshold of the detection accuracy value of the optical flow algorithm in a complex wind field environment. If the detection accuracy value of the optical flow algorithm in the complex wind field environment is greater than or equal to the reference threshold of the detection accuracy value, it means that the detection accuracy of the optical flow algorithm in the complex wind field environment is high. At this time, an accurate detection signal is generated and it is classified as an accurate detection; if the detection accuracy value of the optical flow algorithm in the complex wind field environment is less than the reference threshold of the detection accuracy value, it means that the detection accuracy of the optical flow algorithm in the complex wind field environment is low. At this time, an inaccurate detection signal is generated and it is classified as an inaccurate detection.
[0089] S6: For accurate detection, the detected smoke motion pattern is compared with historical fire data to identify whether it is the early stage of a fire; for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted based on the analysis results to improve the detection accuracy.
[0090] For accurate detection, the detected smoke movement pattern is compared with historical fire data to identify whether it is an early stage of a fire, specifically:
[0091] The smoke motion pattern data obtained from the detection includes the following information:
[0092] Direction Vector : Indicates the direction of smoke movement; velocity vector : Indicates the speed of smoke movement; acceleration : Vertical acceleration of smoke during detection.
[0093] Diffusion pattern: represents the characteristics of the lateral diffusion of smoke, such as diffusion speed, range, etc.
[0094] Historical Fire Dataset: The dataset contains typical smoke movement patterns during the early stages of past fires. Each data instance includes: historical direction vector : The direction of smoke movement in the early stage of the fire, the historical velocity vector : Smoke velocity in the early stages of a fire; historical acceleration : The acceleration of smoke in the early stages of a fire. By matching the actual detected smoke motion pattern with the pattern in historical fire data, their similarity is evaluated to determine whether it is the early stage of a fire.
[0095] By calculating the angle θ between the actual direction vector and the historical direction vector, the directional consistency between the two can be calculated. The expression is: ;if It approaches 0°, indicating that the direction consistency is high, which is consistent with the early characteristics of fire.
[0096] Calculate the speed similarity by calculating the difference between the actual speed and the historical speed , the expression is: ;if It is close to 0, indicating that the actual speed of the smoke is consistent with the speed characteristics in the early stage of the fire.
[0097] Calculate acceleration consistency by calculating the difference between actual acceleration and historical acceleration , the expression is: ; Smaller It shows that the actual acceleration is consistent with the fire model.
[0098] Perform weighted summation to obtain a comprehensive similarity score , the formula is: ;in, , , are the weights of direction, speed and acceleration, respectively, which are set empirically (usually assigned according to the importance of fire data, e.g. =0.4, =0.3, =0.3).
[0099] By comparing the actual smoke diffusion speed and diffusion range, the matching degree with the early smoke characteristics of the fire is calculated. , the expression is: ;in, and are the diffusion characteristics in actual and historical data respectively. If It is smaller, indicating that the diffusion pattern is more consistent.
[0100] The comprehensive similarity score Matching degree with diffusion mode Compare them with their corresponding thresholds respectively:
[0101] if Greater than or equal to the similarity threshold and If it is less than or equal to the diffusion pattern matching threshold, the smoke movement pattern is judged to be in the early stage of fire;
[0102] if Less than the similarity threshold and If it is greater than the diffusion pattern matching threshold, it is judged that the smoke is not a fire feature and may be caused by other environmental factors.
[0103] For inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted according to the analysis results to improve the detection accuracy;
[0104] When the detection accuracy value generated within a fixed time period is less than the reference threshold of the detection accuracy value, the detection accuracy of the optical flow algorithm in a complex wind field environment is classified as an inaccurate detection, and the detection accuracy values generated within a subsequent fixed time period that are less than the reference threshold of the detection accuracy value are collected, and a corresponding data set is established. After analyzing it, the abnormal degree of the detection accuracy of the optical flow algorithm in the subsequent fixed time period is determined, and the motion detection threshold of the optical flow algorithm is dynamically adjusted to improve the detection accuracy.
[0105] If the mean of the detection accuracy values in the data set is greater than or equal to the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is less than the reference threshold of the standard deviation of the detection accuracy values, it indicates that the algorithm performs well in most time periods and the detection results are generally accurate. At the same time, the fluctuation of the detection results in each time period is small, and the algorithm performance is relatively stable. At this time, the detection results of the optical flow algorithm are accurate and stable. At this time, there is no need to make major adjustments to the algorithm, and the current detection threshold can continue to be used. If further optimization is required, consider fine-tuning the threshold to enhance adaptability to edge cases.
[0106] If the mean of the detection accuracy values is greater than or equal to the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is greater than or equal to the reference threshold of the standard deviation of the detection accuracy values, it indicates that the overall accuracy of the algorithm is high. When the detection results fluctuate greatly. In certain time periods, the detection results may be unstable. At this time, the detection accuracy of the optical flow algorithm is generally good, but there is intermittent instability. It is recommended to analyze the environmental factors that cause fluctuations in detection accuracy, which may be strong winds, changes in ambient light, etc. Dynamically adjust the motion detection threshold of the optical flow algorithm, appropriately relax or tighten the detection threshold for noise and fluctuations in specific environments, and enhance the system's adaptability to fluctuations.
[0107] If the mean of the detection accuracy values is less than the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is greater than or equal to the reference threshold of the standard deviation of the detection accuracy values, it indicates that in most cases, the detection results of the algorithm are not accurate enough. At the same time, the results fluctuate greatly, indicating that the algorithm is very unstable in complex environments. At this time, the detection results of the optical flow algorithm are inaccurate and unstable. The core parameters of the algorithm need to be adjusted, including dynamically adjusting the threshold of motion detection and adding monitoring and compensation mechanisms for environmental factors such as wind speed and light changes. It is also possible to consider introducing more sensor data, such as wind speed, humidity, etc., to assist in adjusting the detection behavior of the optical flow algorithm.
[0108] If the mean of the detection accuracy values is less than the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is less than the reference threshold of the standard deviation of the detection accuracy values, it means that the detection results are not accurate enough for most time periods. Although the detection is inaccurate, the performance is stable. At this time, the detection results of the optical flow algorithm are continuously inaccurate but stable. At this time, it may be necessary to significantly adjust the motion detection threshold of the optical flow algorithm, perhaps because the algorithm cannot effectively distinguish smoke from noise or background factors in the current environment. Consider retraining the model and adjusting the threshold to cope with environmental interference in complex wind fields.
[0109] In this embodiment, sensors are deployed to collect wind speed and wind direction data in real time, and a drone is used in combination with an optical flow algorithm to analyze the smoke movement in the image and generate a motion vector. Then, the system compares the collected environmental data with the detected smoke motion vector to determine whether the movement trend of the smoke is consistent with the environment, and distinguishes between consistent and inconsistent motion. For inconsistent motion, the vertical movement and fluctuation of the smoke are further analyzed to evaluate the degree of deviation from the normal upward trend. Next, the smoke movement is compared with the early characteristic model of the fire to evaluate the interference of environmental factors on the smoke movement. By comprehensively evaluating the abnormal degree of smoke and environmental interference, the detection accuracy of the optical flow algorithm is judged and divided into accurate detection and inaccurate detection. If the detection is accurate, the smoke movement pattern is compared with the historical fire data to identify the early stage of the fire; if the detection is inaccurate, the error of the optical flow algorithm is further analyzed, and the detection threshold is dynamically adjusted to improve the accuracy.
[0110] Example 2, please refer to Figure 2 As shown, the drone forest fire prevention identification system based on machine vision described in this embodiment includes a data acquisition module, a data comparison module, a smoke rise analysis module, a vector feature analysis module, a detection accuracy evaluation module, and an identification and optimization module;
[0111] Data acquisition module: Several sensors are deployed in the fire monitoring area to collect wind speed and direction data in the environment in real time. Continuous image frames are collected by drones, and the optical flow algorithm is used to analyze the pixel motion in the continuous image frames to generate the motion vector of the smoke;
[0112] Data comparison module: compares the collected wind speed and direction data with the smoke motion vector detected by the optical flow algorithm to analyze whether the movement trend of the smoke is consistent, and divides it into consistent motion and inconsistent motion according to the analysis results;
[0113] Smoke rise analysis module: For inconsistent motion, analyze the distortion state of smoke during vertical motion, determine the fluctuation range of smoke deviation from the normal rise mode, and evaluate the abnormal degree of smoke vertical rise trend;
[0114] Vector feature analysis module: compares and analyzes the smoke motion vector calculated by the optical flow algorithm with the system's built-in early-stage fire smoke feature model to determine the data deviation between the actual smoke motion vector and the predicted vector by the early-stage fire smoke feature model, and evaluates the degree of interference of environmental factors on smoke motion;
[0115] Detection accuracy evaluation module: Comprehensively analyzes the abnormal degree of smoke vertical rising trend and the degree of interference of environmental factors on smoke movement, evaluates the detection accuracy of the optical flow algorithm in a complex wind field environment, and divides it into accurate detection and inaccurate detection according to the evaluation results;
[0116] Identification and optimization module: For accurate detection, the detected smoke motion pattern is compared with historical fire data to identify whether it is the early stage of a fire; for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted based on the analysis results to improve detection accuracy.
[0117] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0118] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0119] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0120] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0121] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for identifying forest fires using drones based on machine vision, characterized in that: The following steps are involved: S1: Deploy several sensors in the fire monitoring area to collect wind speed and direction data in the environment in real time, collect continuous image frames through drones, and use optical flow algorithm to analyze the pixel motion in continuous image frames to generate smoke motion vectors; S2: Compare the collected wind speed and direction data with the smoke motion vector detected by the optical flow algorithm to analyze whether the movement trend of the smoke is consistent, and divide it into consistent motion and inconsistent motion according to the analysis results; S3: For inconsistent motion, analyze the distortion state of the smoke during vertical motion, determine the fluctuation range of the smoke deviating from the normal rising pattern, and evaluate the abnormal degree of the vertical rising trend of the smoke; S4: Compare and analyze the smoke motion vector calculated by the optical flow algorithm with the system's built-in early-stage fire smoke feature model to determine the data deviation between the actual smoke motion vector and the predicted vector by the early-stage fire smoke feature model, and evaluate the degree of interference of environmental factors on smoke motion; S5: Comprehensively analyze the abnormal degree of the vertical rising trend of smoke and the interference degree of environmental factors on smoke movement, evaluate the detection accuracy of the optical flow algorithm in a complex wind field environment, and divide it into accurate detection and inaccurate detection according to the evaluation results; S6: For accurate detection, the detected smoke motion pattern is compared with historical fire data to identify whether it is the early stage of a fire; for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted based on the analysis results to improve the detection accuracy.
2. The method for identifying forest fire prevention using a drone based on machine vision according to claim 1, characterized in that: In S2, wind speed sensors and wind direction sensors are deployed in the fire monitoring area to continuously monitor the wind speed and wind direction changes in the environment, and the collected wind speed and wind direction data are standardized. In addition, continuous image frames are collected by drones, and the movement of pixels in the image is analyzed by the optical flow algorithm to generate the motion vector of the smoke. The smoke motion vector includes the movement direction and movement speed: the overall movement direction of the smoke is extracted from the motion vector of each smoke pixel calculated by the optical flow algorithm, which is achieved by calculating the average motion vector; the average movement speed of the smoke is calculated to determine the overall movement speed of the smoke; the wind direction data is compared with the smoke movement direction calculated by the optical flow algorithm: Calculate the angle difference between wind direction and smoke movement direction , the formula is: ;in, The angle indicating the wind direction, Indicates the angle of smoke movement. If the angle difference is within the set angle threshold, it means that the direction of smoke movement is consistent with the wind direction; if the angle difference exceeds the angle threshold, it means that the direction of smoke movement is inconsistent with the wind direction; compare the wind speed data with the movement speed of the smoke: calculate the difference between the wind speed and the movement speed of the smoke , the formula is: in, Indicates the ambient wind speed, Indicates the speed of smoke detected by the optical flow algorithm; if the speed difference is within the speed threshold range, it means that the speed of smoke matches the wind speed; if the speed difference exceeds the speed threshold range, it means that the speed of smoke does not match the wind speed.
3. The method for identifying forest fire prevention using a drone based on machine vision according to claim 2, characterized in that: Based on the comparison results of direction and speed, determine whether the movement trend of the smoke is consistent with the ambient wind speed and direction: If the direction of smoke movement is consistent with the wind direction, and the speed of smoke movement is consistent with the wind speed, it is judged as consistent movement; if the direction of smoke movement is inconsistent with the wind direction and there is a deviation between the speed and the wind speed, it is judged as inconsistent movement.
4. The method for identifying forest fire prevention using a drone based on machine vision according to claim 1, characterized in that: In S3, the vertical movement trajectory of the smoke is analyzed, and the vertical fluctuation frequency anomaly value is generated according to the fluctuation amplitude of the vertical movement trajectory of the smoke to evaluate the abnormal degree of the vertical rising trend of the smoke. The method for obtaining the vertical fluctuation frequency anomaly value is: Use the optical flow algorithm to extract the vertical motion trajectory of the smoke from the continuous image frames, record the vertical position changing with time, and construct the corresponding time series x(t), where t represents time, x(t) is the vertical position of the smoke at each time point, and determine the number of vertical motion trajectory points collected per second , apply the window function to the time series and calculate the windowed signal , the expression is: ; In the formula, is the time series after removing the trend, As the window function, the time domain signal is transformed into Convert to frequency domain signal , the expression is: ; In the formula, is the kernel function of Fourier transform, N is the total number of sampling points, and f represents the frequency; the spectrum data calculated by fast Fourier transform will provide a frequency range from 0 to The frequency components , the frequency resolution is: ; Calculate the power spectrum density P(f), which represents the intensity of each frequency component. The calculation formula of power spectrum density is: ;in, is the amplitude of the frequency domain signal, and the main frequency component is extracted from the power spectrum , compare and analyze the main frequency component with the frequency of normal smoke diffusion in historical data, and calculate the abnormal value of vertical fluctuation frequency. The expression is: ; In the formula, is the vertical fluctuation frequency anomaly, is the frequency of normal smoke diffusion in historical data.
5. The method for identifying forest fire prevention using a drone based on machine vision according to claim 4, characterized in that: According to the deviation of the actual vector direction and speed, the direction speed consistency deviation index is generated to evaluate the interference degree of environmental factors on the smoke movement. The method for obtaining the direction speed consistency deviation index is: The angle difference between the wind direction calculated in the S time period and the direction of smoke movement and the difference between wind speed and smoke movement speed Collect and construct a Bayesian network. and As wind speed and wind direction, a conditional probability table is defined for each node in the Bayesian network to represent the dependency between variables. Based on wind speed and wind direction, the directional deviation is calculated. The conditional probability , the expression is: ; In the formula, is the effect of the expected value of wind speed and wind direction on the direction deviation, σ is the standard deviation of the direction deviation; according to wind speed and temperature, the speed deviation is calculated The conditional probability , the expression is: ; In the formula, is the ambient temperature, is the influence of the expected values of wind speed and temperature on the speed deviation, q is the standard deviation of the speed deviation, and the conditional probability of the consistent deviation index of the direction speed is calculated. The expression is: ; In the formula, is the conditional probability of the direction and speed deviating from the index consistently, is the standard angle difference between the wind direction and the smoke movement direction under normal conditions in historical data, is the standard difference between wind speed and smoke movement speed under normal conditions in historical data; Bayesian network inference is used to calculate the direction speed consistency deviation index, and the expression is: ; In the formula, is the direction speed consistent deviation index.
6. The method for identifying forest fire prevention using a drone based on machine vision according to claim 5, characterized in that: The vertical fluctuation frequency anomaly and the directional speed consistency deviation index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model uses each group of first eigenvectors to predict the detection accuracy value label of the optical flow algorithm in a complex wind field environment as the prediction target, and takes minimizing the sum of the prediction errors of the detection accuracy value labels of all optical flow algorithms in a complex wind field environment as the training target. The machine learning model is trained until the sum of the prediction errors converges, and the model training is stopped. The detection accuracy value of the optical flow algorithm in a complex wind field environment is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
7. The method for identifying forest fire prevention using a drone based on machine vision according to claim 6, characterized in that: The acquired detection accuracy value of the optical flow algorithm in a complex wind field environment is compared with the pre-set reference threshold of the detection accuracy value of the optical flow algorithm in a complex wind field environment. If the detection accuracy value of the optical flow algorithm in the complex wind field environment is greater than or equal to the reference threshold of the detection accuracy value, it means that the detection accuracy of the optical flow algorithm in the complex wind field environment is high. At this time, an accurate detection signal is generated and it is classified as an accurate detection; if the detection accuracy value of the optical flow algorithm in the complex wind field environment is less than the reference threshold of the detection accuracy value, it means that the detection accuracy of the optical flow algorithm in the complex wind field environment is low. At this time, an inaccurate detection signal is generated and it is classified as an inaccurate detection.
8. The method for identifying forest fire prevention using a drone based on machine vision according to claim 7, characterized in that: In S6, for accurate detection, the detected smoke movement pattern is compared with historical fire data to identify whether it is an early stage of fire, specifically: Smoke movement pattern data obtained from detection, direction vector : Indicates the direction of smoke movement; velocity vector : Indicates the speed of smoke movement; acceleration : The vertical acceleration of smoke during detection; The dataset contains typical smoke movement patterns from the early stages of past fires, including: historical direction vectors : The direction of smoke movement in the early stage of the fire, the historical velocity vector : Smoke velocity in the early stages of a fire; historical acceleration : acceleration of smoke in the early stage of fire; By calculating the angle θ between the actual direction vector and the historical direction vector, the directional consistency between the two can be calculated. The expression is: ; Calculate the speed similarity by calculating the difference between the actual speed and the historical speed , the expression is: ; Calculate acceleration consistency by calculating the difference between actual acceleration and historical acceleration , the expression is: ; Perform weighted summation to obtain a comprehensive similarity score ; By comparing the actual smoke diffusion speed and diffusion range, the matching degree with the early smoke characteristics of the fire is calculated. , the expression is: ;in, and are the diffusion characteristics in actual and historical data, respectively; The comprehensive similarity score Diffusion mode matching Compare with their corresponding thresholds respectively: if Greater than or equal to the similarity threshold and If the smoke movement pattern is less than or equal to the diffusion pattern matching threshold, the smoke movement pattern is judged to be in the early stage of fire; Less than the similarity threshold and If it is greater than the diffusion pattern matching threshold, it is judged that the smoke is not a fire feature.
9. The method for identifying forest fire prevention using a drone based on machine vision according to claim 8, characterized in that: For inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted according to the analysis results to improve the detection accuracy; When the detection accuracy value generated in a fixed time period is less than the reference threshold of the detection accuracy value, the detection accuracy of the optical flow algorithm in a complex wind field environment is classified as inaccurate detection, and the detection accuracy values generated in subsequent fixed time periods that are less than the reference threshold of the detection accuracy value are collected, and a corresponding data set is established. After analyzing it, the abnormal degree of the detection accuracy of the optical flow algorithm in the subsequent fixed time period is determined, and the motion detection threshold of the optical flow algorithm is dynamically adjusted to improve the detection accuracy; If the mean of the detection accuracy values in the data set is greater than or equal to the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is less than the reference threshold of the standard deviation of the detection accuracy values, the detection is accurate and stable and no adjustment is required; if the mean of the detection accuracy values is greater than or equal to the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is greater than or equal to the reference threshold of the standard deviation of the detection accuracy values, the detection is generally accurate but fluctuates greatly, and it is necessary to analyze environmental changes and dynamically adjust the threshold; if the mean of the detection accuracy values is less than the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is greater than or equal to the reference threshold of the standard deviation of the detection accuracy values, the detection is inaccurate and fluctuates greatly, and the threshold needs to be adjusted to introduce environmental data compensation; if the mean of the detection accuracy values is less than the reference threshold of the mean of the detection accuracy values, and the standard deviation of the detection accuracy values is less than the reference threshold of the standard deviation of the detection accuracy values, the detection is continuously inaccurate but stable, and the threshold needs to be adjusted to optimize the detection accuracy.
10. A UAV forest fire identification system based on machine vision, used to implement a UAV forest fire identification method based on machine vision according to any one of claims 1 to 9, characterized in that: It includes data acquisition module, data comparison module, smoke rise analysis module, vector feature analysis module, detection accuracy evaluation module and identification and optimization module; Data acquisition module: Several sensors are deployed in the fire monitoring area to collect wind speed and direction data in the environment in real time. Continuous image frames are collected by drones, and the optical flow algorithm is used to analyze the pixel motion in the continuous image frames to generate the motion vector of the smoke; Data comparison module: compares the collected wind speed and direction data with the smoke motion vector detected by the optical flow algorithm to analyze whether the movement trend of the smoke is consistent, and divides it into consistent motion and inconsistent motion according to the analysis results; Smoke rise analysis module: For inconsistent motion, analyze the distortion state of smoke during vertical motion, determine the fluctuation range of smoke deviation from the normal rise mode, and evaluate the abnormal degree of smoke vertical rise trend; Vector feature analysis module: compares and analyzes the smoke motion vector calculated by the optical flow algorithm with the system's built-in early-stage fire smoke feature model to determine the data deviation between the actual smoke motion vector and the predicted vector by the early-stage fire smoke feature model, and evaluates the degree of interference of environmental factors on smoke motion; Detection accuracy evaluation module: Comprehensively analyzes the abnormal degree of smoke vertical rising trend and the degree of interference of environmental factors on smoke movement, evaluates the detection accuracy of the optical flow algorithm in a complex wind field environment, and divides it into accurate detection and inaccurate detection according to the evaluation results; Identification and optimization module: For accurate detection, the detected smoke motion pattern is compared with historical fire data to identify whether it is the early stage of a fire; for inaccurate detection, the detection accuracy of the optical flow algorithm is further analyzed, and the motion detection threshold of the optical flow algorithm is dynamically adjusted based on the analysis results to improve detection accuracy.
Citation Information
Patent Citations
Fire detection apparatus, method for evaluating at least one fire detection feature and computer program
US20160063832A1
System and method for the early visual detection of forest fires using a deep convolutional neural network
US20210192175A1
