A method, system and electronic device for detecting fire smoke
By processing images using three filters and the GMM algorithm, combined with two-dimensional discrete wavelet transform, the problem of inaccurate early-stage smoke detection in fires is solved, achieving rapid and accurate fire smoke detection and improving the timeliness and accuracy of fire detection.
Patent Information
- Application Number
- CN202211062430.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Existing fire detection systems are not accurate enough in detecting thin smoke in the early stages of a fire, resulting in delayed fire alarms. Furthermore, the images captured by inspection robots are not clear in detail, affecting the effectiveness of fire detection.
Three filters (BF-pre, BF-lap, and BF-PLa) are used to filter the image, enhance image details and sharpen edges. The video background is extracted by combining the GMM algorithm, and the smoke region is determined by two-dimensional discrete wavelet transform.
It achieves rapid and accurate fire smoke detection, improves the timeliness and accuracy of fire detection, and reduces the false alarm rate.
Smart Images

Figure CN115456976B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, system and electronic device for detecting fire smoke. Background Technology
[0002] Early fire prevention and detection has always been a topic of significant research importance. Accurate, effective, and timely fire detection is crucial for controlling the spread of fire. In the early stages of a fire, a thin layer of smoke is produced. Continued combustion ignites flammable gases in the air, producing a bright yellow flame. Traditional digital image-based fire monitoring systems typically use flame brightness as the detection and identification target, which may lead to delayed fire alarms for fires caused by high temperatures in indoor equipment. Monitoring and identifying the smoke produced during the preheating stage can detect fires earlier, providing greater time and safety advantages for firefighting efforts. Furthermore, images captured by inspection robots often lack detail. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a fire smoke detection method, system, and electronic device that are fast and highly accurate.
[0004] One aspect of this invention provides a fire smoke detection method, comprising:
[0005] Acquire the image frame to be detected in the video;
[0006] The image frame to be detected is filtered using a first filter, a second filter, and a third filter; wherein, the first filter is used to enhance image details, the second filter is used to sharpen image edges, and the third filter is used to reduce the impact of noise on image edges.
[0007] The GMM algorithm is used to extract the video background from the filtered image;
[0008] Based on the extracted video background, the smoke region is determined by two-dimensional discrete wavelet transform.
[0009] Optionally, in the step of filtering the image frame to be detected using the first filter, the second filter, and the third filter, the filtering of the image frame to be detected using the first filter includes:
[0010] The spatial proximity factor of the bilateral filter is replaced to obtain a new spatial proximity factor;
[0011] Calculate the grayscale similarity factor in the image frame to be detected;
[0012] The gray intensity at each position after the first filtering process is calculated based on the new spatial proximity factor and the gray value similarity factor.
[0013] Optionally, in the step of filtering the image frame to be detected using the first filter, the second filter, and the third filter, the filtering of the image frame to be detected using the second filter includes:
[0014] By treating the convolution template as a factor affecting spatial variance, the spatial proximity factor of the bilateral filter is replaced with a new spatial proximity factor.
[0015] Calculate the grayscale similarity factor in the image frame to be detected;
[0016] The gray intensity at each position after the second filtering process is calculated based on the new spatial proximity factor and the gray value similarity factor.
[0017] Optionally, in the step of filtering the image frame to be detected using the first filter, the second filter, and the third filter, the filtering of the image frame to be detected using the third filter includes:
[0018] The Prewitt and Laplace operators are combined as a convolution template to perform convolution operation on the image frame to be detected, extract the edge information of the image, and obtain the first gray value and the second gray value corresponding to each pixel.
[0019] The first gray value and the second gray value are cross-multiplied to obtain the third gray value;
[0020] A new convolutional template is constructed centered on the third gray value, and then the gray intensity at each position after the third filtering process is obtained.
[0021] Optionally, the step of using the GMM algorithm to extract the video background from the filtered image includes:
[0022] The pixel value at any position in the image at any time is compared with each Gaussian distribution model to determine whether the current pixel value follows the background distribution and whether the current pixel is a background pixel, and finally a Gaussian background model adapted to the video frame is obtained.
[0023] Based on the matching results of the Gaussian distribution model, the weights of the Gaussian distribution model are updated and adjusted.
[0024] Based on the matching results of the Gaussian distribution model, the model parameters of the Gaussian distribution model are updated and adjusted.
[0025] Based on the determination of whether the current pixel is a background pixel, the foreground pixel in the video image frame is determined.
[0026] Optionally, determining the smoke region based on the extracted video background using a two-dimensional discrete wavelet transform includes:
[0027] Two-dimensional discrete wavelet decomposition was performed on the video frame image and the background image using the db1 wavelet basis, resulting in one low-frequency component image and three high-frequency component images.
[0028] The high-frequency energy of the three high-frequency component images is fused.
[0029] The high-frequency energy values of the fused image are compared with the high-frequency energy values of the extracted video background. When the local high-frequency energy value in the image shows a decaying state, it is determined that there is smoke in the corresponding local area.
[0030] Another aspect of the present invention provides a fire smoke detection device, comprising:
[0031] The first module is used to acquire the image frames to be detected in the video;
[0032] The second module is used to filter the image frame to be detected using a first filter, a second filter, and a third filter; wherein the first filter is used to enhance image details, the second filter is used to sharpen image edges, and the third filter is used to reduce the impact of noise on image edges.
[0033] The third module is used to extract the video background from the filtered image using the GMM algorithm;
[0034] The fourth module is used to determine the smoke region based on the extracted video background using a two-dimensional discrete wavelet transform.
[0035] Another aspect of the present invention provides an electronic device, including a processor and a memory;
[0036] The memory is used to store programs;
[0037] The processor executes the program to implement the method described above.
[0038] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the methods described above.
[0039] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0040] Embodiments of the present invention acquire a target image frame from a video; filter the target image frame using a first filter, a second filter, and a third filter; wherein the first filter is used to enhance image details, the second filter is used to sharpen image edges, and the third filter is used to reduce the impact of noise on image edges; the GMM algorithm is used to extract the video background from the filtered image; based on the extracted video background, a smoke region is determined using a two-dimensional discrete wavelet transform. The present invention is fast and highly accurate. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 The overall process flowchart provided for embodiments of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] To address the problems existing in the prior art, embodiments of the present invention provide a fire smoke detection method, including:
[0045] Acquire the image frame to be detected in the video;
[0046] The image frame to be detected is filtered using a first filter, a second filter, and a third filter; wherein, the first filter is used to enhance image details, the second filter is used to sharpen image edges, and the third filter is used to reduce the impact of noise on image edges.
[0047] The GMM algorithm is used to extract the video background from the filtered image;
[0048] Based on the extracted video background, the smoke region is determined by two-dimensional discrete wavelet transform.
[0049] Optionally, in the step of filtering the image frame to be detected using the first filter, the second filter, and the third filter, the filtering of the image frame to be detected using the first filter includes:
[0050] The spatial proximity factor of the bilateral filter is replaced to obtain a new spatial proximity factor;
[0051] Calculate the grayscale similarity factor in the image frame to be detected;
[0052] The gray intensity at each position after the first filtering process is calculated based on the new spatial proximity factor and the gray value similarity factor.
[0053] Optionally, in the step of filtering the image frame to be detected using the first filter, the second filter, and the third filter, the filtering of the image frame to be detected using the second filter includes:
[0054] By treating the convolution template as a factor affecting spatial variance, the spatial proximity factor of the bilateral filter is replaced with a new spatial proximity factor.
[0055] Calculate the grayscale similarity factor in the image frame to be detected;
[0056] The gray intensity at each position after the second filtering process is calculated based on the new spatial proximity factor and the gray value similarity factor.
[0057] Optionally, in the step of filtering the image frame to be detected using the first filter, the second filter, and the third filter, the filtering of the image frame to be detected using the third filter includes:
[0058] The Prewitt and Laplace operators are combined as a convolution template to perform convolution operation on the image frame to be detected, extract the edge information of the image, and obtain the first gray value and the second gray value corresponding to each pixel.
[0059] The first gray value and the second gray value are cross-multiplied to obtain the third gray value;
[0060] A new convolutional template is constructed centered on the third gray value, and then the gray intensity at each position after the third filtering process is obtained.
[0061] Optionally, the step of using the GMM algorithm to extract the video background from the filtered image includes:
[0062] The pixel value at any position in the image at any time is compared with each Gaussian distribution model to determine whether the current pixel value follows the background distribution and whether the current pixel is a background pixel, and finally a Gaussian background model adapted to the video frame is obtained.
[0063] Based on the matching results of the Gaussian distribution model, the weights of the Gaussian distribution model are updated and adjusted.
[0064] Based on the matching results of the Gaussian distribution model, the model parameters of the Gaussian distribution model are updated and adjusted.
[0065] Based on the determination of whether the current pixel is a background pixel, the foreground pixel in the video image frame is determined.
[0066] Optionally, determining the smoke region based on the extracted video background using a two-dimensional discrete wavelet transform includes:
[0067] Two-dimensional discrete wavelet decomposition was performed on the video frame image and the background image using the db1 wavelet basis, resulting in one low-frequency component image and three high-frequency component images.
[0068] The high-frequency energy of the three high-frequency component images is fused.
[0069] The high-frequency energy values of the fused image are compared with the high-frequency energy values of the extracted video background. When the local high-frequency energy value in the image shows a decaying state, it is determined that there is smoke in the corresponding local area.
[0070] Another aspect of the present invention provides a fire smoke detection device, comprising:
[0071] The first module is used to acquire the image frames to be detected in the video;
[0072] The second module is used to filter the image frame to be detected using a first filter, a second filter, and a third filter; wherein the first filter is used to enhance image details, the second filter is used to sharpen image edges, and the third filter is used to reduce the impact of noise on image edges.
[0073] The third module is used to extract the video background from the filtered image using the GMM algorithm;
[0074] The fourth module is used to determine the smoke region based on the extracted video background using a two-dimensional discrete wavelet transform.
[0075] Another aspect of the present invention provides an electronic device, including a processor and a memory;
[0076] The memory is used to store programs;
[0077] The processor executes the program to implement the method described above.
[0078] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the methods described above.
[0079] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0080] The specific implementation process of the present invention will now be described in detail with reference to the accompanying drawings:
[0081] like Figure 1 As shown, this embodiment of the invention provides a fire smoke detection method, which specifically includes the following steps:
[0082] Step 1: Extract image frames from the video.
[0083] Step 2: The image is filtered using three novel filters: BF-pre, BF-lap, and BF-PLa. The proposed BF-pre pre-filter effectively suppresses noise and enhances image details; BF-lap, a filter based on the Laplacian operator, sharpens edges; and BF-PLa integrates the Prewitt and Laplace algorithms, overcoming the shortcomings of both operators and reducing the impact of noise on edges.
[0084] Step 3: Extract the video background based on the GMM algorithm.
[0085] Step 4: Use two-dimensional discrete wavelet transform to determine the smoke region.
[0086] Specifically, this invention proposes three novel filters—BF-pre, BF-lap, and BF-Pla—to filter images and enhance their details.
[0087] Based on standard bilateral filtering (SBF), the proposed BF-pre pre-filter can effectively suppress noise and enhance image details. The spatial proximity factor w of SBF is... s Replace with
[0088]
[0089] The grayscale similarity factor in the image is:
[0090]
[0091] The gray intensity at position (x,y) after BF-pre preprocessing is:
[0092]
[0093] σ r Z represents the grayscale variance. 1 Represents a 1D numerical value, where f(k,l) represents the pixel value at the center coordinates (k,l) of the template window.
[0094] BF-lap is a filter based on SBF. The Laplacian operator is a second-order derivative operator that sharpens edges. Using S... laplacian1 and S laplacian2 The convolution template, as a factor influencing spatial variance, incorporates the spatial proximity factor w in the SBF. s Replace with
[0095]
[0096] σ d =σ r / 3, The output grayscale value of point (x,y) after BF-lap filtering is:
[0097]
[0098] BF-PLa is also a BF-lap filter based on SBF. Assuming the gray value of the original image at point (x,y) is f(x,y), the Prewitt and Laplace operators are combined as convolution templates to perform convolution operations on the original image, extracting the edge information of the image, and obtaining new gray values f1(x,y) and f2(x,y) at position (x,y).
[0099]
[0100]
[0101] Then, f1(x,y) and f2(x,y) are cross-multiplied to obtain f3(x,y). The 3*3 region centered on f3(x,y) and extending to the top, bottom, left, and right is used as the convolution template.
[0102]
[0103]
[0104] After BF-PLa filtering, the gray value at (x,y) is:
[0105]
[0106] The following is a detailed explanation of the video background extraction principle based on the GMM algorithm:
[0107] Gaussian Mixture Background Modeling (GMM) is a background description method that uses sample statistics to represent the color distribution of pixels through a mixture of Gaussian distributions. By superimposing Gaussian distributions with different weights, each pixel of the image can be modeled, and the weights and distribution characteristic parameters of each Gaussian distribution can be continuously updated over time. The image is filtered using three filters—BF-pre, BF-lap, and BF-PLa—before being processed using GMM.
[0108] First, the pixel value at position (i,j) at time t. It is compared with each Gaussian distribution model, that is, the image pixel values of the video frame. Average value of the background model By comparing the pixel values of the frame at time t, it is determined whether the pixel value follows a certain background distribution, thus determining whether it is background. If the background is inside, it is considered the background; otherwise, it is considered the foreground. This yields a Gaussian background model adapted to the video frame.
[0109]
[0110] D is the threshold for determining whether a pixel value in a certain frame matches a certain Gaussian distribution model; Let (i,j) be the standard deviation of the Kth Gaussian distribution model of the pixel value at position (i,j) at time t. Let be the average value of the pixel value at position (i,j) at time t, which is the value of the Kth Gaussian distribution model.
[0111] If the Gaussian distribution model is successfully matched, the model weights are changed according to formula (12); otherwise, the Gaussian distribution model weights are updated according to formula (13).
[0112]
[0113]
[0114] α is the weight of the Kth Gaussian distribution model at position (i,j) at time t, and α is the learning rate.
[0115] The parameters of the successfully matched Gaussian distribution model corresponding to the frame will change according to the following formula.
[0116]
[0117]
[0118]
[0119] Where P is the distribution coefficient. Let be the average value of the pixel value at position (i,j) in the Kth Gaussian distribution model at time t-1.
[0120] Standard deviation of unmatched Gaussian distribution model and average It will not change; if adaptation to all Gaussian distribution models fails, the mean of the Gaussian distribution model with the smallest weight is modified to the current pixel value, the standard deviation is modified to the maximum value in the initial Gaussian distribution model, and the weights are selected to be the minimum values among all Gaussian distribution models.
[0121] Normalize the weight of the current pixel.
[0122]
[0123] In the above formula, C is the superposition number of the mixture Gaussian distribution model with different weights.
[0124] according to The distribution parameters are used to update the pixels, and background modeling is then performed based on this.
[0125]
[0126] In the formula above, M is the number of patterns that constitute the maximum weight of the background.
[0127] Sort in descending order Background distribution.
[0128]
[0129] Constructing video image frames Prospects Following the order of step 4, traverse the first M distributions, if the formula Then formula (11) determines it as background, let Conversely, it's the foreground pixel, let
[0130] The smoke spreads slowly, locally blurring other objects in the video frame. The background in the spatial domain is blurred, but shows a trend of high-frequency energy attenuation in the frequency domain. In the synthesis of digital images, non-smoke images usually completely cover the background. According to the characteristics of the blurred smoke background, the background texture of the smoke video frame image is extracted by two-dimensional discrete wavelet transform, and its characteristics are distinguished to detect the suspicious smoke area.
[0131] The principle of two-dimensional discrete wavelet transform is described in detail below:
[0132] Fuse the high-frequency energy of the target image after wavelet decomposition, and compare the high-frequency energy value of the fused image with the high-frequency energy value of the video background extracted above. If the local high-frequency energy value in the target image decays, it is determined that there is smoke in that area.
[0133] Select the db1 wavelet basis to perform two-dimensional discrete wavelet decomposition on the video frame image and the background image, obtaining one low-frequency (LL) sub-image and three high-frequency sub-images. The three high-frequency sub-images are the horizontal direction (HL), the vertical direction (LH), and the diagonal direction (HH) respectively. When smoke appears in the video frame image, it will reduce the energy values of the three high-frequency sub-images.
[0134] Calculate the sum of the energy values of the three high-frequency sub-images of the target image and the background image:
[0135] I i (x,y) = |HL i (x,y)| 2 +|LH i (x,y)| 2 +|HH i (x,y)| 2 (20)
[0136] In the above formula, I i (x,y) can be regarded as the fused image, HL i (x,y), LH i (x,y) and HH i (x,y) are the energy values in the horizontal direction (HL), the vertical direction (LH), and the diagonal direction (HH) respectively.
[0137] To improve the speed of experimental image processing, the image is divided into 4*4 blocks:
[0138]
[0139] 0 < E i,j (e1,e2) < T*B(e1,e2), reduce the wavelet high-frequency energy of the image sub-block, and determine the sub-block as a suspicious smoke area.
[0140] E i,j (e1,e2) represents the high-frequency energy value of the pixel in the j-th sub-block of the i-th frame image, B(e1,e2) represents the high-frequency energy value of the background sub-block corresponding to the high-frequency information of the pixel in the j-th sub-block of the i-th frame image, and T is the threshold.
[0141] In summary, this invention proposes three filters to improve the spatial domain kernel. This method can sharpen edges and suppress noise in video frame images, thereby enhancing the details of the video frame images. Simultaneously, addressing the problems of poor smoke detection performance and high false alarm rate, this invention proposes a method based on extracting the video background using a Gaussian mixture background model, and then comparing the energy values of the high-frequency components through wavelet transform to determine suspicious smoke areas. This method can accurately detect smoke in video frame images with good detection performance and high accuracy.
[0142] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.
[0143] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0144] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0145] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0146] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0147] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0148] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0149] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0150] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method of fire smoke detection, characterized in that, The method comprises the following steps: acquiring a to-be-detected image frame in a video; filtering the to-be-detected image frame by using a first filter, a second filter and a third filter; the first filter is used for enhancing image details, the second filter is used for sharpening image edges, and the third filter is used for reducing the influence of noise on image edges; extracting a video background from the filtered image by using a GMM algorithm; determining a smoke area by using two-dimensional discrete wavelet transform according to the extracted video background; the filtering of the to-be-detected image frame by using the first filter comprises the following steps: replacing the spatial neighborhood factor of bilateral filtering by the first factor wherein the first factor has the expression: wherein, , is the gray level variance, S pre1 and S pre2 are two convolution masks of the Prewitt operator; calculating a gray value similarity factor in the to-be-detected image frame; calculating the gray intensity of each position after the first filtering according to the first factor and the gray value similarity factor; the filtering of the to-be-detected image frame by using the second filter comprises the following steps: replacing the spatial proximity factor of the bilateral filtering with a second factor wherein the second factor has an expression of: wherein, S laplacian1 and S laplacian2 are two convolution kernels of a Laplace operator; calculating a gray value similarity factor in the to-be-detected image frame; calculating the gray intensity of each position after the second filtering according to the second factor and the gray value similarity factor; the filtering of the to-be-detected image frame by using the third filter comprises the following steps: combining Prewitt and Laplace operators as a convolution template to perform convolution operation on the to-be-detected image frame, extracting edge information of the image to obtain a first gray value and a second gray value corresponding to each pixel; cross-multiplying the first gray value and the second gray value to obtain a third gray value; constructing a new convolution template with the third gray value as the center, and then processing to obtain the gray intensity of each position after the third filtering; Replacing the spatial neighborhood factor of bilateral filtering with a third factor where the third factor has the expression where S PLa is a convolution mask combining Prewitt and Laplace operators.
2. A method of fire smoke detection according to claim 1, characterised in that, the extraction of the video background from the filtered image by using the GMM algorithm comprises the following steps: comparing the pixel value of each position in the image at any time with each Gaussian distribution model to determine whether the current pixel value is subject to the background distribution and whether the current pixel is a background pixel, and finally obtaining a Gaussian background model suitable for the video frame; updating and adjusting the weight of the Gaussian distribution model according to the matching result of the Gaussian distribution model; updating and adjusting the model parameters of the Gaussian distribution model according to the matching result of the Gaussian distribution model; determining the foreground pixel in the video image frame according to the judgment result of whether the current pixel is a background pixel.
3. A method of fire smoke detection according to claim 1, wherein, the determination of the smoke area by using two-dimensional discrete wavelet transform according to the extracted video background comprises the following steps: selecting a db1 wavelet base to perform two-dimensional discrete wavelet decomposition on the video frame image and the background image to obtain one low-frequency component sub-image and three high-frequency component sub-images; fusing the high-frequency energy of the three high-frequency component sub-images; comparing the high-frequency energy value of the fused image with the high-frequency energy value of the extracted video background, and determining that there is smoke in the local area corresponding to the local high-frequency energy value when the local high-frequency energy value in the image shows a decay state.
4. A fire smoke detection apparatus, characterized by The method comprises the following steps: a first module is configured to acquire a to-be-detected image frame in a video; The second module is configured to filter the image frame to be detected using a first filter, a second filter and a third filter; the first filter is configured to enhance image details, the second filter is configured to sharpen image edges, and the third filter is configured to reduce the influence of noise on image edges. The third module is configured to extract a video background from the filtered image using a GMM algorithm. The fourth module is configured to determine a smoke area by two-dimensional discrete wavelet transform based on the extracted video background. The filtering of the image frame to be detected using the first filter comprises: replacing the spatial neighborhood factor of bilateral filtering by the first factor wherein the first factor has the expression: wherein, , is the gray level variance, S pre1 and S pre2 are two convolution masks of the Prewitt operator; calculating a first factor in the image frame to be detected; calculating a first gray intensity of each position after the first filtering based on the first factor and the gray value similarity factor; The filtering of the image frame to be detected using the second filter comprises: replacing the spatial proximity factor of the bilateral filtering with a second factor wherein the second factor has an expression of: wherein, S laplacian1 and S laplacian2 are two convolution kernels of a Laplace operator; calculating a second factor in the image frame to be detected; calculating a second gray intensity of each position after the second filtering based on the second factor and the gray value similarity factor; The filtering of the image frame to be detected using the third filter comprises: combining Prewitt and Laplace operators as a convolution template to perform convolution operation on the image frame to be detected, extract edge information of the image, and obtain a first gray value and a second gray value corresponding to each pixel; cross-multiplying the first gray value and the second gray value to obtain a third gray value; constructing a new convolution template with the third gray value as the center, and then processing to obtain a gray intensity of each position after the third filtering; Replacing the spatial neighborhood factor of bilateral filtering with a third factor where the third factor has the expression where S PLa is a convolution mask combining Prewitt and Laplace operators.
5. An electronic device, comprising: The device comprises a processor and a memory. The memory is configured to store a program. The processor executes the program to implement the method of any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The storage medium stores a program, and the program is executed by a processor to implement the method of any one of claims 1 to 3.
7. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method of any one of claims 1 to 3.
Citation Information
Patent Citations
Infrared image processing method and device, computer device and readable storage medium
CN109447935A
Forest fire early-stage smoke detection method
CN112132870A
Underwater real-time image enhancement method based on multi-algorithm fusion
CN113269681A