An Adaptive Enhancement Method for Fire Images in Underground Utility Tunnels

By employing adaptive threshold calculation and enhanced processing, the problems of false alarms and missed alarms in fire monitoring in underground utility tunnels have been solved, enabling clear visibility and accurate identification of fire characteristics and improving the adaptability and robustness of fire monitoring.

CN119809944BActive Publication Date: 2025-10-28NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411563017.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-10-28
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

Existing fire monitoring methods in underground utility tunnels may result in false alarms or missed alarms due to factors such as dust accumulation and temperature and humidity changes. Furthermore, traditional image enhancement methods are difficult to adapt to complex and changing lighting and environmental conditions, which affects the accurate identification of fire characteristics.

Method used

By using adaptive threshold calculation rules, the gray-level histogram is adaptively segmented and targeted enhancement processing is performed based on the lighting characteristics of the underground utility tunnel and the features of the fire image. This improves the clarity and contrast of the fire image in low-light and low-contrast environments and suppresses noise in non-flame areas.

Benefits of technology

It significantly improves the visibility and contrast of fire features in low-light environments, enhances fire identification accuracy, reduces artifacts, and improves the natural clarity and adaptability of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809944B_ABST
    Figure CN119809944B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of digital image preprocessing technology and discloses an adaptive enhancement method for underground utility tunnel fire images, comprising: Step 1, receiving a fire image and preprocessing it to obtain a grayscale histogram; Step 2, calculating a grayscale histogram segmentation threshold; Step 3, using the grayscale histogram threshold, segmenting the original image histogram into three sub-block arrays: a low grayscale area, a middle grayscale area, and a high grayscale area, and marking the pixel range corresponding to each sub-historical array; Step 4, performing enhancement processing on the three sub-block arrays to obtain an enhanced and reconstructed fire image, and transmitting the enhanced fire image data to a remote control center. This invention can effectively improve the clarity and contrast of fire images in complex environments such as low light and low contrast, thereby achieving rapid and accurate identification of fire features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital image preprocessing, specifically relating to an adaptive enhancement method for underground utility tunnel fire images. Background Technology

[0002] With the acceleration of urbanization, underground utility tunnels, as an important component of urban infrastructure, bear the responsibility of laying and maintaining various critical pipelines such as electricity, communications, and water supply and drainage. However, due to their enclosed nature, limited space, and poor lighting, the monitoring and emergency response to fires in underground utility tunnels become significantly more difficult. Traditional fire monitoring methods often rely on smoke detectors and temperature sensors located in fixed positions, but these devices may cause false alarms or missed alarms in the complex and ever-changing environment of underground utility tunnels due to factors such as dust accumulation and changes in temperature and humidity.

[0003] In recent years, with the rapid development of image processing technology and computer vision, image-based fire detection technology has gradually attracted attention. By capturing real-time video images of underground utility tunnels using cameras and analyzing fire features in the images, such as the color, shape, and movement of flames, early warning and accurate identification of fires can be achieved. However, the unique environment of underground utility tunnels, such as low light, low contrast, and smoke interference, poses a significant challenge to the clarity and contrast of fire images, severely affecting the accurate extraction and identification of fire features.

[0004] Most existing image enhancement methods use fixed algorithm parameters or preset thresholds for image processing, making it difficult to adapt to the complex and variable lighting and environmental conditions of underground utility tunnels. Therefore, there is a need for a method that can automatically analyze fire image features and adaptively enhance them according to the unique environmental conditions of underground utility tunnels, in order to improve the clarity and contrast of fire images in complex environments, and thus achieve rapid and accurate identification of fire features. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides an adaptive enhancement method for underground utility tunnel fire images. The method aims to automatically analyze the grayscale histogram of the input fire image, design and apply an adaptive threshold calculation rule, and perform targeted enhancement processing on the image. This improves the clarity and contrast of the fire image in complex environments such as low light and low contrast, thereby enhancing the ability to identify fire features. Simultaneously, it suppresses noise in non-flame areas and effectively reduces artifacts, resulting in a more natural and clear image. This improves the accuracy of subsequent fire identification and provides strong support for fire monitoring and emergency response in underground utility tunnels.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solution:

[0007] This invention is an adaptive enhancement method for images of underground utility tunnel fires, which specifically includes the following steps:

[0008] Step 1: Receive fire images from underground utility tunnel monitoring cameras, preprocess the fire images, and perform grayscale calculations to obtain the grayscale histogram of the fire images.

[0009] Step 2, Calculation of gray-level histogram segmentation threshold: Based on the lighting characteristics of underground utility tunnels (such as low light and low contrast) and the general characteristics of fire images, an adaptive threshold calculation rule is designed. The threshold for segmenting the gray-level histogram into low gray-level areas, intermediate gray-level areas and high gray-level areas in Step 1 is calculated using the threshold calculation rule.

[0010] Step 3: Using the threshold of the gray-level histogram calculated in Step 2, the histogram of the original image is divided into three sub-block arrays: low gray-level area, middle gray-level area and high gray-level area. The pixel range corresponding to each sub-histogram is marked to prepare for subsequent enhancement processing.

[0011] Step 4: Enhance the three-sub-block array obtained in Step 3 to obtain the enhanced fire image after reconstruction, and transmit the enhanced fire image data to the remote control center.

[0012] A further improvement of the present invention is that step 1 specifically includes the following steps:

[0013] Step 1.1: Calculate the gray level histogram h(i) of the gray level input fire image I, which is the frequency value array of gray level i. h is the array name, and i is the gray level value, 1≤i≤256.

[0014] Step 1.2: Arrange the values ​​of the grayscale histogram h(i) > 0 in ascending order of grayscale value i, and place the h(i) values ​​into a non-zero frequency array H(n).

[0015] H(n)=h(i)

[0016] Where h(i)>0, H is the array name, n is the position value of the frequency value array H(n), and 1≤n≤256;

[0017] Step 1.3: For values ​​h(i) > 0, place i into id(n) in the order of increasing gray level value i. The expression is: id(n) = i, h(i) > 0, where id is the array name, id(n) is the array of gray level values ​​i, and n is the position value of the array id(n) of gray level values ​​i, 1≤n≤256.

[0018] A further improvement of the present invention is that step 2 specifically includes the following steps:

[0019] Step 2.1: Calculate the maximum value Hmax, minimum value Hmin, and standard deviation Hd in the frequency value array H(n):

[0020] Hmax = max(H(n));

[0021] Hmin = min(H(n));

[0022] Hd = std(H(n));

[0023] Calculate the upper frequency limit HL and lower frequency limit HU of the gray-level histogram h(i) of the input fire image I based on Hmax, Hmin, and Hd:

[0024] HL = Hmin + Hd

[0025] HU = Hmax - Hd

[0026] Simultaneously, the position corresponding to the maximum value Hmax in the grayscale histogram h(i) of the array is looked up in the value lookup table idmax:

[0027] idmax = find(h(i) == Hmax)

[0028] Among them, max() and min() are the maximum and minimum value functions in MATLAB, respectively, and find() is the numerical search function;

[0029] Step 2.2: Based on HL and HU, calculate the intermediate arrays h1(i) and h2(i):

[0030] h1(i)=│h(i)-HL│

[0031] h2(i)=│h(i)-HU│

[0032] And calculate the four minimum values ​​of h1(i) and h2(i) in the two gray level value intervals [1idmax] and [idmax+1256].

[0033] h1_min1 = min(h1(1:idmax))

[0034] h1_min2=min(h1(idmax+1:256))

[0035] h2_min1 = min(h2(1:idmax))

[0036] h2_min2=min(h2(idmax+1:256));

[0037] Step 2.3: In the two grayscale value intervals [1idmax] and [idmax+1256] of arrays h1(i) and h2(i), find the corresponding grayscale threshold values ​​A1, A2, B1, and B2 for the four minimum values ​​h1_min1, h1_min2, h2_min1, and h2_min2:

[0038] A1=find(h1(1:idmax)==h1_min1)

[0039] A2=find(h1(idmax+1:256)==h1_min2)

[0040] B1=find(h2(1:idmax)==h2_min1)

[0041] B2=find(h2(idmax+1:256)==h2_min2).

[0042] A further improvement of the present invention is that step 3 specifically includes the following steps:

[0043] Step 3.1: Construct a new array C = [A1 A2 B1 B2], and calculate the upper gray-level segmentation threshold XL and the lower gray-level segmentation threshold XU:

[0044] XL = round((A1+B1) / 2)

[0045] XU = round((A2 + B2) / 2)

[0046] Find the positions of the upper segmentation gray level threshold XL and the lower segmentation gray level threshold XU in the array id(n) of gray level value i: upper segmentation threshold id_XL, lower segmentation threshold id_XU:

[0047] id_XL = find(id(n) == XL)

[0048] id_XU=find(id(n)==XU);

[0049] Step 3.2: Based on the positional segmentation thresholds id_XL and id_XU, divide arrays H(n) and id(n) into corresponding three-sub-arrays (H1(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)), and segment the mathematical expression:

[0050]

[0051] Here, end represents the last element of the array position, and j, k, and q are variables.

[0052] A further improvement of the present invention is that, in step 4, the sub-histogram obtained in step 3 is enhanced according to the region, specifically as follows:

[0053] Low grayscale areas: Using mapping methods to improve details in dark areas and enhance the visibility of potential fire features;

[0054] Intermediate grayscale areas: Maintain or fine-tune to preserve the natural transitions and details of the image;

[0055] High grayscale areas: Appropriately compress bright areas to avoid overexposure, while enhancing the contrast of bright features such as flames.

[0056] A further improvement of this invention lies in the following: In step 4, the acquisition of the enhanced fire image specifically involves: remapping the pixel values ​​of the enhanced low-grayscale area, intermediate-grayscale area, and high-grayscale area back to their corresponding positions in the original image; assigning a new grayscale value to each pixel in the image through interpolation or direct assignment, thereby generating a global enhanced fire image. During the fire image enhancement and reconstruction process, it is necessary to ensure a natural transition between different sub-regions and avoid obvious stitching marks or artifacts.

[0057] A further improvement of the present invention is that step 4 specifically includes the following steps:

[0058] Step 4.1: Calculate the new grayscale value array (idH1_x(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)) after mathematical transformation of the three sub-block arrays (H1(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)). This new array represents the grayscale values ​​of the enhanced output image. The transformation expression is:

[0059]

[0060] Where idH1(1), idH2(1), and idH3(1) are the first values ​​of the corresponding arrays, idH1(end), idH2(end), and idH3(end) are the last values ​​of the corresponding arrays, and length(idH1), length(idH2), and length(idH3) are the lengths of the corresponding arrays. The ranges of variables j, k, and q are: 1≤j≤length(idH1)), 1≤k≤length(idH2), and 1≤q≤length(idH3).

[0061] The beneficial effects of this invention are:

[0062] This invention significantly improves image brightness through adaptive threshold calculation and enhancement processing, making fire features clearly visible even in low-light environments. It solves the technical problem in existing technologies where natural light is difficult to penetrate underground utility tunnels due to their enclosed and space-limited nature, resulting in often dim images captured by cameras.

[0063] This invention enhances image contrast through histogram segmentation and targeted enhancement processing, making fire features more distinct and facilitating subsequent analysis and identification. It solves the problem of blurred image details caused by low contrast in existing technologies.

[0064] This invention achieves effective enhancement of fire images under different environmental conditions by automatically analyzing the grayscale histogram of fire images and designing adaptive threshold calculation rules based on the unique environmental conditions of underground utility tunnels. This improves the adaptability and robustness of the method and solves the technical defects of traditional image enhancement methods, which often use fixed algorithm parameters or preset thresholds and are difficult to adapt to the complex and ever-changing environmental conditions of underground utility tunnels. Attached Figure Description

[0065] Figure 1 This is a flowchart of the present invention.

[0066] Figure 2 This is a flowchart of the method of the present invention.

[0067] Figure 3 This is a comparison diagram of the fire enhancement effect of the underground utility tunnel according to the present invention.

[0068] Figure 4 This is a rendering of the histogram of the present invention. Detailed Implementation

[0069] The embodiments of the present invention will be disclosed below with reference to the drawings. For clarity, many practical details will be described in the following description. However, it should be understood that these practical details are not intended to limit the invention. That is, in some embodiments of the invention, these practical details are not essential.

[0070] This invention is based on the histogram of a digital grayscale image. According to the frequency standard deviation of the grayscale histogram of the input image, two segmentation thresholds of the histogram are adaptively calculated, and the histogram of the input image is divided into three sub-histograms. The first two sub-histograms are subjected to grayscale adaptive enhancement, and the third sub-histogram is subjected to equalization and grayscale adaptive hybrid enhancement. The enhanced image is calculated.

[0071] This invention can effectively improve image contrast while greatly reducing the whitening phenomenon caused by over-enhancement, and can also effectively reduce artifacts, making the enhanced image more natural and clear. On the other hand, it can also suppress noise in non-flame areas and improve the accuracy of subsequent fire identification.

[0072] like Figure 1-2 As shown, this invention is an adaptive enhancement method for underground utility tunnel fire images, which specifically includes the following steps:

[0073] Step 1: Receive fire images from underground utility tunnel monitoring cameras, and preprocess the fire images, including noise reduction and size adjustment, in order to prepare for grayscale histogram analysis and calculate the grayscale histogram of the fire images to provide basic data for subsequent processing.

[0074] Step 1, described using the MATLAB programming language, specifically includes the following steps:

[0075] Step 1.1: Calculate the gray level histogram h(i) of the gray level input fire image I, which is the frequency value array of gray level i. h is the array name, and i is the gray level value, 1≤i≤256.

[0076] Step 1.2: Arrange the values ​​of the grayscale histogram h(i) > 0 in ascending order of grayscale value i, and place the h(i) values ​​into a non-zero frequency array H(n).

[0077] H(n)=h(i)

[0078] Where h(i)>0, H is the array name, n is the position value of the frequency value array H(n), and 1≤n≤256;

[0079] Step 1.3: For values ​​h(i) > 0, place i into id(n) in the order of increasing gray level value i. The expression is: id(n) = i, h(i) > 0, where id is the array name, id(n) is the array of gray level values ​​i, and n is the position value of the array id(n) of gray level values ​​i, 1≤n≤256.

[0080] Step 2, Calculation of gray-level histogram segmentation threshold: Based on the lighting characteristics of underground utility tunnels, such as low light, low contrast, and the general characteristics of fire images, an adaptive threshold calculation rule is designed. The threshold for segmenting the gray-level histogram into low gray-level areas, intermediate gray-level areas, and high gray-level areas in Step 1 is calculated using the threshold calculation rule.

[0081] The histogram segmentation threshold calculation unit specifically includes the following steps:

[0082] Step 2.1: Calculate the maximum value Hmax, minimum value Hmin, and standard deviation Hd in the frequency value array H(n):

[0083] Hmax = max(H(n));

[0084] Hmin = min(H(n));

[0085] Hd = std(H(n));

[0086] Calculate the upper frequency limit HL and lower frequency limit HU of the gray-level histogram h(i) of the input fire image I based on Hmax, Hmin, and Hd:

[0087] HL = Hmin + Hd

[0088] HU = Hmax - Hd

[0089] Simultaneously, the position corresponding to the maximum value Hmax in the grayscale histogram h(i) of the array is looked up in the value lookup table idmax:

[0090] idmax = find(h(i) == Hmax)

[0091] Among them, max() and min() are the maximum and minimum value functions in MATLAB, respectively, and find() is the numerical search function;

[0092] Step 2.2: Based on HL and HU, calculate the intermediate arrays h1(i) and h2(i):

[0093] h1(i)=│h(i)-HL│

[0094] h2(i)=│h(i)-HU│

[0095] And calculate the four minimum values ​​of h1(i) and h2(i) in the two gray level value intervals [1idmax] and [idmax+1256].

[0096] h1_min1 = min(h1(1:idmax))

[0097] h1_min2=min(h1(idmax+1:256))

[0098] h2_min1 = min(h2(1:idmax))

[0099] h2_min2=min(h2(idmax+1:256));

[0100] Step 2.3: In the two grayscale value intervals [1idmax] and [idmax+1256] of arrays h1(i) and h2(i), find the corresponding grayscale values ​​A1, A2, B1, and B2 of the four minimum values ​​h1_min1, h1_min2, h2_min1, and h2_min2:

[0101] A1=find(h1(1:idmax)==h1_min1)

[0102] A2=find(h1(idmax+1:256)==h1_min2)

[0103] B1=find(h2(1:idmax)==h2_min1)

[0104] B2=find(h2(idmax+1:256)==h2_min2).

[0105] Step 3: Using the threshold of the gray-level histogram calculated in Step 2, the histogram of the original image is divided into three sub-block arrays: low gray-level region, middle gray-level region, and high gray-level region. The pixel range corresponding to each sub-histogram is marked to prepare for subsequent enhancement processing. This specifically includes the following steps:

[0106] Step 3.1: Construct a new array C = [A1 A2 B1 B2], and calculate the upper gray-level segmentation threshold XL and the lower gray-level segmentation threshold XU:

[0107] XL = round((A1+B1) / 2)

[0108] XU = round((A2 + B2) / 2)

[0109] Find the positions of the upper segmentation gray level threshold XL and the lower segmentation gray level threshold XU in the array id(n) of gray level value i: upper segmentation threshold id_XL, lower segmentation threshold id_XU:

[0110] id_XL = find(id(n) == XL)

[0111] id_XU=find(id(n)==XU);

[0112] Step 3.2: Based on the positional segmentation thresholds id_XL and id_XU, divide arrays H(n) and id(n) into corresponding three-sub-arrays (H1(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)), and segment the mathematical expression:

[0113]

[0114] Here, end represents the last element of the array position, and j, k, and q are variables.

[0115] Step 4: Enhance the three-sub-block array obtained in Step 3 to obtain the enhanced fire image after reconstruction, and transmit the enhanced fire image data to the remote control center. The obtained sub-histograms undergo targeted enhancement processing based on the region, specifically:

[0116] Low grayscale areas: Using mapping methods to improve details in dark areas and enhance the visibility of potential fire features;

[0117] Intermediate grayscale areas: Maintain or fine-tune to preserve the natural transitions and details of the image;

[0118] High grayscale areas: Appropriately compress bright areas to avoid overexposure, while enhancing the contrast of bright features such as flames.

[0119] The enhanced low-grayscale, mid-grayscale, and high-grayscale pixel values ​​are remapped back to their corresponding positions in the original image. A new grayscale value is assigned to each pixel in the image through interpolation or direct assignment, generating a globally enhanced fire image. During fire image enhancement and reconstruction, it is crucial to ensure natural transitions between different sub-regions and avoid obvious stitching artifacts.

[0120] The reconstructed, enhanced images are displayed in real-time on monitoring screens, allowing on-site personnel to immediately observe changes in the fire situation. Simultaneously, the enhanced image data is transmitted via wired or wireless means to a remote control center for further analysis and decision-making by professionals. During transmission, data compression and encryption may need to be considered to ensure efficient and secure data transmission.

[0121] Specifically, the following steps are included:

[0122] Step 4.1: Calculate the new grayscale value array (idH1_x(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)) after mathematical transformation of the three sub-block arrays (H1(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)). This new array represents the grayscale values ​​of the enhanced output image. The transformation expression is:

[0123]

[0124] Where idH1(1), idH2(1), and idH3(1) are the first values ​​of the corresponding arrays, idH1(end), idH2(end), and idH3(end) are the last values ​​of the corresponding arrays, and length(idH1), length(idH2), and length(idH3) are the lengths of the corresponding arrays. The ranges of variables j, k, and q are: 1≤j≤length(idH1)), 1≤k≤length(idH2), and 1≤q≤length(idH3).

[0125] The method of this invention is mainly based on the histogram of a digital grayscale image. According to the threshold calculation rules of the input image histogram, two segmentation thresholds are calculated. The histogram of the input image is automatically divided into three sub-histograms by the upper and lower segmentation thresholds. The enhanced image is then calculated and output for each of the three sub-histograms.

[0126] To verify this invention, the histograms and enhancement effects of the classic histogram enhancement method and the method of this invention are compared. The enhancement effect comparison is shown in the figure below. Figure 3 As shown, Figure 3 (a) is the original image. Figure 3 (b) is the image obtained using the classic histogram enhancement method. Figure 3 (c) is the image enhanced by the method of this application.

[0127] Figure 4 (a) is the histogram of the original image. Figure 4 (b) is a histogram enhanced from the classic histogram. Figure 4 (c) is the histogram enhanced in this application.

[0128] According to the appendix Figure 3 and Figure 4 As shown in Figure 3(a), after the original image is enhanced by both the classic histogram and the method of this invention, the image processed by the classic histogram is generally too bright and appears washed out. This problem can easily lead to misjudgment in subsequent fire identification. Figure 4 (b) The classic histogram-enhanced image also shows that the histogram intervals are too large, resulting in excessive contrast and serious loss of detail information.

[0129] And enhanced by the present invention Figure 3 (c) The brightness of the image does not change much. Only the flame area is highlighted and enhanced, while the rest is weakened and enhanced. The overall image appears clear and natural.

[0130] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. An adaptive enhancement method for images of underground utility tunnel fires, characterized in that: The enhancement method specifically includes the following steps: Step 1: Receive fire images from underground utility tunnel monitoring cameras, preprocess the fire images, and perform grayscale calculations to obtain the grayscale histogram of the fire images. Step 2: Calculate the segmentation threshold of the gray-level histogram: Design an adaptive threshold calculation rule, and use the threshold calculation rule to calculate the threshold for segmenting the gray-level histogram in Step 1 into low gray-level areas, intermediate gray-level areas and high gray-level areas; Step 3: Using the threshold of the gray-level histogram calculated in Step 2, the histogram of the original image is divided into three sub-block arrays: low gray-level area, middle gray-level area and high gray-level area. The pixel range corresponding to each sub-histogram is marked to prepare for subsequent enhancement processing. Step 4: Enhance the three-sub-block array obtained in Step 3 to obtain the enhanced fire image after reconstruction, and transmit the enhanced fire image data to the remote control center. Step 2 specifically includes the following steps: Step 2.1: Calculate the maximum value Hmax, minimum value Hmin, and standard deviation Hd in the frequency value array H(n): Hmax = max(H(n)); Hmin = min(H(n)); Hd = std(H(n)); Calculate the upper frequency limit HL and lower frequency limit HU of the gray-level histogram h(i) of the input fire image I based on Hmax, Hmin, and Hd: HL = Hmin + Hd HU = Hmax - Hd Simultaneously, the position corresponding to the maximum value Hmax in the grayscale histogram h(i) of the array is looked up in the value lookup table idmax: idmax = find(h(i) == Hmax) Among them, max() and min() are functions for finding the maximum and minimum values, respectively, and find() is a numerical search function; Step 2.2: Based on HL and HU, calculate the intermediate arrays h1(i) and h2(i): h1(i)=│h(i)-HL│ h2(i)=│h(i)-HU│ And calculate the four minimum values ​​of h1(i) and h2(i) in the two gray level value intervals [1idmax] and [idmax+1256]. h1_min1 = min(h1(1:idmax)) h1_min2=min(h1(idmax+1:256)) h2_min1 = min(h2(1:idmax)) h2_min2=min(h2(idmax+1:256)); Step 2.3: In the two grayscale value intervals [1idmax] and [idmax+1256] of arrays h1(i) and h2(i), find the corresponding grayscale values ​​A1, A2, B1, and B2 of the four minimum values ​​h1_min1, h1_min2, h2_min1, and h2_min2: A1=find(h1(1:idmax)==h1_min1) A2=find(h1(idmax+1:256)==h1_min2) B1=find(h2(1:idmax)==h2_min1) B2=find(h2(idmax+1:256)==h2_min2); Step 3 specifically includes the following steps: Step 3.1: Construct a new array C = [A1 A2 B1 B2], and calculate the upper gray-level segmentation threshold XL and the lower gray-level segmentation threshold XU: XL = round((A1+B1) / 2) XU = round((A2 + B2) / 2) Find the positions of the upper segmentation gray level threshold XL and the lower segmentation gray level threshold XU in the array id(n) of gray level value i: upper segmentation threshold id_XL, lower segmentation threshold id_XU: id_XL = find(id(n) == XL) id_XU = find(id(n) == XU) Step 3.2: Based on the positional segmentation thresholds id_XL and id_XU, divide arrays H(n) and id(n) into corresponding three-sub-arrays (H1(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)), and segment the mathematical expression: Here, end represents the last element of the array position, and j, k, and q are variables.

2. The adaptive image enhancement method for underground utility tunnel fires according to claim 1, characterized in that: Step 1 specifically includes the following steps: Step 1.1: Calculate the gray level histogram h(i) of the gray level input fire image I, which is the frequency value array of gray level i. h is the array name, and i is the gray level value, 1≤i≤256. Step 1.2: Arrange the values ​​of the grayscale histogram h(i) > 0 in ascending order of grayscale value i, and place the h(i) values ​​into a non-zero frequency array H(n). H(n)=h(i) Where h(i)>0, H is the array name, n is the position value of the frequency value array H(n), and 1≤n≤256; Step 1.3: For values ​​h(i) > 0, place i into id(n) in the order of increasing gray level value i. The expression is: id(n) = i, h(i) > 0, where id is the array name, id(n) is the array of gray level values ​​i, and n is the position value of the array id(n) of gray level values ​​i, 1≤n≤256.

3. The adaptive image enhancement method for underground utility tunnel fires according to claim 1, characterized in that: In step 4, the sub-histogram obtained in step 3 is enhanced according to the region, specifically as follows: Low grayscale areas: Using mapping methods to improve details in dark areas and enhance the visibility of potential fire features; Intermediate grayscale areas: Maintain or adjust to preserve the natural transitions and details of the image; High grayscale area: Compresses the bright areas while enhancing the contrast of the bright features of the flame.

4. The adaptive image enhancement method for underground utility tunnel fires according to claim 3, characterized in that: In step 4, the acquisition of the enhanced fire image specifically involves: remapping the pixel values ​​of the enhanced low grayscale area, intermediate grayscale area, and high grayscale area back to the corresponding positions in the original image, assigning a new grayscale value to each pixel in the image, and generating a global enhanced fire image.

5. The adaptive image enhancement method for underground utility tunnel fires according to claim 4, characterized in that: Step 4 specifically includes the following steps: Step 4.1: Calculate the new grayscale value array (idH1_x(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)) after mathematical transformation of the three sub-block arrays (H1(j), idH1(j); H2(k), idH2(k); H3(q), idH3(q)). This new array represents the grayscale values ​​of the enhanced output image. The transformation expression is: Where idH1(1), idH2(1), and idH3(1) are the first values ​​of the corresponding arrays, idH1(end), idH2(end), and idH3(end) are the last values ​​of the corresponding arrays, and length(idH1), length(idH2), and length(idH3) are the lengths of the corresponding arrays. The ranges of variables j, k, and q are: 1≤j≤length(idH1)), 1≤k≤length(idH2), and 1≤q≤length(idH3).

Citation Information

Patent Citations

  • Image enhancement and partition method

    CN103871029A

  • Global histogram equalization method of a self-adaptive threshold value

    CN109801246A