A real-time detection method for flame heat flux based on machine vision and support vector machine
Through the flame heat flow detection method based on machine vision and support vector machine, the relationship between the flame pixel ratio and the heat flow is established, and the problem of high temperature failure of the heat flow meter in the fire field is solved, and accurate detection of the heat flow in the fire field is achieved, which improves the speed and accuracy of the fire field situation analysis and judgment.
Patent Information
- Application Number
- CN202111586042.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-12-20
AI Technical Summary
It is difficult for the prior art to obtain the flame heat flow in a precise and accurate manner in the fire field. Traditional heat flow meters are unable to meet the needs of fire rescue due to high temperature failure and high cost.
The flame heat flow detection method based on machine vision and support vector machine is adopted, and the intrinsic relationship between flame pixel ratio and heat flow is established through the preprocessing of flame video data and the training of support vector machine model to achieve real-time heat flow prediction.
It solves the problem of high temperature failure of the heat flow meter in the fire field, reduces the difficulty of obtaining fire heat flow, improves the speed and accuracy of the fire situation analysis, and can provide reliable heat flow measurement data within a few seconds.
Smart Images

Figure CN114255446B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a real-time detection method for flame heat flux based on machine vision and support vector machine, belonging to the technical field of fire protection engineering. Background Art
[0002] After a fire occurs, thermal radiation and thermal convection are the main ways of heat transfer, posing a major threat to surrounding combustibles and firefighters. In order to minimize the ignition of surrounding combustibles and ensure the personal safety of firefighters, it is of great significance to conduct computational research on the real-time acquisition of total heat flux. Since the heat flux can describe the danger level of a disaster, heat flux has always been the key to characterizing the development trend of a fire.
[0003] Many researchers at home and abroad are committed to the theoretical calculation and model derivation of the thermal radiation of a single steady-state flame. Some researchers uniformly assume the flame to be in a fixed shape (such as a cylinder) and estimate the surface radiation amount of the flame to surrounding targets. There are also some researchers who continuously change the fire scene and calculate the heat radiation fluxes caused by pool fires, oil tank fires, building fires, etc. However, it is very difficult for either small-scale experiments conducted in the laboratory or model derivations obtained through numerical simulation research to be effective in an actual fire scene. Although there are heat flux meters on the market that can measure thermal radiation at present, the heat flux meters are expensive and easily damaged by high temperatures. To ensure the accuracy of measurement data, cooling water needs to be continuously used for cooling during measurement, which does not conform to the actual situation of fire field rescue.
[0004] In recent years, machine learning has developed rapidly in various fields, and many researchers in the field of fire have started cross-research on machine learning and fire science. Machine learning can make up for the simulation time of numerical models that lasts for dozens or even hundreds of hours, and use the prediction model obtained through training optimization to predict relevant values within seconds, meeting the need for real-time parameter acquisition and fire situation prediction in a fire field. At present, the focus of computer intelligent methods in the field of fire is mainly on fire detection and smoke detection. There are also many researchers who have turned their attention to the main factors affecting the development of a fire situation, established a large database of different fire scenes through CFD numerical simulation, established multiple coupling relationships between features and labels, and trained to obtain corresponding fire parameter prediction models, which can predict the fire source location, temperature distribution, smoke diffusion, etc. High-precision fire parameter prediction models play a key role in improving the emergency rescue response ability to a fire. However, there is less research on the real-time prediction of flame heat flux using computer image processing technology and machine learning at present. Summary of the Invention
[0005] Fire is one of the main disasters that most frequently and commonly threaten public safety and social development. In the field of fire protection, traditional shallow, experience-based and observation-based disaster analysis methods are no longer sufficient to ensure rescue safety. There is an urgent need for a set of intelligent, in-depth and scientific disaster analysis methods. In view of the randomness, contingency and dynamics presented by the actual development of a fire, based on existing image monitoring equipment and fire-fighting mobile image acquisition equipment, combined with the basic science of fire dynamics, the technical bottleneck of three-dimensional fire disaster presentation is broken through, and an intelligent fire situation prediction method is proposed to realize real-time assessment of fire risk. Therefore, the present invention proposes a method for detecting flame heat flux based on machine vision and support vector machines. Based on a series of image information of a flame video, the support vector machine algorithm is used to find the internal relationship between the pixel ratio occupied by the flame picture and the heat flux, and a prediction model for real-time detection of flame heat flux through flame video data is formed, solving the problem of the heat flow meter failing due to high temperature in the fire field, reducing the difficulty of obtaining fire heat flux in the actual fire field, and improving the speed and accuracy of fire situation judgment in the fire field.
[0006] The present invention discloses a method for real-time detecting flame heat flux based on machine vision and support vector machines, which includes S1: collecting a flame video; S2: preprocessing the flame video; S3: calculating the proportion of flame pixels; S4: constructing a data set; S5: training a support vector machine model; S6: outputting the real-time heat flux value of the flame. Each of the above steps is specifically as follows:
[0007] S1. Collecting a flame video
[0008] A gas burner with adjustable gas (density ρ, heat of combustion ΔH) flow rate is set at the fire source position, and N kinds of fire sources with different gas flow rates (q1, q2... q N ) are set. With the same camera pose, the gas burner is ignited in a dark environment, and the camera exposure is adjusted so that the contour of the captured flame forms a high contrast with the surrounding environment as much as possible. The video shooting duration for each gas flow rate is T0, the video frame rate is p (p images are collected per second), and cameras are installed at M positions with different distances from the fire source. Repeat the above operations to collect flame videos;
[0009] S2. Preprocessing the flame video
[0010] The collected flame video data is transmitted into a computer. The video in the stable combustion stage of the flame is selected, and the duration is uniformly intercepted as T1, and the video is converted into p*T1 images according to the time sequence, with a total of N*M*p*T1 images;
[0011] S3. Calculating the proportion of flame pixels
[0012] For the kth (k = 1, 2... N) gas flow rate q k, convert all images from RGB space images to grayscale space images B k,0 , select a grayscale threshold I0 according to the grayscale difference between the flame and the background, set the pixels with grayscale values less than I0 to 0, and those greater than or equal to I0 to 1 to remove the influence of the surrounding environment and obtain a binary image B containing only the flame shape k,1 ; In the binary image B k,1 , traverse each pixel point to judge whether the grayscale of the pixel point is 0. If the value of the point is 0, judge that the point is the background. If the value of the point is 1, judge that the point is the flame, accumulate and record the number of pixel points occupied by the flame, and calculate the pixel ratio of the flame occupied in each image;
[0013] S4. Dataset construction
[0014] The measurement frequency of the heat flow meter is to record one every 1 second. The 25 images converted from a 1s video correspond to the same heat flow value. During the combustion process, the periodic oscillation of the flame causes the instability of the flame shape, resulting in a non-unique correspondence between the flame pixel ratio and the heat flow value. To eliminate the accidental influence brought by the rapid pulsation of the flame, match the continuous change characteristics of the flame pixel ratio within a period of time with the heat flow value. Select the flame pixel ratios calculated from 50 consecutive images in the dataset and sort them from small to large as a group of training features. The measured heat flow value is used as the training label corresponding to this group of training features. All the training features and training labels obtained at 15 different positions and 8 different gas flow rates correspond to form a dataset;
[0015] S5. Support vector machine model training
[0016] Input the dataset into the support vector machine classifier for training to obtain model Y;
[0017] S6. Output the real-time heat flow value of the flame
[0018] In a new scenario, repeat step S1 to collect the flame video data T3 (T3>T2) outside the dataset. Adopt steps S2 and S3 for video data processing. Select any flame video with a duration of T2, calculate and arrange p*T2 volume data according to step S4, and input it into model Y to detect the real-time heat flow value.
[0019] The advantages of the present invention are as follows:
[0020] The present invention proposes a new method for detecting the heat flow value of a flame, and establishes a "flame pixel ratio - real-time heat flow prediction model" by using a combustion experiment. The use of the image data processing method of machine vision increases the easy accessibility of data. Compared with using machine vision to detect the heat flux of a flame, its accuracy and real-time performance provide a very practical tool for fire fighting. Description of the drawings
[0021] Figure 1 This is the principle flow chart of the present invention;
[0022] Figure 2 This is the experimental design diagram for measuring heat flux at different positions from the fire source;
[0023] Figure 3 This is the prediction result of the test data set;
[0024] Figure 4 This is the error probability distribution diagram of the test data set. Specific embodiments
[0025] The technical solution of the present invention will be further described below in conjunction with the accompanying drawings.
[0026] The principle flow chart of the present invention is as Figure 1 shown. Among them, the collected flame video images are preprocessed to obtain the flame pixel ratio data and establish a database between the flame pixel ratio and the heat flux value. Then, a support vector machine is used to train the database to obtain the corresponding classification model, and the classification model can be used to predict the heat flux of the flame in real time according to the flame video data.
[0027] A propane gas combustion experiment is carried out to obtain the flame images at different positions from the fire source and the heat flux data at this point, and a real-time heat flux prediction model is established through the flame images. The experimental design diagram is as Figure 2 shown.
[0028] In the experiment, a circular propane gas burner with a diameter of 0.05 m is used, and transparent glass beads are laid at the bottom of the burner to ensure uniform diffusion of the gas fuel during outflow. In the experiment, the camera and the heat flux meter are arranged closely, and as much as possible, the heat flux acquisition window and the camera lens are on the same vertical plane and at the same height. During the experiment, the heat flux meter is continuously cooled by a water bucket and a water pipe to ensure the safety of the heat flux meter during use and the accuracy of the measurement results. A total of 15 points are set for the positions of the camera and the heat flux meter, and the distance from the center of the fire source is set in the range of 0.475 m - 2.725 m. The interval between every two points among points 1 - 11 is 0.125 m. Points 11 - 15 are farther from the fire source, and the gradient of the heat flux value change decreases, so the interval between every two points is 0.250 m. The gas flow rate is changed by 8 kinds at each position, the minimum gas flow rate is set to 8 L / min, the maximum gas flow rate is set to 22 L / min, and the change gradient is 2 L / min. The video data of 15 seconds in the stable combustion stage is collected for each working condition. The experimental working condition table is shown in Table 1.
[0029] Table 1 Heat flux measurement experimental working conditions
[0030]
[0031] In the propane gas combustion experiment, a CCD digital camera was used to capture the flame morphology. Its position was fixed by a tripod to ensure that the camera remained stable throughout the recording of the flame video. The resolution of the camera used in the experiment was 1920×1080, and the frame rate was 25 frames per second. The flame heat flux value was measured by a BST series dual-purpose heat flux sensor with a range of 50 kW / m 2 . This heat flux sensor combines a lumped heat flux sensor and a pure radiation heat flux sensor. The sensing elements of the two sensors are close to each other, which can better characterize the heat flux characteristics at the same point. The total heat flux and the pure radiation heat flux can be measured simultaneously, and the convective heat flux can be calculated from the former two.
[0032] After the experimental data was collected, the flame was extracted from the background by using the method of setting a gray threshold for screening. Observing the video data collected in the experiment, each 15-s flame video was converted into pictures at a frame rate of 25 frames / s. Python language was used to randomly read the gray value of one of the flame pictures to check the difference between the gray value of the flame area and the surrounding area.
[0033] Since the exposure was adjusted during shooting, the gray values of the background part in the pictures are all single digits, while the colors and brightness of different areas of the flame part are different, so the gray values are different, but all are greater than 10. Therefore, we set the gray threshold to 10, traversed each pixel point in the picture, and set the gray values less than 10 to zero. In this way, the flame and the background can be distinguished according to whether the gray value is zero when traversing the pixel points. The setting of the gray threshold tries to ensure the retention of the overall appearance of the flame.
[0034] Python was used to traverse each pixel point in the picture after gray screening to distinguish the flame from the background according to the gray value of the pixel point. The number of pixel points occupied by the flame part was calculated. The number of fire pixel points was divided by the total number of pixel points in a picture (1920×1080) to obtain the pixel ratio occupied by the flame.
[0035] The measurement frequency of the heat flux meter was to record one value every 1 second. The 25 pictures converted from a 1-s video corresponded to the same heat flux value. During the combustion process, the periodic oscillation of the flame caused the instability of the flame shape, resulting in a non-unique correspondence between the flame pixel ratio and the heat flux value. In order to eliminate the accidental influence brought by the rapid pulsation of the flame, the continuous change characteristics of the flame pixel ratio over a period of time were matched with the heat flux value.
[0036] Select 50 consecutive images from the dataset, calculate the flame pixel ratio, and sort it from smallest to largest as a set of training features. The measured heat flux value is used as the training label corresponding to this set of training features. All data obtained at 15 different positions and 8 different gas flow rates are processed to obtain the training dataset. In the MATLAB environment, the fine Gaussian SVM is selected as the classification algorithm for this experiment to train the heat flux prediction dataset, and the "flame pixel ratio - heat flux real-time prediction model" is optimized.
[0037] Re - intercept 3 - s flame video data from the experimental videos of working conditions 1 - 32. The processing method is the same as that of the training dataset. According to the training dataset format, a test dataset containing the training features of these 32 working conditions is made, with a total of 640 sets of sample numbers. Use the trained and optimized "flame pixel ratio - heat flux real - time prediction model" to predict the corresponding heat flux value according to the flame pixel ratio. The prediction results are as Figure 3 shown. The solid line in the figure represents the true value measured in the experiment, and the short dash line represents the predicted value obtained by the SVM classification model. The general trends of the two lines are consistent, and there are errors in some samples. Figure 4 shows the prediction error probability diagram of 640 sets of sample data. Among them, 19.7% (126 sets) of the sample data are predicted completely accurately, and 87.5% (560 sets) of the sample data have an error within 0.1 kW / m 2 , indicating that the model has a high prediction accuracy.
[0038] The real - time heat flux prediction model established by the support vector machine in the present invention uses the flame pixel ratio of 50 consecutive frames of images as features and the heat flux value as the label for training, with an accuracy rate of 95%. It can provide a reliable theoretical basis for real - fire heat flux measurement within seconds.
Claims
1. A real-time detection method for flame heat flux based on machine vision and support vector machine, characterized in that The method includes the following steps: S1: Collect the flame video; S2: Preprocess the flame video; S3: Calculate the proportion of flame pixels; S4: Construct the dataset; S5: Train the support vector machine model; S6: Output the real-time heat flux value of the flame; Among them, in the step S3, for the k-th gas flow rate q k , convert all images from RGB space images to grayscale space images B k,0 . Select a grayscale threshold I0 according to the grayscale difference between the flame and the background. Set the grayscale values of the pixel points less than I0 to 0, and the grayscale values greater than or equal to I0 to 1 to remove the influence of the surrounding environment and obtain a binary image B containing only the flame shape k,1 ; In the binary image B k,1 , traverse each pixel point to judge whether the grayscale value of the pixel point is 0. If the grayscale value of the pixel point is 0, judge that the pixel point is the background. If the grayscale value of the pixel point is 1, judge that the pixel point is the flame. Cumulatively record the number of pixel points occupied by the flame and calculate the pixel ratio occupied by the flame in each image, where k = 1, 2... N; In step S4, a heat flux meter is used to measure the heat flux value. The measurement frequency of the heat flux meter is to record one value every 1 second. The 25 images converted from a 1s video correspond to the same heat flux value. The continuous change characteristics of the proportion of flame pixels over a period of time are matched with the heat flux value. The proportion of flame pixels calculated from 50 consecutive images is sorted from small to large as a set of training features, and the measured heat flux value is used as the training label corresponding to this set of training features. All the training features and training labels obtained from 15 different positions and 8 different gas flow rates are corresponded to form a dataset; In step S5, the dataset is input into the support vector machine classifier for training to obtain model Y; In the step S6, repeat the step S1 in the new scenario to collect the flame video data with a duration of T3 outside the data set, and process the video data by using the steps S2 and S3. Select any flame video with a duration of T2, calculate and arrange the p T2 individual volume data, and input it into the model Y to detect the real-time heat flux value, where T3 > T2 and p is the video frame rate.
2. A real-time flame heat flux detection method based on machine vision and support vector machine according to claim 1, characterized in that: In step S1, a gas burner with adjustable gas flow rate is set at the fire source position, and N kinds of fire sources with different gas flow rates are set. With the same camera pose, the gas burner is ignited in a dark environment, and the camera exposure is adjusted so that the contour of the captured flame forms a high contrast with the surrounding environment as much as possible. The video shooting duration for each gas flow rate is T0, and cameras are installed at M positions with different distances from the fire source, and the operation of collecting the flame video is repeated.
3. A real-time flame heat flux detection method based on machine vision and support vector machine according to claim 2, characterized in that: In the step S2, the collected flame video data is transmitted to a computer, and the video in the stage of stable flame combustion is selected. The duration is uniformly intercepted as T1, and the video is converted into p T1 images in chronological order, with a total of N M p T1 images.