A boiler heating surface detection method and device, electronic equipment and storage medium
By preprocessing boiler heating surface images using edge-preserving noise reduction and adaptive contrast enhancement algorithms, and combining them with a target detection network based on a deep learning framework, the image quality problem under complex lighting conditions inside the boiler furnace is solved, improving the accuracy and robustness of defect identification.
Patent Information
- Application Number
- CN202610481470.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies suffer from image quality degradation under complex lighting conditions inside boiler furnaces, resulting in low defect recognition accuracy and failing to meet the high-precision requirements of drone inspections.
An edge-preserving noise reduction algorithm and an adaptive contrast enhancement algorithm are used to preprocess the boiler heating surface image, and a target detection network based on a deep learning framework is used for defect identification.
It significantly improves the accuracy and robustness of defect identification, overcomes image interference under non-uniform lighting conditions, and ensures the reliability of UAV inspection inside boilers.
Smart Images

Figure CN122368595A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method, apparatus, electronic device, and storage medium for detecting boiler heating surfaces. Background Technology
[0002] With the deep integration of artificial intelligence and drone inspection technology, drones have gradually become an important supplementary means for boiler furnace shutdown and maintenance in thermal power plants. During the unit's temporary shutdown maintenance window, drones can efficiently complete rapid inspections and defect identification inside the furnace.
[0003] In existing technologies, visual inspection methods based on convolutional neural networks are commonly used to identify defects in acquired images for automated inspection. However, the internal environment of boilers is complex, with insufficient and severely uneven lighting, leading to degraded image quality, such as low contrast, local overexposure or underexposure, and severe noise interference. These image quality issues significantly reduce the feature extraction capabilities of subsequent visual inspection algorithms, resulting in increased rates of missed or false detections of defects, thus limiting the practical application of automated inspection technologies.
[0004] To address the aforementioned issues, existing technologies attempt to employ image enhancement techniques for preprocessing. For example, histogram equalization (HE) is used to improve image contrast, or Gaussian filtering and median filtering are used for noise reduction. However, histogram equalization can easily lead to the loss of local image details or amplification of noise; while traditional filtering and denoising methods, while smoothing noise, often blur the edges and texture features of defects, hindering high-precision defect identification. Furthermore, existing methods typically treat denoising and enhancement as independent steps, lacking collaborative optimization for non-uniform lighting scenarios, resulting in preprocessing results that fail to meet the detection requirements of subsequent deep learning models. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method, apparatus, electronic device, and storage medium for detecting boiler heating surfaces.
[0006] In a first aspect, embodiments of the present invention provide a method for detecting the heating surface of a boiler, the method comprising: Acquire images of the boiler heating surface to be inspected; An edge-preserving denoising algorithm is used to denoise the boiler heating surface image to obtain the denoised image; An adaptive contrast enhancement algorithm is used to perform brightness equalization on the denoised image to obtain the preprocessed image. The preprocessed image is input into the pre-trained defect recognition model, which outputs the defect detection result. The defect recognition model is based on a deep learning framework and is trained on the preprocessed training image using an object detection network. Visualize and mark the defective areas in the defect detection results.
[0007] In conjunction with the first aspect, the defect identification model is trained through the following steps: Obtain boiler heating surface image samples and label the defects in the boiler heating surface image samples to obtain an initial training sample set; An edge-preserving denoising algorithm is used to denoise each initial training sample in the initial training sample set. An adaptive contrast enhancement algorithm is used to perform brightness equalization processing on the denoised image to obtain a training sample set; A defect recognition model is obtained by training a target detection network based on a deep learning framework using a training sample set.
[0008] In conjunction with the first aspect, the steps for denoising the boiler heating surface image using an edge-preserving denoising algorithm include: Set up a search window and a neighborhood window; the neighborhood window can be slid within the search window. Calculate the similarity between the neighborhood window centered on the target pixel and the sliding window, and assign a weight to it; Based on preset smoothing parameters, the denoised image is calculated according to the weights.
[0009] In conjunction with the first aspect, the steps of performing brightness equalization processing on the denoised image using an adaptive contrast enhancement algorithm include: The denoised image is segmented into multiple non-overlapping and continuous sub-blocks; For each sub-block, histogram equalization is performed on the sub-block, and a grayscale mapping function for the sub-block is established; The cropping amplitude of the sub-block is calculated based on the cropping factor. Pixels in each sub-block that exceed the cropping amplitude are cropped, and the total number of cropped pixels is evenly distributed to each gray level to correct the gray-level mapping function. Using the modified grayscale mapping function, interpolation is employed to calculate the new grayscale value of each pixel in the denoised image.
[0010] In conjunction with the first aspect, the steps of calculating the new grayscale values of each pixel in the denoised image using interpolation include: For each pixel, determine the number of adjacent reference points based on the pixel's location; When the number is four, obtain the corrected grayscale mapping function of the sub-block where each reference point is located, calculate the corresponding pixel value, and then obtain the pixel value of the pixel to be obtained through bilinear interpolation. When the number is two, obtain the corrected grayscale mapping function of the sub-block where the two reference points are located, calculate the corresponding pixel value respectively, and then obtain the pixel value of the pixel to be obtained through single linear interpolation. When the quantity is one, the pixel value of the desired pixel is directly calculated using the corrected grayscale mapping function of the sub-block where the reference point is located.
[0011] In conjunction with the first aspect, the steps for visually marking defect areas in the defect detection results include: Read the defect boundary box coordinate file, which includes the location information of the defect area and the corresponding defect type; Based on an image processing library, target outlines are drawn at the locations of the defect areas on the original boiler heating surface image. Add a text label at the predetermined location on the target outline to indicate the defect type.
[0012] In conjunction with the first aspect, defects in the boiler heating surface image samples are labeled, including: Import boiler heating surface image samples into the specified folder; Image annotation software was used to select and annotate defect areas in boiler heating surface image samples, and the corresponding defect types were labeled. Generate a labeling file containing the location information of the defect area and the corresponding defect type.
[0013] Secondly, the present invention provides a detection device for boiler heating surfaces, the device comprising: The acquisition module is used to acquire images of the boiler heating surface to be detected; The noise reduction module is used to perform noise reduction processing on the boiler heating surface image using an edge-preserving noise reduction algorithm to obtain a noise-reduced image; The equalization module is used to perform brightness equalization processing on the denoised image using an adaptive contrast enhancement algorithm to obtain the preprocessed image; The detection module is used to input the preprocessed image into the pre-trained defect recognition model and output the defect detection result. The defect recognition model is based on a deep learning framework and is trained on the preprocessed training image using an object detection network. The marking module is used to visually mark defect areas in the defect detection results.
[0014] Thirdly, the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor runs the computer program to cause the electronic device to perform the above-described method.
[0015] Fourthly, the present invention provides a readable storage medium storing computer program instructions, which are read and executed by a processor to perform the above-described method.
[0016] The embodiments of the present invention bring the following beneficial effects: The present invention provides a method for detecting boiler heating surfaces, the method comprising: acquiring an image of the boiler heating surface to be detected; performing noise reduction processing on the boiler heating surface image using an edge-preserving noise reduction algorithm to obtain a noise-reduced image; performing brightness equalization processing on the noise-reduced image using an adaptive contrast enhancement algorithm to obtain a preprocessed image; inputting the preprocessed image into a pre-trained defect recognition model and outputting defect detection results; wherein, the defect recognition model is based on a deep learning framework and is trained on the preprocessed training image using an object detection network; and visually marking the defect regions in the defect detection results.
[0017] This invention employs a combined edge-preserving noise reduction algorithm and an adaptive contrast enhancement algorithm in image preprocessing. This effectively suppresses noise while maintaining the integrity of defect edges and performs brightness equalization, significantly improving image contrast and detail clarity under non-uniform lighting conditions. Simultaneously, the defect recognition model is trained using the exact same preprocessing method as the detection stage, ensuring consistency in the distribution of training and detection data and enabling the model to fully learn the optimized and enhanced defect features. This invention effectively overcomes the interference of the complex lighting environment in boiler furnaces on visual inspection, improves the accuracy and robustness of defect recognition, and provides reliable technical support for intelligent UAV inspection of boiler interiors.
[0018] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0019] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 A schematic flowchart illustrating a method for detecting the heating surface of a boiler, provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of defect annotation on the boiler heating surface in an embodiment of the present invention; Figure 3The image shown is of the boiler heating surface in this embodiment of the invention before preprocessing with an edge-preserving and noise-reduction algorithm. Figure 4 The image shown is the boiler heating surface image in this embodiment of the invention after preprocessing with an edge-preserving and noise reduction algorithm; Figure 5 The image shown is before preprocessing using the CLAHE algorithm in this embodiment of the invention. Figure 6 The image is the result of preprocessing using the CLAHE algorithm in this embodiment of the invention. Figure 7 This is a schematic diagram of the grayscale distribution before preprocessing using the CLAHE algorithm in this embodiment of the invention; Figure 8 This is a schematic diagram of the grayscale distribution after preprocessing using the CLAHE algorithm in this embodiment of the invention; Figure 9 This is a schematic diagram of the boiler castable image defect recognition provided in an embodiment of the present invention; Figure 10 A schematic diagram of a detection device for a boiler heating surface provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of the electronic device structure provided in an embodiment of the present invention.
[0022] Figure label: 10 - Acquisition module, 20 - Noise reduction module, 30 - Equalization module, 40 - Detection module, 50 - Marking module; 130 - Processor, 131 - Memory, 132 - Bus, 133 - Communication interface. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] To facilitate understanding of this embodiment, the technical terms used in this invention will be briefly introduced below.
[0025] Non-uniform illumination: refers to the phenomenon that occurs in the acquired image due to factors such as the position of the light source, obstruction, and reflection in the complex environment inside the boiler furnace, resulting in local overexposure, underexposure, or uneven brightness distribution, which seriously affects the contrast and detail of the image.
[0026] Edge-preserving denoising algorithms refer to filtering algorithms that effectively preserve image edges and texture details while removing image noise. This invention preferably employs the Non-Local Means algorithm, which utilizes the global self-similarity of the image to achieve denoising through non-local mean filtering, smoothing noise while effectively preserving defect features.
[0027] Adaptive contrast enhancement algorithm: This refers to an enhancement algorithm that dynamically adjusts the contrast based on the brightness distribution characteristics of local areas of an image to improve image quality. In this invention, the adaptive histogram equalization (CLAHE) algorithm with limited contrast is preferably used. This algorithm improves contrast while avoiding noise amplification through block processing, cropping and limiting, and interpolation operations, resulting in a more uniform brightness distribution in the image.
[0028] Defect recognition model: This refers to a neural network model based on a deep learning framework and constructed using an object detection network, used for automatic defect recognition and localization of preprocessed boiler heating surface images. The defect recognition model in this invention is specifically trained on training images preprocessed using edge-preserving noise reduction and adaptive contrast enhancement algorithms, and can fully learn the optimized and enhanced defect features.
[0029] Pre-training refers to the process of training a model in advance using a pre-labeled training sample set before applying it to an actual detection task. This allows the model to learn the mapping relationship between image features and defect categories and locations. In this invention, the pre-trained defect recognition model can be directly used for defect detection in new images without the need for retraining before each use.
[0030] After introducing the technical terms involved in this invention, the application scenarios and design concepts of the embodiments of this invention will be briefly described below.
[0031] In current boiler heating surface inspections, images captured by drones are easily affected by non-uniform lighting inside the furnace, resulting in low contrast and severe noise interference. Traditional image enhancement and noise reduction methods struggle to balance detail preservation and noise suppression, impacting the accuracy of subsequent defect identification.
[0032] Based on this, embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for detecting boiler heating surfaces, so as to improve the accuracy of defect identification when the image quality of boiler heating surfaces is poor under non-uniform lighting conditions.
[0033] Example 1 This invention provides a method for detecting the heating surface of a boiler, combined with... Figure 1 As shown, the method includes: S110, acquire an image of the boiler heating surface to be inspected.
[0034] S120 uses an edge-preserving noise reduction algorithm to denoise the boiler heating surface image, resulting in a denoised image.
[0035] S130 uses an adaptive contrast enhancement algorithm to perform brightness equalization on the denoised image to obtain the preprocessed image.
[0036] S140, the preprocessed image is input into the pre-trained defect recognition model, and the defect detection result is output; wherein, the defect recognition model is based on a deep learning framework and is trained on the preprocessed training image using an object detection network.
[0037] S150, visually marks the defect areas in the defect detection results.
[0038] The boiler heating surface detection method provided by this invention applies an edge-preserving noise reduction algorithm and an adaptive contrast enhancement algorithm in synergistic image preprocessing. This effectively suppresses noise while maintaining the integrity of defect edges and equalizes brightness, significantly improving the contrast and detail clarity of images under non-uniform lighting conditions. Simultaneously, the defect recognition model is trained using the exact same preprocessing method as the detection stage, ensuring the consistency of training and detection data distribution. This allows the model to fully learn the optimized and enhanced defect features, effectively overcoming the interference of the complex lighting environment of the boiler furnace on visual detection. This significantly improves the accuracy and robustness of defect recognition, providing reliable technical support for intelligent UAV inspection of boiler interiors.
[0039] In conjunction with the first aspect, in step S140, the defect identification model is trained through the following steps: S1401, Obtain boiler heating surface image samples and label the defects in the boiler heating surface image samples to obtain the initial training sample set.
[0040] Specifically, in step S1401, a large number of images of the boiler's heating surfaces are first collected as training samples. These images can be obtained through methods such as drone inspections or images taken during boiler shutdown maintenance. After collection, image labeling software (such as labelimg) is used to manually label the defective areas in the images. The labeling method involves selecting the defective area and recording the corresponding defect type (such as cracks, missing pins, coating peeling, etc.). The labeling results are saved in a structured file (such as JSON or TXT format), containing the bounding box coordinates of the defective areas and defect category labels. The labeled images and the labeled file together constitute the initial training sample set, providing standard data required for supervised learning in subsequent model training.
[0041] S1402 uses an edge-preserving denoising algorithm to denoise each initial training sample in the initial training sample set.
[0042] In step S1402, each image in the initial training sample set is processed using an edge-preserving noise reduction algorithm to remove noise interference introduced during the acquisition process while preserving the edge and texture details of the defects. This invention preferably uses the Non-Local Means algorithm for edge-preserving noise reduction. This algorithm sets a search window (D×D) and a neighborhood window (d×d), calculates the similarity between the neighborhood window and each sliding window within the search window, centered on the target pixel, and assigns weights accordingly. Finally, it calculates the denoised pixel value based on a preset smoothing parameter h. The advantage of this algorithm is that it utilizes the global self-similarity of the image for noise reduction, effectively suppressing noise without blurring edges, making defect features clearer and more identifiable.
[0043] S1403 uses an adaptive contrast enhancement algorithm to perform brightness equalization on the denoised image to obtain a training sample set.
[0044] In step S1403, the denoised image is further processed using an adaptive contrast enhancement algorithm for brightness equalization to address issues such as low image contrast, local overexposure, or underexposure caused by uneven illumination inside the boiler furnace. This invention preferably employs a contrast-limited adaptive histogram equalization (CLAHE) algorithm. Specifically, the image is first divided into multiple non-overlapping and continuous sub-blocks, and histogram equalization is performed on each sub-block to establish a grayscale mapping function; then, based on the cropping coefficient... Calculate the cutting width For each sub-block, exceeding The process involves cropping pixels and evenly distributing the cropped pixels across all gray levels to correct the gray-level mapping function. Finally, using the corrected gray-level mapping function, interpolation (bilinear interpolation, unilinear interpolation, or direct value taking) is applied to calculate the new gray-level value for each pixel based on its location. This process significantly improves image contrast and detail clarity while avoiding the noise amplification problem that can occur with traditional histogram equalization.
[0045] S1404: A defect recognition model is obtained by training a target detection network based on a deep learning framework using a training sample set.
[0046] In step S1404, the training sample set obtained after the above preprocessing is used as input to train the object detection network. Preferably, this invention uses a Faster R-CNN convolutional neural network as the object detection network, implemented based on the PyTorch deep learning framework. During training, the network takes the preprocessed image as input and the labeled defect region bounding boxes and category labels as supervision signals. The network parameters are continuously optimized through backpropagation, enabling the model to learn the mapping relationship from image features to defect categories and locations. After training, the model parameters are saved in a specified format (e.g., rain.pt, for subsequent loading and calling), resulting in a defect recognition model applicable to practical detection tasks.
[0047] The edge-preserving noise reduction algorithm and adaptive contrast enhancement algorithm used in steps S1401 to S1404 are exactly the same as those used in steps S120 and S130 of the detection stage. This consistent preprocessing design in the training and detection processes ensures the consistency of the distribution of training data and detection data, enabling the model to fully learn the optimized and enhanced defect features, thereby achieving higher recognition accuracy and robustness in the detection stage.
[0048] In step S110, the first step is to acquire images of the boiler heating surface to be inspected. These images can be real-time images collected by a drone inspection system inside the boiler furnace, or offline images captured manually or by a fixed camera during boiler shutdown and maintenance. The internal environment of the boiler furnace is complex, with severely insufficient and unevenly distributed lighting. Factors such as the position of the light source, furnace structure obstruction, and high-temperature environment can all lead to localized overexposure, loss of detail in dark areas, and low contrast in the acquired images. These image quality issues directly affect the accuracy of subsequent defect identification; therefore, the acquired raw images need to be optimized and enhanced through subsequent preprocessing steps. The boiler heating surface images acquired in this invention cover various typical parts of the boiler heating surface, including the surface of the castable refractory, pin areas, and pipe joints. The images may contain various defect types such as cracks, missing pins, coating peeling, and wear, providing a raw data foundation for subsequent defect identification.
[0049] In conjunction with the first aspect, step S120 employs an edge-preserving denoising algorithm to denoise the boiler heating surface image, specifically including: S121, Set the search window and the neighborhood window, and let the neighborhood window slide within the search window.
[0050] S122, calculate the similarity between the neighborhood window centered on the target pixel and the sliding window, and assign a weight to it.
[0051] S123 calculates the denoised image based on preset smoothing parameters and weights.
[0052] Step S120 aims to remove noise interference (such as sensor noise, transmission noise, etc.) introduced during the acquisition of the boiler heating surface image, while preserving the edge and texture details of defects, avoiding image blurring problems caused by traditional filtering methods. This invention preferably employs a Non-Local Means algorithm for edge-preserving noise reduction. This algorithm utilizes the global self-similarity of the image and, through a non-local means filtering mechanism, smooths noise while effectively preserving the characteristics of defects. Specifically, it includes the following sub-steps: Specifically, step S121 first sets two fixed-size windows: a large search window (D×D) and a small neighborhood window (d×d). The search window, centered on the target pixel, covers a large image area and is used to find pixel blocks similar to the current pixel. The neighborhood window, on the other hand, is a local region centered on a specific pixel, used to represent the texture structure around that pixel. During processing, the neighborhood window slides pixel-by-pixel within the search window. After each slide, the similarity between the neighborhood region corresponding to the currently sliding window and the neighborhood region of the target pixel is compared. For example, for each pixel in the image, a d×d neighborhood window is created centered on that pixel. Simultaneously, within the D×D search window surrounding that pixel, the neighborhood window is slid sequentially to every possible position, forming multiple neighborhood blocks to be compared. This in-window sliding comparison mechanism allows the algorithm to find similar structures over a large area, thereby utilizing non-local information for noise reduction.
[0053] Subsequently, in step S122, for each sliding position within the search window, the target pixel is calculated. The neighborhood window centered on the sliding window and the pixel centered on the sliding window The similarity is calculated between neighboring windows centered on the sliding window. Similarity is typically measured using the Euclidean distance or Gaussian weighted Euclidean distance between pixel values within two neighboring windows; a smaller distance indicates greater similarity between the two neighborhoods. Based on the similarity magnitude, the center pixel of the sliding window is used as the reference point. Assign weights The higher the similarity, the larger the weight, indicating a greater contribution of that pixel to the target pixel x; conversely, the lower the similarity, the smaller the weight. The formula for calculating the weight is as follows:
[0054] in, To target pixels The pixel value vector of the neighborhood window centered on the center. The center pixel of the sliding window The pixel value vector of the neighborhood window centered on the center. Indicates target pixel With the center pixel The square of the Euclidean distance between two vectors. The preset smoothing parameters, As a normalization factor, it ensures that the sum of all weights is 1. This weighting mechanism based on structural similarity allows the algorithm to refer more to pixel information that is structurally similar to the target pixel, thereby achieving edge-preserving noise reduction.
[0055] For target pixel denoised pixel values Defined as all pixels within the search window pixel values Its corresponding weight The weighted average. The calculation formula is as follows:
[0056] in, The similarity was calculated as described above and satisfies the normalization condition (the sum of all values is 1). Preset smoothing parameters. Used to control the degree of weight decay: The larger the value, the smaller the impact of similarity differences on the weights, and the smoother the noise reduction effect, but some details may be lost. The smaller the value, the more concentrated the weight distribution, resulting in better detail preservation, but a relatively weaker noise reduction capability. In practical applications, an appropriate value can be selected based on the image noise level and the importance of the defect features. The value is calculated by iterating through all pixels in the image to obtain the denoised complete image. This algorithm fully utilizes the global redundancy information of the image, effectively preserving the edge and texture details of defects while smoothing noise. Figure 3 As shown, the original image before noise reduction contains significant noise interference, and the edges of the defective areas are blurred, making them difficult to identify accurately; for example... Figure 4 As shown, after noise reduction using the Non-Local Means algorithm, image noise is effectively suppressed, defect edges are clearer, and texture details are fully preserved, providing a good image foundation for subsequent brightness equalization processing.
[0057] In conjunction with the first aspect, step S130 employs an adaptive contrast enhancement algorithm to perform brightness equalization processing on the denoised image, specifically including: S131, the denoised image is segmented into multiple non-overlapping and continuous sub-blocks.
[0058] S132, for each sub-block, perform histogram equalization on the sub-block and establish the grayscale mapping function of the sub-block.
[0059] S133: Calculate the cropping amplitude of the sub-block based on the cropping coefficient, crop the pixels in each sub-block that exceed the cropping amplitude, and distribute the total number of cropped pixels evenly to each gray level to correct the gray-level mapping function.
[0060] S134 uses the modified grayscale mapping function to calculate the new grayscale value of each pixel in the denoised image using interpolation.
[0061] Step S130 aims to address issues such as low image contrast, local overexposure, or underexposure caused by uneven lighting inside the boiler furnace. By performing brightness equalization on the denoised image, the brightness distribution is made more uniform, significantly improving clarity and contrast, while highlighting edge details of defects. This invention preferably employs a contrast-limited adaptive histogram equalization (CLAHE) algorithm. This algorithm introduces block processing, cropping and limiting, and interpolation operations on top of traditional histogram equalization, effectively avoiding noise amplification and local over-enhancement. Specifically, it includes the following sub-steps: First, step S131 divides the denoised image into n×m non-overlapping and continuous sub-blocks. The size of each sub-block can be determined according to the image resolution and actual needs. The choice of sub-block size directly affects the enhancement effect: the larger the sub-block size, the more obvious the image enhancement effect, but the more image details are lost; the smaller the sub-block size, the stronger the local adaptability, but it may introduce block artifacts.
[0062] By appropriately setting the sub-block size, a balance can be achieved between global enhancement and preservation of local details. Each sub-block contains a number of pixels, and subsequent processing is performed independently for each sub-block, allowing the enhancement algorithm to adaptively adjust the contrast based on the brightness distribution characteristics of each local region.
[0063] Subsequently, step S132 performs histogram equalization on each of the segmented sub-blocks. First, the grayscale histogram of the sub-block is calculated, and then... It means that, among them The grayscale level is then used. Based on histogram information, a grayscale mapping function is established for each sub-block. This function maps the original grayscale value to a new grayscale value, making the grayscale distribution of pixels within the sub-block more uniform. By establishing an independent mapping function for each sub-block, the CLAHE algorithm can perform differentiated enhancement based on the brightness distribution characteristics of each local region, thus better adapting to the illumination differences in different areas of the image under non-uniform lighting conditions.
[0064] To avoid the noise amplification problem caused by over-enhancement in traditional histogram equalization, this step introduces a clipping and limiting mechanism. First, based on the clipping coefficient... Calculate the cutting width The calculation formula is as follows:
[0065] in, In each sub-block The number of pixels in the direction; In each sub-block Number of pixels in the direction, This represents the grayscale level of the corresponding sub-block. This is the preset clipping factor.
[0066] Calculate the cutting width Then, for sub-blocks exceeding... The pixels are cropped, and the total number of pixels exceeding the limit is counted. The calculation formula is as follows:
[0067] The total number of pixels S obtained from cropping is evenly distributed among the gray levels, and the average number of pixels A distributed among each gray level is:
[0068] Then the histogram is redistributed, increasing the value of each gray level. Each pixel forms the corrected histogram. Specifically:
[0069] That is, if some gray levels still exceed T after allocation, the cropping and allocation process is repeated until all gray levels do not exceed T. Finally, the gray-level mapping function is recalculated based on the corrected histogram to correct the original mapping function. This mechanism effectively limits the excessive enhancement of local contrast and avoids the amplification of noise.
[0070] Step S134 is to eliminate the block effect (i.e., the phenomenon of sudden changes in pixel values at the boundaries of sub-blocks) that may be introduced by block processing. This step uses interpolation to calculate the new gray value of each pixel.
[0071] Through the processing steps S131 to S134 above, the CLAHE algorithm effectively controls noise amplification and block artifacts while improving image contrast and enhancing edge details. This results in a more uniform brightness distribution, significantly improved clarity and contrast, and provides high-quality input images for subsequent defect recognition models. Figure 5 As shown, the image before CLAHE algorithm preprocessing suffers from uneven brightness distribution, low contrast in local areas, and difficulty in distinguishing defect details; for example... Figure 6 As shown, the image preprocessed using the CLAHE algorithm exhibits a more uniform brightness distribution, significantly improved contrast, and clearly visible defect edges and texture details. Figure 7As shown, the grayscale distribution before preprocessing is concentrated within a narrow grayscale range, resulting in low overall image contrast; for example... Figure 8 As shown, the preprocessed grayscale distribution is more uniform across the entire grayscale range, effectively expanding the dynamic range of the image and thus significantly improving the visual effect and defect identifiability. Through the CLAHE algorithm described above, image quality is significantly improved, providing high-quality input images for subsequent defect recognition models.
[0072] In conjunction with the first aspect, step S134 includes: S1341, for each pixel, determine the number of adjacent reference points based on the pixel's location.
[0073] S1342, when the quantity is four, obtain the corrected grayscale mapping function of the sub-block where each reference point is located, calculate the corresponding pixel value, and then obtain the pixel value of the desired pixel point through bilinear interpolation.
[0074] S1343, when the quantity is two, obtain the corrected grayscale mapping function of the sub-block where the two reference points are located, calculate the corresponding pixel value respectively, and then obtain the pixel value of the desired pixel point through single linear interpolation operation.
[0075] S1344, when the quantity is one, the pixel value of the desired pixel is directly calculated using the corrected grayscale mapping function of the sub-block where the reference point is located.
[0076] To eliminate block artifacts (i.e., abrupt changes in pixel values at sub-block boundaries) that may be introduced by block processing, this step uses interpolation to calculate the new grayscale value of each pixel. The interpolation method is determined based on the relative relationship between the pixel's location and the center point of adjacent sub-blocks, and specifically includes the following sub-steps: For each pixel in the image, the spatial relationship between its location and the center point of each sub-block is first determined. Since step S131 divides the image into multiple non-overlapping and continuous sub-blocks, each sub-block has a central reference point. Based on the pixel's position relative to the centers of these sub-blocks, the number of its neighboring reference points can be determined: if the pixel is located inside the sub-block (far from the boundary), there is only one reference point; if the pixel is located on the boundary of the sub-block (but not a corner point), there are two reference points; if the pixel is located at the intersection of four sub-blocks (corner area), there are four reference points. Determining the number of neighboring reference points provides a basis for subsequently selecting the appropriate interpolation method.
[0077] Specifically, when a pixel is located at the boundary of four sub-blocks, there are four adjacent reference points. First, the corrected grayscale mapping function of the sub-block containing these four reference points is obtained. The original grayscale value of the pixel in that sub-block is then substituted into the mapping function to calculate the four corresponding pixel values. Next, bilinear interpolation is performed using these four pixel values. Bilinear interpolation takes into account the positional relationship of the pixel in both the horizontal and vertical directions. The final pixel value is obtained through two linear interpolations, as shown in the following formula:
[0078] in, , , , These are the pixel values calculated using the corrected grayscale mapping function for the sub-blocks containing the four reference points. 、( ), ( ), ( The coordinates are the center coordinates of the four sub-blocks. Bilinear interpolation can smoothly fuse the grayscale information of the four sub-blocks, enabling a natural transition of the new grayscale values of pixels between sub-blocks and effectively eliminating block artifacts.
[0079] When a pixel is located on the boundary (not a corner) of two sub-blocks, there are two adjacent reference points. First, the corrected grayscale mapping function for the sub-block containing these two reference points is obtained. The original grayscale value of the pixel in that sub-block is then substituted into the mapping function to calculate the two corresponding pixel values. Next, single-linear interpolation is performed using these two pixel values. Single-linear interpolation is based on a linear weighted average of the relative positions of the pixels on the line connecting the two reference points. The calculation formula is as follows:
[0080] in, The pixel value of the desired pixel. The pixel values obtained after mapping transformation These are the pixel values obtained after the mapping transformation. These are the center coordinates of two adjacent sub-blocks.
[0081] By using single-linear interpolation, the grayscale changes at the boundary between the two sub-blocks are made smoother, avoiding obvious step-like abrupt changes.
[0082] When a pixel is located inside a sub-block (far from the boundary), it has only one adjacent reference point. In this case, no interpolation is needed; the corrected grayscale mapping function of the sub-block containing the reference point is directly used. The original grayscale value of the pixel is substituted into the mapping function to obtain the new grayscale value of the pixel. This method ensures the consistency of pixels within the sub-block while avoiding unnecessary computational overhead, thus improving processing efficiency.
[0083] Through the interpolation operations in S1341 to S1344, the CLAHE algorithm effectively eliminates the block effect at the sub-block boundary while maintaining the contrast enhancement effect within the sub-block, making the brightness transition of the entire image smoother and more natural, and providing a high-quality preprocessed image for the subsequent defect recognition model.
[0084] In conjunction with the first aspect, step S150 includes: S151, Read the defect boundary box coordinate file. The defect boundary box coordinate file includes the location information of the defect area and the corresponding defect type.
[0085] S152, based on the image processing library, draw the target outline at the location of the defect area on the original boiler heating surface image.
[0086] S153, add a text label at the predetermined position of the target frame to indicate the defect type.
[0087] Step S150 aims to present the detection results output by the defect identification model on the original image in an intuitive and visual way, facilitating manual review, result display, and subsequent analysis. Specifically, it includes the following sub-steps: Specifically, when outputting detection results, the defect identification model saves the location information of each identified defect region (usually the coordinates of the top-left corner of the bounding box, its width, and height) and the corresponding defect type (such as cracks, missing pins, coating peeling, etc.) as a structured file. This step first reads this file to obtain the bounding box coordinates and type labels of all defect regions. The file format can be common formats such as JSON, TXT, or XML for easy subsequent processing. For example, in a JSON format file, each defect entry contains "bbox" (bounding box coordinates) and "category" (defect type) fields; by parsing these fields, complete detection result information can be obtained.
[0088] Subsequently, after reading the defect bounding box coordinate file, the corresponding original boiler heating surface image is loaded using an image processing library (such as OpenCV or Pillow). Then, based on the bounding box position information of each defect region recorded in the coordinate file, a rectangular frame is drawn on the corresponding area in the image. This invention preferably uses red as the frame color to clearly identify the defect region. During drawing, the rectangle drawing function of the image processing library can be called according to the bounding box coordinate parameters (coordinates of the upper left corner, width, and height), and parameters such as line width and color can be set. In this way, each defect region is clearly outlined, facilitating quick location of the defect by the observer.
[0089] After drawing the rectangular outlines, text labels are added at predetermined positions within each rectangle to indicate the specific type of defect. The content of the text labels is the defect type recorded in the defect boundary coordinate file (e.g., "crack," "missing pin," etc.). When adding text labels, the text drawing functions of the image processing library are used to set parameters such as font, font size, and color (usually a color contrasting with the outline, such as white or black) to ensure the labels are clearly readable. In this way, observers can not only quickly locate the defect area but also directly understand the type of defect without needing to consult additional information.
[0090] Through the processing in steps S151 to S153 above, the detection results of the defect identification model are visually presented on the original boiler heating surface image in the form of red rectangles and text labels, forming a result image with visual annotations. This visual annotation method facilitates subsequent analysis and display, providing intuitive and convenient support for the rapid location of boiler heating surface defects, manual verification, and the generation of inspection reports. Taking the defect of boiler castable pins as an example, the defect image annotated after analysis by the defect identification model is as follows: Figure 9 As shown in the figure, the red box clearly marks the location of the missing pin, and the defect type is marked in the upper left corner, making the inspection results clear at a glance.
[0091] In conjunction with the first aspect, the step of annotating defects in the boiler heating surface image sample in step S1401 specifically includes: S1401a, Import boiler heating surface image samples to the specified folder.
[0092] S1401b uses image annotation software to select and annotate defect areas in boiler heating surface image samples, and labels the corresponding defect types.
[0093] S1401c generates a labeling file containing the location information of the defect area and the corresponding defect type.
[0094] Step S1401 aims to construct the foundation dataset for training the defect identification model. This is achieved by accurately labeling defects in the collected boiler heating surface image samples, providing supervision signals for subsequent model training. Specifically, it includes the following sub-steps: First, all collected boiler heating surface image samples are stored in a designated folder, which serves as the original image library for training data. Image sample acquisition methods can include drone inspections, manual photography during boiler shutdowns, or real-time acquisition using fixed cameras. For ease of management and subsequent processing, it is recommended to name the image samples according to certain rules (such as categorizing them by acquisition time, location, or defect type) and store them in a structured folder directory. For example, all image samples can be imported into a folder named "strain," which serves as the root directory of the training set. Subsequent annotation tools will directly read images from this directory for annotation operations. This standardized file management method facilitates subsequent batch annotation and training.
[0095] Subsequently, after the image samples are imported into a designated folder, the defect areas in each image are manually labeled using image labeling software. This invention preferably uses labelimg image labeling software, which is developed based on the Python language, provides an intuitive graphical interface, and supports rectangular selection labeling. During labeling, the operator selects the defect area in the image using the mouse, forming a rectangular bounding box that precisely covers the location of the defect. Simultaneously, a corresponding defect type is assigned to each selected defect area (such as "crack," "missing pin," "coating peeling," "wear," etc.). This bounding box labeling method not only includes the location information of the defect but also assigns a semantic category label to the defect, providing a supervisory signal for the subsequent model to learn the mapping relationship between defect features and categories. Taking the image labeling of boiler castable pin defects as an example, as follows... Figure 2 As shown, the operator draws a rectangle at the location where the pin is missing in the image and labels the defect type as "pin missing", thus completing the labeling of the defect sample.
[0096] After all image samples are labeled, the image labeling software automatically generates corresponding label files. These files record the location information of all defect regions in each image and their corresponding defect types. The label files can be in common structured formats such as JSON, XML, or TXT. Taking JSON format as an example, the label file typically includes fields such as image filename, image size, and a list of defects. Each defect entry records the coordinates of the bounding box (e.g., top-left x-coordinate, top-left y-coordinate, width, and height) and a defect type label. The generation of the label files establishes a one-to-one correspondence between image samples and label information, forming the initial training sample set. This training sample set serves as the foundation for subsequent model training. By learning the mapping relationship between image features and defect labels in these labeled samples, the defect recognition model gradually masters the ability to automatically identify and locate defects from images.
[0097] Secondly, embodiments of the present invention also provide a detection device for boiler heating surfaces, combined with Figure 10 As shown, the device includes: an acquisition module 10, a noise reduction module 20, an equalization module 30, a detection module 40, and a marking module 50.
[0098] The acquisition module 10 is used to acquire images of the boiler heating surface to be detected.
[0099] The noise reduction module 20 is used to perform noise reduction processing on the boiler heating surface image using an edge-preserving noise reduction algorithm to obtain a noise-reduced image.
[0100] The equalization module 30 is used to perform brightness equalization processing on the denoised image using an adaptive contrast enhancement algorithm to obtain the preprocessed image.
[0101] The detection module 40 is used to input the preprocessed image into the pre-trained defect recognition model and output the defect detection result; wherein, the defect recognition model is based on a deep learning framework and is trained on the preprocessed training image using an object detection network.
[0102] The marking module 50 is used to visually mark the defect areas in the defect detection results.
[0103] The boiler heating surface detection device provided in this embodiment of the invention, through the coordinated operation of the noise reduction module 20 and the equalization module 30, first uses an edge-preserving noise reduction algorithm to suppress noise while preserving the integrity of defect edges, and then uses an adaptive contrast enhancement algorithm to equalize the brightness, significantly improving the contrast and detail clarity of the image under non-uniform lighting conditions. Simultaneously, the defect recognition model used in the detection module 40 is specifically trained on training images processed using the same preprocessing method, ensuring the consistency of the distribution between training data and detection data, enabling the model to fully learn the optimized and enhanced defect features. The collaborative work of these modules forms a complete processing chain of edge-preserving noise reduction, adaptive enhancement, deep learning detection, and visual labeling, effectively overcoming the interference of the complex lighting environment of the boiler furnace on visual detection, significantly improving the accuracy and robustness of defect recognition, and providing a reliable automated detection solution for intelligent UAV inspection of boiler interiors.
[0104] Thirdly, embodiments of the present invention provide an electronic device, combined with Figure 11 As shown, the electronic device includes a memory 131 and a processor 130. The memory 131 stores a computer program, and the processor 130 runs the computer program to make the electronic device perform the above-described method.
[0105] Furthermore, combined Figure 11 The electronic device shown also includes a bus 132 and a communication interface 133, with the processor 130, the communication interface 133 and the memory 131 connected via the bus 132.
[0106] The memory 131 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 133 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 132 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0107] Processor 130 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 130 or by instructions in software form. Processor 130 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 131, and processor 130 reads the information in memory 131 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0108] Fourthly, embodiments of the present invention provide a readable storage medium storing computer program instructions, which are read and executed by a processor to perform the above-described method.
[0109] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0110] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0111] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part 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 of 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.
[0112] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0113] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting the heating surface of a boiler, characterized in that, The method includes: Acquire images of the boiler heating surface to be inspected; An edge-preserving noise reduction algorithm is used to denoise the image of the boiler heating surface to obtain a denoised image. An adaptive contrast enhancement algorithm is used to perform brightness equalization processing on the denoised image to obtain a preprocessed image; The preprocessed image is input into a pre-trained defect recognition model, and the defect detection result is output; wherein, the defect recognition model is based on a deep learning framework and is trained on the preprocessed training image using an object detection network; The defect areas in the defect detection results are visually marked.
2. The method according to claim 1, characterized in that, The defect identification model is trained through the following steps: Obtain boiler heating surface image samples and label the defects in the boiler heating surface image samples to obtain an initial training sample set; The edge-preserving denoising algorithm is used to denoise each initial training sample in the initial training sample set; The adaptive contrast enhancement algorithm is used to perform brightness equalization processing on the denoised image to obtain a training sample set; The target detection network based on a deep learning framework is trained using the training sample set to obtain a defect recognition model.
3. The method according to claim 1, characterized in that, The steps of denoising the boiler heating surface image using an edge-preserving denoising algorithm include: Set a search window and a neighborhood window, wherein the neighborhood window slides within the search window; Calculate the similarity between the neighborhood window centered on the target pixel and the sliding window, and assign a weight to it; Based on preset smoothing parameters, the denoised image is calculated according to the weights.
4. The method according to claim 1, characterized in that, The step of performing brightness equalization processing on the denoised image using an adaptive contrast enhancement algorithm includes: The denoised image is divided into multiple non-overlapping and continuous sub-blocks; For each sub-block, histogram equalization is performed on the sub-block, and a grayscale mapping function for the sub-block is established; The cropping amplitude of the sub-block is calculated based on the cropping factor. Pixels in each sub-block that exceed the cropping amplitude are cropped, and the total number of cropped pixels is evenly distributed to each gray level to correct the gray-level mapping function. Using the modified grayscale mapping function, interpolation is employed to calculate the new grayscale value of each pixel in the denoised image.
5. The method according to claim 4, characterized in that, The step of calculating the new grayscale value of each pixel in the denoised image using interpolation includes: For each pixel, the number of adjacent reference points is determined based on the location of the pixel; When the number is four, the corrected grayscale mapping function of the sub-block where each reference point is located is obtained, the corresponding pixel value is calculated respectively, and then the pixel value of the pixel point is obtained by bilinear interpolation. When the number is two, obtain the corrected grayscale mapping function of the sub-block where the two reference points are located, calculate the corresponding pixel value respectively, and then obtain the pixel value of the pixel point by single linear interpolation. When the quantity is one, the pixel value of the desired pixel is directly calculated using the corrected grayscale mapping function of the sub-block where the reference point is located.
6. The method according to claim 1, characterized in that, The step of visually marking the defect areas in the defect detection results includes: Read the defect boundary box coordinate file, which includes the location information of the defect region and the corresponding defect type; Based on the image processing library, target outlines are drawn on the original boiler heating surface image at the locations corresponding to the defect areas; Add a text label at a predetermined position on the target frame to indicate the defect type.
7. The method according to claim 2, characterized in that, Defects in the boiler heating surface image samples are labeled, including: Import the boiler heating surface image samples into the specified folder; Image annotation software was used to select and annotate the defective areas in the boiler heating surface image samples, and the corresponding defect types were labeled. Generate a labeling file containing the location information of the defect area and the corresponding defect type.
8. A detection device for boiler heating surfaces, characterized in that, The device includes: The acquisition module is used to acquire images of the boiler heating surface to be detected; The noise reduction module is used to perform noise reduction processing on the boiler heating surface image using an edge-preserving noise reduction algorithm to obtain a noise-reduced image; The equalization module is used to perform brightness equalization processing on the denoised image using an adaptive contrast enhancement algorithm to obtain a preprocessed image. The detection module is used to input the preprocessed image into a pre-trained defect recognition model and output the defect detection result; wherein, the defect recognition model is based on a deep learning framework and is trained on the preprocessed training image using an object detection network; The marking module is used to visually mark the defect areas in the defect detection results.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program and the processor running the computer program to cause the electronic device to perform the method of any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores computer program instructions, which, when read and executed by a processor, perform the method described in any one of claims 1 to 7.