Flame defogging identification method based on improved dark channel
By improving dark channel technology and chroma space conversion, combined with atmospheric light estimation and frame difference method, defog removal and flame recognition of fire field videos are achieved, solving the problems of decreasing video clarity and insufficient accuracy of flame recognition in the prior art, and it has low complexity, high real-time and high stability.
Patent Information
- Application Number
- CN202510044703.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-06
AI Technical Summary
Existing fire recorders cannot transmit fire scene video to the control room in real time, and the video is affected by smoke, and the clarity is reduced, affecting visual quality and subsequent processing.
The flame defog recognition method based on improved dark channels is adopted, and video defog and flame recognition are achieved through RGB chromaticity space to IJK chromaticity space, atmospheric light estimation, improved frame difference method and flame recognition based on color characteristics.
The video is defogged, image clarity is restored, image quality and flame recognition accuracy are improved, and the method is low in complexity, good real-time and high stability.
Smart Images

Figure CN119942408A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to image processing and recognition, and in particular to a flame defogging and recognition method based on an improved dark channel. Background Art
[0002] At present, the functions of domestic fire recorders are relatively simple and limited to recording videos. They cannot transmit the video of the fire scene to the control room in real time for analysis by the commanders. In addition, the recorded video is affected by the smoke in the fire scene, and the line of sight is very poor. To ensure the safety of firefighters, the research on firefighting equipment must not be limited to traditional solutions, but must be integrated with modern technology and developed in an integrated and diversified manner. With the increasing development of wireless communication technology, firefighting equipment based on wireless networks has received widespread attention and research. Smoke can cause the image clarity to decrease and the color to distort, seriously affecting the visual quality of the image and subsequent processing. Image desmoke technology mainly removes smoke from the image to restore the clarity of the image and enhance the details to improve the image quality.
[0003] At present, most of the research methods for fire scene image processing at home and abroad use deep learning, but the above calculation methods are costly and inflexible. In practical applications, flexible application is also extremely important for the system, so the present invention proposes a flame defogging recognition method based on an improved dark channel while ensuring the defogging effect. The detection method has low complexity, good real-time performance and high stability. Summary of the invention
[0004] In order to solve the above technical problems, the technical solution of the present invention is: a flame defogging and recognition method based on an improved dark channel, including converting RGB color space to IJK color space, estimating atmospheric light, improving the frame difference method, and identifying flames according to color features. The method is characterized by:
[0005] Preferably, the conversion of RGB color space to "IJK" color space is optimized for the process of RBG to YCbCr, and the decimals in the conversion process are converted into fractions with denominators of 2 to reduce the computational complexity, and the YCbCr color space is optimized to "IJK" color space. Matrix multiplication is used to convert RGB into "IJK" color space, and the inverse conversion is realized;
[0006] Preferably, the atmospheric light estimation is to use recursive estimation of the average value of the "I" channel once the input frame is converted to the proposed "IJK" color space. Repeat the expected operator on the "I" channel to gradually estimate the atmospheric light. Repeat four times, and take the atmospheric light obtained in the fourth time as the final atmospheric light;
[0007] Preferably, in the improved frame difference method, in the traditional frame difference method, the threshold is generally a fixed value. The improved frame difference method grades the image brightness and adjusts the brightness level according to the strength of the atmospheric light. The initial value of the brightness level is 10. When the AL value of the current frame is greater than the AL value of the previous frame, it indicates that the current environment brightness has become higher, and the threshold is increased by 1; when the AL value of the current frame is less than the AL value of the previous frame, it indicates that the current environment brightness has become lower, and the threshold is reduced by 1;
[0008] Preferably, the flame recognition according to the color feature is to recognize the flame in the RGB color space and "IJK" according to the flame in the respective chromaticity fields, and after completion, the recognition results of the two color spaces are combined for recognition;
[0009] Preferably, the "IJK" color space refers to a custom color space, which is derived from YCbCr, and converts RGB to YCbCr into RGB to "IJK", and the conversion formula is: Where channel "I" corresponds to brightness, while "J" and "K" correspond to chromaticity in the blue and red channels, respectively;
[0010] Preferably, the atmospheric light refers to the atmospheric scattering model. The fog is mainly composed of suspended aerosols in the air. Due to the scattering effect of light, the captured image has a layer of hazy fog. The foggy image in the picture is removed through the dark channel model. The atmospheric light estimation is divided into two parts: first, the pixels with the top 0.1% brightness are selected from the dark channel; then, the pixels in the foggy image are found according to the position of the pixels as the estimated value of the atmospheric light;
[0011] Preferably, the dark channel defogging is a dark channel prior defogging algorithm (DCP), which is an image-based defogging technology proposed by Kaiming He et al. in 2009. This algorithm uses the atmospheric scattering model to remove the influence of fog by estimating the atmospheric light and the transmission map of the image. It is mainly divided into dark channel extraction, atmospheric light extraction, transmission map estimation, image restoration, and detail enhancement;
[0012] Preferably, the frame difference method means that in general, the pixels of the two frames of images of a static object in the video will not change, but the two adjacent frames of images of a moving object in the video will change significantly. The difference between the two frames of images is calculated after graying, and the area where the difference is greater than the threshold is the area where the moving object is located;
[0013] Preferably, the flame recognition in the RGB color space is characterized by dividing an image into three channels: R, G, and B. The constraint conditions for flame recognition are R>G>B; R>190. When this constraint condition is met, it is considered that there is a flame in the area.
[0014] Preferably, the flame recognition in the "IJK" chromaticity space is characterized in that the RGB image is converted into an "IJK" image and separated into an "I" channel, a "J" channel, and a "K" channel, and the constraint conditions for flame recognition are: When this constraint is met, the area is considered to be a flame;
[0015] Preferably, the flame recognition refers to superimposing the results of the improved frame difference method and the color feature discrimination after the two methods are used, taking the overlapping part and determining it as the final result;
[0016] The present invention has positive effects: (1) The present invention proposes a flame defogging and recognition method based on an improved dark channel, realizes video defogging for fire scenes, and recognizes flames, and the algorithm recognizes accurately and is highly portable; (2) The present invention optimizes the YCbCr color space, simplifies the calculation process, makes RGB to "IJK" faster, and has a higher system responsiveness; (3) The flame recognition of the present invention is to recognize flames in different dimensions, from two aspects of dynamic fields and color characteristics, and recognize flames in two color spaces of RGB and "IJK", thereby improving the accuracy of flame detection; BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the overall structure of the present invention.
[0018] Figure 2 Schematic diagram of atmospheric light estimation according to the present invention. DETAILED DESCRIPTION
[0019] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] See Figure 1 , is a schematic diagram of the overall structure of the present invention, including the data processing stage of the entire invention. First, after acquiring the video data, the RGB data is first converted to the IJK chromaticity space using the improved variant of the YCbCr chromaticity space, and then the median filter is performed. Then, the improved atmospheric light and transmission estimation and chromatic aberration removal are performed respectively, and the original image is restored after completion. After post-processing, the fog-free image is output. After the video defogging is completed, the flame recognition and color feature recognition of the improved frame difference method are performed simultaneously. The improved frame difference method first grays the fog-free image, subtracts the previous frame from the current frame, estimates the atmospheric light through the improved dark channel, and adjusts the threshold of the frame difference method based on the atmospheric light intensity, and outputs the result of the improved frame difference method. Color feature recognition first converts RGB to IJK, and constrains RGB and IJK respectively. After the color recognition result is output, it is comprehensively judged with the result of the improved frame difference method, and the flame recognition result is output.
[0021] See Figure 2 , is a schematic diagram of atmospheric light estimation of the present invention, the algorithm repeatedly uses the expectation operator on the "I" channel to gradually estimate the air light. Specifically, AL1 is calculated as the average value of the entire "I" channel. Thereafter, subsequent average values, namely AL2, AL3 and AL4, are calculated only on the values in the "I" channel that are higher than the previously calculated average value. The final average value, namely AL4, is then output as the air light parameter.
[0022] After the algorithm passed the test on the software verification platform, C language transplantation and Verilog voice transplantation were carried out respectively. With the modular design concept, the sending and receiving process of ZigBee wireless data packets was analyzed through Packet Sniffer software, and the accuracy and timing issues of Verilog language transplantation to FPGA hardware circuit were verified through testbench to complete the hardware verification of the algorithm.
[0023] In summary, the present invention proposes a flame defogging identification method based on an improved dark channel while reducing errors and costs. The detection method has low complexity, good real-time performance, high stability, and combines dynamic features with color, which greatly improves the recognition ability and accuracy of the recognition algorithm.
[0024] The above is only an explanation of the specific implementation mode of the present invention, rather than a limitation of the present invention. Technicians in the relevant technical field can make various improvements and changes to obtain corresponding equivalent technical solutions without departing from the spirit and scope of the present invention. Therefore, all equivalent technical solutions should be included in the protection scope of the present invention.
Claims
1. The flame defogging and recognition method based on the improved dark channel is characterized by: converting RGB color space to IJK color space, estimating atmospheric light, improving frame difference method, and identifying flames according to color features.
2. According to the optimization of the YCbCr color space described in claim 1, an "IJK" color space is obtained, characterized in that: The traditional YCbCr color space is lightly improved by converting the decimals in the process of converting RGB to YCbCr into fractions with the denominator being a power of 2, and the "IJK" space is obtained, where "I" corresponds to the brightness channel, "J" corresponds to the blue channel, and "K" corresponds to the red channel. Dehaze an image by separating the chrominance channels.
3. The atmospheric light estimation according to claim 1, characterized in that: Once the input frame is converted to the proposed "IJK" color space, the mean value of the "I" channel is estimated using recursion. The expectation operator is repeatedly used on the "I" channel to gradually estimate the air light. This is repeated four times, and the fourth obtained air light is taken as the final air light.
4. The improved frame difference method according to claim 1, characterized in that: In the traditional frame difference method, the threshold is generally a fixed value. The improved frame difference method grades the image brightness and adjusts the brightness level according to the strength of the atmospheric light. The initial value of the brightness level is 10. When the AL value of the current frame is greater than the AL value of the previous frame, it indicates that the current environment brightness has increased, and the threshold is increased by 1; when the AL value of the current frame is less than the AL value of the previous frame, it indicates that the current environment brightness has decreased, and the threshold is decreased by 1.
5. The flame identification according to color characteristics according to claim 1, characterized in that: The flames are identified in the RGB color space and "IJK" according to their respective color fields. After completion, the identification results of the two color spaces are combined for identification.
6. The flame identification according to claim 1, characterized in that: After flame recognition using the improved frame difference method, color feature recognition is performed, and finally the two are combined to perform comprehensive recognition from the dynamic field and color space.
Citation Information
Cited By
Fire point parameter determination method and device and electronic equipment
CN120912839A