A flame detection method based on motion characteristics and color characteristics

Through the flame detection method based on motion characteristics and color characteristics, using video stream frame image filtering and color space characteristics, the problems of poor anti-interference ability and low recognition rate of flame detection algorithm in the prior art are solved, and the flame with high accuracy is achieved Test.

CN114639041BActive Publication Date: 2024-12-03NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Patent Information

Application Number
CN202210261065.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2024-12-03
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

The existing flame detection algorithm has poor anti-interference ability, poor scene adaptability, and low recognition rate. The deep learning algorithm is limited to static images and does not use context information, resulting in a high missed false alarm rate.

Method used

Using flame detection method based on motion characteristics and color characteristics, denoising, graying, differentiating and binarizing through video stream frame image filtering, recording the frequency of pixel value changes, blocking low-frequency regions, positioning high-frequency motion regions, and combining YCrCb Color space histogram features and RGB color features to realize flame target detection.

Benefits of technology

It effectively improves the anti-interference ability and scene adaptability of flame detection, reduces the rate of missed false alarms, and realizes high-accuracy flame detection indoors and outdoors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114639041B_ABST
    Figure CN114639041B_ABST
Patent Text Reader

Abstract

The present invention relates to a flame detection method based on motion features and color features, including: differentiating and binarizing two frames of a video frame grayscale image; continuously accumulating the number of changes in each pixel value to obtain a real-time high-frequency matrix; sampling and detecting the high-frequency matrix every k frames to detect a stable high-frequency source; accumulating the number of changes in each pixel value of the grayscale image in units of k frames, and only retaining active high-frequency motion target areas; comparing with the unit motion target area of ​​the previous k frames, detecting active motion target areas with large motion amplitudes; detecting the YCrCb flame histogram features of the above-mentioned area of ​​the current frame; if they meet, if the pixel proportion of the flame RGB color feature exceeds a threshold, the target area is judged to be a flame. The present invention can solve the problems of poor anti-interference ability and scene adaptability of traditional algorithms, low recognition rate, and high false alarm rate caused by the deep learning algorithm being limited to static images, not using contextual information, and sample quantity limitation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of flame target detection, and in particular to a flame detection method based on motion characteristics and color characteristics. Background Art

[0002] Fire is one of the most frequent disasters in the world. It spreads quickly and is highly destructive, causing great losses to people's lives and property. It is a very challenging task to detect fires in time and extinguish them in the early stages. Alarm systems based on fire and smoke sensors have been widely used and work relatively reliably, but the inherent slow response problem of point sensors often leads to delayed reporting; sensor fire and smoke detection is mostly used in small indoor spaces and is not suitable for large spaces. Video based Fire & Smoke Detection (VFSD) can effectively solve the above problems and realize real-time fire detection suitable for almost any occasion, and can provide important details such as the location, size, and spread direction of the fire in real time. With the popularization and application of video surveillance, VFSD technology has received more and more attention and has gradually been promoted and applied.

[0003] A complete flame recognition system mainly includes six links: image acquisition, image preprocessing, flame image segmentation, flame image feature extraction, flame tracking, and flame recognition. Flame image segmentation, flame image features, and flame recognition are the core technical links of the system. Most existing algorithms achieve segmentation based on the color and motion features of the flame, extract static information such as color, texture, shape, edge gradient, and dynamic features such as area change, stroboscopic features, motion direction, and shape change of the target area of ​​interest, and use multi-feature fusion or classifier classification to achieve flame recognition. Commonly used classifiers include support vector machine (SVM), Bayesian classifier, Adaboost, etc. The recognition rate of existing algorithms is generally not high and lacks adaptability to the scene. One important reason is that the extracted flame features cannot well reflect the essence of the flame.

[0004] In recent years, with the rapid development of deep learning, researchers have applied some typical convolutional neural network (CNN) models to achieve end-to-end flame detection, such as AlexNet, VGGNet, GoogleNet, ResNet, LeNet, etc. Existing flame detection algorithms based on deep learning are all based on static image classification, and if the amount of sample data is limited, the deep learning algorithm cannot achieve good accuracy, resulting in a high false alarm rate. Summary of the invention

[0005] The purpose of the present invention is to provide a flame detection method based on motion features and color features, which can effectively solve the problems of poor anti-interference ability and scene adaptability of traditional algorithms, low recognition rate, and high false alarm rate caused by the deep learning algorithm being limited to static images, not utilizing contextual information, and limited sample quantity.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] A flame detection method based on motion characteristics and color characteristics mainly includes the following steps:

[0008] Active high frequency motion area detection

[0009] S1. Filter, denoise and grayscale the video stream frame image, differentiate the two frames and perform 0 / 1 binarization on the differential image based on the threshold to obtain the pixel value change area;

[0010] S2. Record the cumulative number of changes in the value of each pixel of the grayscale image of the full-time video frame to obtain a change frequency matrix, shield the low-frequency area, and obtain a real-time high-frequency matrix; sample the high-frequency matrix every k frames, compare the changes in the high-frequency areas sampled before and after, and determine whether there is a stable high-frequency motion area based on the area change rate threshold, that is, a global high-frequency source;

[0011] S3. Take k frames as a unit, record the cumulative number of changes in the value of each pixel point of the k-frame grayscale image, obtain the k-frame change frequency matrix in real time, shield the low-frequency area, obtain the high-frequency motion target area, and only retain the motion target area that overlaps with the global high-frequency source, that is, the active high-frequency motion target area.

[0012] Flame area detection based on joint features

[0013] S4. Compare with the previous (k frame) unit to detect the active high-frequency motion target area with a large change amplitude in the current unit;

[0014] S5. For the obtained active moving target area with a large change, YCrCb color space histogram feature detection is performed one by one on the corresponding area of ​​the current frame image;

[0015] S6. For each moving target area that meets the flame histogram characteristics, the percentage of pixels that meet the flame RGB color characteristics is counted;

[0016] S7. If the proportion of the number of pixels that meet the flame RGB color characteristics exceeds a threshold, the corresponding target area is determined to be a flame.

[0017] Among them, in the difference between two frames and the binarization of the differential image, if the absolute value of the differential value of a certain pixel exceeds a certain threshold, it is considered that the value of the pixel has changed once.

[0018] The flame detection method based on motion features and color features provided in the above technical solution performs real-time flame detection based on video streams, and performs detection in combination with the motion features and color features of flames; along the time axis direction, based on the frequency statistics of image pixel value changes of the full duration, the stable global high-frequency motion area is located; based on the frequency statistics of image pixel value changes of the segmented duration, the real-time motion target area is located, and the active motion target area is obtained based on whether it overlaps with the global high-frequency motion area as the screening principle; for the active motion target area, the motion amplitude (area change amplitude) of the target area, the YCrCb color histogram features, and the RGB color features are combined to realize the detection of the flame target area; the flame detection method based on motion features and color features of the present invention effectively solves the problems of poor anti-interference ability, poor scene adaptability, and low recognition rate of traditional algorithms, and the problem of high false alarm rate caused by the deep learning algorithm being limited to static images, not fully utilizing contextual information, and being constrained by the number of samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flow chart of the flame detection method based on motion characteristics and color characteristics of the present invention;

[0020] Figure 2 It is a detailed flow chart of the flame detection method based on motion characteristics and color characteristics of the present invention;

[0021] Figure 3 A calculation block diagram of active high-frequency motion area detection of the present invention;

[0022] Figure 4 It is the active high-frequency motion area detection map;

[0023] Figure 5 It is a calculation block diagram of flame area detection based on joint features of the present invention;

[0024] Figure 6 It is the flame area diagram of the present invention;

[0025] Figure 7 for Figure 6 Normalized histogram of YCrCb color space of the flame area;

[0026] Figure 8 This is flame detection example 1 of the present invention;

[0027] Fig. 9 This is flame detection example 2 of the present invention;

[0028] Fig.10 This is flame detection example 3 of the present invention;

[0029] Fig.11This is flame detection example 4 of the present invention. DETAILED DESCRIPTION

[0030] In order to make the purpose and advantages of the present invention more clearly understood, the present invention is specifically described below in conjunction with embodiments. It should be understood that the following text is only used to describe one or several specific embodiments of the present invention, and does not strictly limit the scope of protection of the specific claims of the present invention.

[0031] The technical solution adopted by the present invention is as follows Figures 1 to 11 As shown, a flame detection method based on motion features and color features includes active high-frequency motion area detection and flame recognition based on joint features;

[0032] The active high-frequency motion area detection block diagram is as follows Figure 3 As shown, the specific steps include:

[0033] (1) 0 / 1 Binarization of Difference Image

[0034] Assume that the RGB images of the i-1th frame and the i-th frame of the video stream after filtering and denoising are I i-1 with I i , the grayscale images are G i-1 With G i , the difference image between the two frames is D = abs(G i -G i-1 ), where abs() is the absolute value function. Set the threshold t d , for D=(d ij ) to perform 0 / 1 binarization:

[0035]

[0036] (2) Calculate the full-time cumulative frequency matrix and the unit frequency matrix, and sample at k-frame intervals:

[0037] Assume that the current frame is the i-th frame, and the 0 / 1 binary image of the difference image between the j-1-th frame and the j-th frame is D j , the frequency matrix of the current full-time accumulation is B i and the k-frame cumulative frequency matrix A i They are:

[0038]

[0039]

[0040] Since this embodiment uses k frames as an accumulation calculation unit, for B i With A i The samples are taken once every k frames, A iAfter sampling, it can be cleared and continue to participate in the accumulation of the subsequent k frames. For the sampling sequence (0, 1, ..., m, ... n-1, n), the corresponding sampling frame sequence number nodes are (k-1, 2k-1, ..., (m+1)k-1, ...nk-1, (n+1)k-1). For the nth sampling, let the current frame sequence number be i, and it is obvious that i = (n+1)k-1, n = i|k to obtain B i , A i Respectively expressed as:

[0041]

[0042]

[0043] (3) Obtain the sampling matrix B (n+1)k-1 With A (n+1)k-1 High frequency area

[0044] Adopt the adaptive threshold method to shield the low-frequency area and obtain the high-frequency area: for a certain frequency matrix, obtain the maximum value of all elements of the matrix, that is, the highest frequency m. Given the control coefficient β, the threshold is t = βm. The empirical value range of β is [0.4, 0.8].

[0045] For the sake of clarity, let B obtained by the nth sampling be i With A i (i.e. B (n+1)k-1 With A (n+1)k-1) , the matrices after shielding the low-frequency area are expressed as and Based on the adaptive threshold, and Perform 0 / 1 binarization:

[0046]

[0047] Respectively and are the global high frequency matrix and the local high frequency matrix.

[0048] (4) Obtaining a globally stable high-frequency source

[0049] Assume that the global high frequency matrices of the current unit and the previous unit are and Apply the difference between the two to obtain the changed area, and apply the changed area area and The stability of the high-frequency source is measured by the area ratio of the high-frequency region:

[0050] because and They are all 0 / 1 matrices, and the difference matrix can be obtained by XOR operation:

[0051]

[0052] Get the percentage of changed area:

[0053]

[0054] Given a threshold t b , if r b <t b , then it is considered that a globally stable high-frequency source is obtained. The non-zero area in represents the stable high-frequency source area. Before the next sampling, it should be updated in time. That is In preparation for the next sampling comparison. When there are high-frequency areas in the All elements and set a fixed threshold to further enhance the robustness of the decision.

[0055] Sampling at intervals of k frames, using the frequency matrix accumulated by k frames to replace the current video frame image, and judging the motion area in a statistical way has the following advantages: the frequency statistical matrix that shields low-frequency information has high robustness to low-frequency interference factors such as noise, lighting changes, low-frequency moving targets, translational targets, camera jitter and picture changes caused by slow movement; motion detection based on the high-frequency statistical matrix has higher confidence than motion detection based solely on video images; more obvious changes in motion areas can be detected at intervals of k frames; through experimental tests, if the value of k is in a reasonable range (such as 5-8), the motion area detected by the local high-frequency matrix accumulated by k frames has no obvious deviation from the motion area obtained based on the difference of video images, that is, the frequency matrix accumulated by k frames can be used to replace video images for motion detection.

[0056] (5) Active high-frequency motion area detection

[0057] After a stable high frequency source is detected, Perform moving target detection, and further detect moving targets that overlap with high-frequency sources and regard them as active moving targets. It is a high-frequency 0 / 1 binary matrix that masks low-frequency information and can be directly used for The region with the element value of 1 (high frequency region) is connected to obtain a series of motion target regions:

[0058]

[0059] Where ccl() represents the binary image region connectivity operation. c is the label sequence number of the connected region; L represents The label annotation matrix is Same size, by A matrix consisting of the label values ​​of the connected regions to which each element corresponds; s is the element subscript set sequence of each connected region corresponding to the label, and a is the total number of elements in each connected region (region area).

[0060] L and the global high frequency matrix Corresponding to the element-wise product (i.e., Hadamard product), labels that do not belong to high-frequency sources will be blocked:

[0061]

[0062] Where ⊙ is the Hadamard product symbol. Count the number of non-repeated labels in H:

[0063]

[0064] Among them, unique() is an operation to find non-duplicate element values. corresponds to c * The connected area with the series label number is regarded as the active motion target area.

[0065] like Figure 4 As shown in the figure, 5 frames are a sampling unit. The moving target manually marked with a green rectangle is a walking firefighter, and the red rectangle is the automatically detected flame area. It can be seen that the global high-frequency image b (high-frequency source) highlights the flame target with global high-frequency vibration and shields the pedestrian. The local high-frequency image c with 5 frames as a unit captures the flame and pedestrian targets. Since the video is shot in motion and the picture is changing continuously, the local high-frequency image is also subject to certain interference, but these interference factors are shielded by the high-frequency source image. Based on the high-frequency source image b, multiple active high-frequency motion areas d (flame areas marked with red rectangles) are accurately judged.

[0066] The flame recognition block diagram based on joint features is as follows Figure 5 As shown, the specific steps include:

[0067] (1) Motion amplitude detection of each active target area

[0068] Assume that the local high frequency matrices of the current unit and the previous unit are and get and Difference Matrix:

[0069]

[0070] Where: is the XOR operator, A * It is a 0 / 1 logic matrix.

[0071] renew That is In preparation for the next sampling comparison. In the previous calculation module, Tag sequence c * The corresponding connected area is the active motion target area. * Any tag set up is the element subscript set corresponding to the connected area, is the total number of elements in the corresponding connected region ( area), we apply the difference matrix A * Corresponding The number of non-zero elements in the region is relative to The proportion of the area to describe the active motion area The real-time motion amplitude of the current area Relative to the previous unit In the same area, the proportion of the area that has changed is:

[0072]

[0073] Set the threshold t s , if r s >t s , then it is believed that There have been major changes in movement in the region.

[0074] (2) Flame YCrCb histogram feature analysis

[0075] Image I i Convert image from RGB color space to YCrCb color space (For the conversion algorithm, please refer to CAPoynton. A Technical Introduction to Digital Video [M]. Wiley, New York, 1996). Experiments show that the pixel values ​​of the YCrCb image in the flame area cannot stably present the features such as Y>Cb, Cr>Cb described in many literatures (①T. Celik, H. Demirel Fire. Fire detection in video sequences using a generic color model [J], Fire Safety Journal. 2009, 44: 147–158. ②Cao Jiangtao, Qin Yueyan, Ji Xiaofei. A review of video-based flame detection algorithms [J], Data Acquisition and Processing, 2020, 35 (1): 35-52.). Our research found that the normalized histogram of the flame area presents the following stable statistical characteristics (such as Figure 6 and Figure 7 As shown, for the convenience of writing, Figure 7 The displayed histogram refers to the normalized bins along the x-axis as the range, and the normalized statistical results of each bin along the y-axis as the amplitude):

[0076] ① The value range distribution intervals of Cr and Cb components (non-0) have a relatively stable position relationship: the starting position of the Cr value range interval is greater than the starting position of the Cb value range interval, and at the same time, the ending position of the Cr value range interval is greater than the ending position of the Cb value range interval;

[0077] ② There are two situations in which the range of Cr and Cb values ​​are crossed or not crossed, but there is no interval inclusion phenomenon. For the crossing phenomenon, the range width of the crossing area is smaller than the smallest range width of Cr and Cb;

[0078] ③The ratio of the maximum amplitude of Cr and Cb to the width of the value range distribution, that is, the height-to-width ratio of the envelope rectangle of the distribution curve of each component of the normalized histogram, is generally much less than 0.5.

[0079] The YCrCb normalized histogram is obtained in the following way: Based on the normalized YCrCb image, Divide into 256 bins and perform histogram statistics; divide the statistical results by the area (number of pixels) of the statistical region to achieve normalization. Active motion area If it is determined to be a large-scale motion area, then obtain exist In the corresponding area, perform YCrCb normalized histogram statistics:

[0080] Get exist The maximum amplitude m of the normalized histogram of Cr and Cb in the corresponding area cr With m cb , and the range distribution interval Cr[v cr1 , v cr2 ] and Cb[v cb1 , v cb2 ], calculate the following parameters:

[0081] ①Cr range width: w cr =v cr2 -v cr1

[0082] ②Cb range width: w cb =v cb2 -v cb1

[0083] ③Minimum range width: w min =min(w cr , w b )

[0084] ④The end position of the interval closest to the origin of Cr / Cb: v e =min(v cr2 , v cb2 )

[0085] ⑤The starting position of the interval farthest from the origin of Cr / Cb: v s =max(v cr1 , v cb1 )

[0086] ⑥ Intersection width of Cr and Cb value range: w cr∩cb =v e -v s

[0087] Make the following conditional judgments:

[0088] ① Is the intersection width of the Cr / Cb value range less than the minimum value range width in Cr / Cb?

[0089] b w =is(w cr∩cb <w min )

[0090] ②Whether the ratio of Cr / Cb amplitude to range width is less than 0.5:

[0091]

[0092] ③Whether the Cr / Cb range distribution satisfies the above position relationship:

[0093] b v =is(v cr1>v cb1 and vr2 >v cb2 )

[0094] Among them, is() represents logical judgment. If the condition is true, it returns True, otherwise it returns False. If all three conditions are True, that is, b=b w ∧b m ∧b v = True (∧ indicates logical AND), then the region Satisfy the flame histogram characteristics.

[0095] Figure 7 YCrCb histogram of the flame area: Cr value range width w cr =0.20, Cb range width w cb =0.34w cb =0.25, minimum range width w min =0.20, intersection width of Cr and Cb ranges w cr∩cb =-0.01 (no crossover), ratio of Cr amplitude to range width m cr / w cr =0.079m cr / w cr =0.37, the ratio of Cb amplitude to range width m cb / w cb =0.091m cb / w cb =0.19. Figure 6 The green marked area is the pixel with flame RGB features.

[0096] (3) Flame RGB color characteristics

[0097] right The area that meets the large-scale motion characteristics and YCrCb histogram characteristics Confirm the RGB color features. A more common solution is adopted (Norsyahirah Z etc., Fire recognition using RGB and YCbCr color space, NARPN Journal of Engineering and Applied Sciences [J]. 2015, 10 (21): 9785-9790), that is, the RGB values ​​of some flame image pixels satisfy the following relationship:

[0098] ①R>G>B

[0099] ②R>R mean and G>G mean and B<Bmean

[0100] Where R mean , G mean , B mean Here we use the local mean to replace the global mean, forming a more stringent judgment condition: Calculate the RGB image I i In, corresponding The RGB mean value r of the pixels in the minimum bounding rectangle area m ,g m ,b m , Statistics I i middle Within the region (Note: area, not the area enclosed by its bounding rectangle) that simultaneously satisfies the following conditions:

[0101] ①r>g>b

[0102] ②r>r m and g>g m and b<b m

[0103] set up The number of pixels in the area is The number of pixels that meet the conditions is n, and the proportion is calculated Set the threshold t c , if r c >t c , then make the final decision, thinking The flame area.

[0104] Experimental Results

[0105] The results show that the method of the present invention can achieve flame detection with high accuracy both indoors and outdoors. Several algorithms were selected from some algorithms in recent years (Liping Z, Hongqi L, Fenghui W, Jie L, Ali S, Hong ZA flame detection method based on novel gradient features. J Intell Syst 2018, 29(1): 773–786. https: / / doi.org / 10.1515 / jisys-2017-0562; Gong F, Li C, Gong W, Li X, YuanX, Ma Y, Song TA real-time fire detection method from video with multifeaturefusion. Comput Intell Neurosci. 2019. https: / / doi.org / 10.1155 / 2019 / 1939171; JiangX, Hu C, Fan Z, Zhang P. Research on flame detection method by fusionfeature andsparse representation classification. Int J Comput Commun Eng 2015, 5(4): 238–245; PREMAC E, VINSLEY S, SURESH S. Efficient flame detection based on static and dynamic texture analysis in forest fire detection [J]. Fire Technololy, 2018, 10 (54): 255-288.) conducted a preliminary comparative test, and the results showed that this algorithm has certain advantages. The CNN framework algorithm has different implementation principles. The existing flame detection algorithms based on deep learning are basically end-to-end mode, based on image classification rather than continuous detection of video streams, and are seriously affected by factors such as the type, quantity, and quality of training data sets. The generalization still needs to be improved. Therefore, the CNN framework algorithm is not comparable and no comparison was made. Some experimental results Figures 8 to 11 As shown (sampling interval 5 frames). Figure 8 The original video comes from the flame recognition laboratory dataset of Keimyung University in South Korea (URL http: / / cvpr.kmu.ac.kr ), Figures 9 to 11 The original videos are from the video library website https: / / pixabay.com . Figures 9 to 11 The original videos are all shot in motion, and the scenes are continuously shaking and moving, which causes great interference. However, the present invention can still obtain relatively accurate detection results.

[0106] Table 1 System flow chart mathematical symbols

[0107]

[0108]

[0109] The above table explains the flowchart symbols in the accompanying drawings of the specification.

[0110] The implementation modes of the present invention are described in detail above in conjunction with the embodiments, but the present invention is not limited to the above-mentioned implementation modes. For ordinary technicians in this technical field, after knowing the contents recorded in the present invention, they can make several equivalent changes and substitutions thereto without departing from the principle of the present invention, and these equivalent changes and substitutions should also be regarded as belonging to the protection scope of the present invention.

Claims

1. A flame detection method based on motion characteristics and color characteristics, characterized in that: The main steps include: Active high frequency motion area detection S1. Filter, denoise and grayscale the video stream frame image, differentiate the two frames and perform 0 / 1 binarization on the differential image based on the threshold to obtain the pixel value change area; S2. Record the cumulative number of changes in the value of each pixel of the grayscale image of the full-time video frame to obtain a change frequency matrix, shield the low-frequency area, and obtain a real-time high-frequency matrix; sample the high-frequency matrix every k frames, compare the changes in the high-frequency areas sampled before and after, and determine whether there is a stable high-frequency motion area based on the area change rate threshold, that is, a global high-frequency source; S3. Taking k frames as a unit, record the cumulative number of changes of each pixel value of the k-frame grayscale image, obtain the k-frame change frequency matrix in real time, shield the low-frequency area, obtain the high-frequency moving target area, and only retain the moving target area that overlaps with the global high-frequency source, that is, the active high-frequency moving target area; Flame area detection based on joint features S4. Compare with the previous k frame units to detect the active high-frequency motion target area with a large change amplitude in the current unit; S5. For the obtained active moving target area with a large change, YCrCb color histogram feature detection is performed one by one on the corresponding area of ​​the current frame image; S6. For each moving target area that meets the flame histogram characteristics, the percentage of pixels that meet the flame RGB color characteristics is counted; S7. If the proportion of pixels that meet the flame RGB color characteristics exceeds the threshold, the corresponding target area is determined to be a flame; Among them, the active high-frequency motion area detection specifically includes the following steps: (1) 0 / 1 binarization of the difference image: Assume that the RGB images of the i-1th frame and the i-th frame of the video stream after filtering and denoising are I i-1 with I i , the grayscale images are G i-1 With G i ; The difference image between the two frames is D = abs(G i -G i-1 ), where abs() is the absolute value function; Set the threshold t d , for D=(d ii ) to perform 0 / 1 binarization: (2) Calculate the full-time cumulative frequency matrix and the unit frequency matrix, and sample at k-frame intervals: Assume that the current frame is the i-th frame, and the 0 / 1 binary image of the difference image between the j-1-th frame and the j-th frame is D j , the frequency matrix of the current full-time accumulation is B i and the k-frame cumulative frequency matrix A i They are: Take k frames as an accumulation calculation unit, and calculate B i With A i The samples are taken once every k frames, A i After sampling, it can be cleared and continue to participate in the accumulation of the subsequent k frames; for the sampling sequence (0, 1, ..., m, ... n-1, n), the sampled frame sequence number nodes are (k-1, 2k-1, ..., (m+1)k-1, ...nk-1, (n+1)k-1); for the nth sampling, let the current frame sequence number be i, obviously i = (n+1)k-1, n = i|k, and the obtained B i , A i Respectively expressed as: (3) Obtain the sampling matrix B (n+1)k-1 With A (n+1)k-1 High frequency areas: Assume that B obtained by the nth sampling (n+1)k-1 With A (n+1)k-1 For B i and A i , the matrices after shielding the low-frequency area are expressed as and Based on the adaptive threshold, and Perform 0 / 1 binarization: Respectively and are the global high frequency matrix and the local high frequency matrix; Among them, m b For B i The maximum value of the matrix element, that is, the maximum frequency; m a A i The maximum value of the matrix element, that is, the maximum frequency; β b To shield B i Control coefficient of low-frequency elements; β a To shield A i Control coefficient of low-frequency elements; (4) Obtaining a globally stable high-frequency source: Assume that the global high frequency matrices of the current unit and the previous unit are and Apply the difference between the two to obtain the changed area, and apply the changed area area and The high-frequency area ratio is used to measure the stability of the high-frequency source; and The difference matrix between the two is: Get the percentage of changed area: Given a threshold t b , if r b <t b , then it is considered that a globally stable high-frequency source is obtained. The non-zero area in represents the stable high-frequency source area; before the next sampling, update That is In preparation for the next sampling comparison; (5) Active high-frequency motion area detection: After a stable high frequency source is detected, Perform moving target detection, and further detect and obtain moving targets with overlapping areas with high-frequency sources, and regard them as active moving targets; wherein It is a high-frequency 0 / 1 binary matrix that masks low-frequency information. Perform regional connectivity operations on the high-frequency regions in the image to obtain a series of moving target regions: Among them, ccl() represents the binary image region connectivity operation; c is the label sequence number of the connected region; L represents The label annotation matrix is Same size, by The matrix consists of the label values ​​of the connected regions to which each element corresponds; s is the element subscript set sequence of each connected region corresponding to the label; a is the total number of elements of each connected region; L and the global high frequency matrix Corresponding to the element-wise product, labels that do not belong to the high-frequency source will be masked: Where ⊙ is the Hadamard product symbol; count the non-repeating label numbers in H: Among them, unique() is an operation to find non-repeated element values; The connected area corresponding to the series label number in c* is regarded as the active motion target area.

2. The flame detection method based on motion characteristics and color characteristics according to claim 1 is characterized in that: The flame area detection based on joint features specifically includes the following steps: (1) Motion amplitude detection of each active target area: Assume that the local high frequency matrices of the current unit and the previous unit are and get and Difference Matrix: In the formula, is the XOR operator, A * It is a 0 / 1 logic matrix; renew That is In preparation for the next sampling comparison; in the previous calculation module, Tag sequence c * The corresponding connected area is the active motion target area; For c * Any tag set up is the element subscript set corresponding to the connected area, is the total number of elements in the corresponding connected region, that is Area of ​​the region; Apply the difference matrix A * Corresponding The number of non-O elements in the region is relative to The proportion of the area to describe the active motion area The real-time motion amplitude of the current area Relative to the previous unit In the same area, the proportion of the area that has changed is: Set the threshold t s , if r s >t s , then it is believed that There have been large movements in the region; (2) Flame YCrCb histogram feature analysis Image I i Convert to YCrCb color space image Based on the normalized YCrCb image Divide into 256 bins and perform histogram statistics; divide the statistical results by the area of ​​the statistical area to achieve normalization; Active motion area If it is determined to be a large-scale motion area, then obtain exist In the corresponding area, perform YCrCb normalized histogram statistics: Get exist The maximum amplitude m of the normalized histogram of Cr and Cb in the corresponding area cr With m cb , and the range distribution interval cr[v cr1 , v cr2 ] and Cb[v cb1 , v cb2 ], calculate the following parameters: ①Cr range width: w cr =v cr2 -v cr1 ②Cb range width: w cb =v cb2 -v cb1 ③Minimum range width: w min =min(w cr ,w cb ) ④The end position of the interval closest to the origin of Cr / Cb: v e =min(v cr2 , v cb2 ) ⑤The starting position of the interval farthest from the origin of Cr / Cb: v s =max(v cr1 , v cb1 ) ⑥ Intersection width of Cr and Cb value range: w cr∩cb =v e -v s Make the following conditional judgments: ① Is the intersection width of the Cr / Cb value range less than the minimum value range width in Cr / Cb? b w =is(w cr∩cb <w min ) ②Whether the ratio of Cr / Cb amplitude to range width is less than 0.5: ③Whether the Cr / Cb range distribution satisfies the above position relationship: b c =is(v cr1 >v cb1 and v cr2 >v cb2 ) Among them, is() represents logical judgment. If the condition is true, it returns True, otherwise it returns False; if all three conditions are True, that is, b=b w ∧b m ∧b v = True, ∧ represents logical AND, then the area is considered Satisfy the flame histogram characteristics; (3) Flame RGB color characteristics right The area that meets the large-scale motion characteristics and YCrCb histogram characteristics Confirm the RGB color features; the RGB values ​​of some flame image pixels satisfy the following relationship: ①R>G>B ②R>R mean and G>G mean and B<B mean Where R mean , G mean , B mean They are the mean values ​​of the three channels of RGB image respectively; Apply the local mean instead of the global mean to form a more stringent judgment condition: Calculate the RGB image I i In, corresponding The RGB mean value r of the pixels in the minimum bounding rectangle area m , g m , b m , Statistics I i middle The number of pixels in the region that simultaneously meet the following conditions: ①r>g>b ②r>r m and g>g m and b<b m set up The number of pixels in the area is The number of pixels that meet the conditions is n, and the proportion is calculated Set the threshold t e , if r c >t c , then make the final decision, thinking The flame area.

3. The flame detection method based on motion characteristics and color characteristics according to claim 1 is characterized in that: In the difference between two frames and the binarization of the differential image, if the absolute value of the differential value of a certain pixel exceeds a certain threshold, it is considered that the value of the pixel has changed.

Citation Information

Patent Citations

  • Video flame detecting method based on multi-feature fusion technology

    CN103116746A

  • Adaptive abnormal crowd behavior analysis method

    CN103745230A

Cited By

  • Threshold and angle self-adaptive infrared flame detection system and control method

    CN121298020A