Micro-channel aluminum flat tube appearance detection method based on image processing
By combining multispectral imaging and the improved YOLOv3 algorithm, the problem of early corrosion defects in microchannel aluminum flat tubes is solved, achieving high-precision identification and classification of minute defects and improving detection efficiency.
Patent Information
- Application Number
- CN202510283285.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-03-11
AI Technical Summary
Existing RGB visual inspection methods have difficulty distinguishing early corrosion defects in microchannel aluminum flat tubes, are affected by reflection interference and miss micro-cracks, and YOLO has difficulty detecting small target defects.
A multispectral imaging system is used to combine RGB, polarized light, infrared and ultraviolet spectral images for image preprocessing and super-resolution reconstruction. The YOLOv3 algorithm is improved, and defect detection is optimized by combining multimodal data fusion and dynamic judgment threshold methods.
It improves the accuracy of appearance inspection of microchannel aluminum flat tubes, enabling timely detection of early corrosion defects, reducing missed and false detections, and improving inspection efficiency.
Smart Images

Figure CN120163798B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of appearance detection, and in particular to a micro-channel aluminum flat tube appearance detection method based on image processing. BACKGROUND
[0002] In the large-scale production process of micro-channel aluminum flat tubes, the surface quality directly affects the heat exchange performance and service life of the product, so appearance detection is extremely important. Currently, automatic detection methods based on machine vision are generally used on industrial production lines, combined with deep learning target detection technology, to automatically identify common defects such as surface scratches and depressions.
[0003] In actual application, the detection environment of aluminum flat tubes is complex, and the material surface has high reflectivity. Illumination changes easily cause overexposure or shadows in local areas, and some defects are difficult to identify. Even if polarized light or multi-angle imaging is introduced, it is also difficult to completely eliminate the interference of specular reflection, resulting in the defect information of some highlight areas being covered.
[0004] In addition, some defects are extremely small in the early stage, such as micro-cracks caused by stress accumulation during manufacturing or service, or local corrosion points caused by environmental factors. The contrast of these defects in the RGB image is extremely low, and the traditional YOLO-based detection method is difficult to stably distinguish between normal and defective areas. Especially for corrosion defects, their early forms generally show very small color differences or slight changes in local energy distribution, and do not form obvious geometric features. Therefore, there is an urgent need for a micro-channel aluminum flat tube appearance detection method based on image processing to solve such problems. SUMMARY
[0005] In view of the above existing problems, the present application is proposed.
[0006] The present application provides a micro-channel aluminum flat tube appearance detection method based on image processing to solve the problems of existing RGB visual detection that cannot distinguish early corrosion, is disturbed by reflection, misses micro-cracks, and YOLO cannot detect small target defects.
[0007] To solve the above technical problems, the present application provides the following technical solutions:
[0008] The present application provides a micro-channel aluminum flat tube appearance detection method based on image processing, which comprises,
[0009] Step S1, collecting the collected image of the micro-channel aluminum flat tube, using a multispectral imaging system, combining polarized light imaging on the basis of RGB visible light, and additionally acquiring infrared spectrum images and ultraviolet spectrum images;
[0010] Step S2, the collected image is preprocessed, including light balance, local contrast enhancement and background suppression, wherein the limitation contrast adaptive histogram CLAHE equalization is used to enhance the visibility of the corrosion defect;
[0011] Step S3, based on the collected image preprocessed in step S2, super-resolution reconstruction is carried out, the super-resolution ESRGAN algorithm is used to enhance the details of the low-resolution region, and a super-resolution image is generated;
[0012] Step S4, based on the super-resolution image generated in step S3, the improved YOLOv3 defect detection algorithm is used to extract the defect area and carry out target detection, and the defect area is extracted;
[0013] Step S5, the defect area extracted in step S4 is classified, the infrared spectrum image, the ultraviolet spectrum image and the visible light information are combined, and the temperature anomaly and the spectral absorption characteristics of the defect area are analyzed through multi-modal data fusion;
[0014] Step S6, based on the defect area classified in step S5, a dynamic threshold determination method is used, the defect determination standard is optimized combined with historical data, and the final detection result is determined.
[0015] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, wherein: the infrared spectrum image is used for detecting the surface temperature difference.
[0016] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, wherein: the step of preprocessing the collected image is:
[0017] The light balance processing is carried out, the collected image is normalized, and the conversion formula is:
[0018] ,
[0019] Wherein, is the gray value of the original collected image, is the normalized image, is the minimum value of the image pixel value, is the maximum value of the image pixel value, is the horizontal and vertical coordinates of the image,
[0020] The uneven light area is smoothed by bilateral filtering, and the formula is:
[0021] ,
[0022] Wherein, is the image after bilateral filtering, is the spatial domain Gaussian kernel, is a pixel intensity Gaussian kernel, is a gray value of a neighborhood pixel point, is a pixel coordinate in a filter window, enhancement is performed by using limited contrast adaptive histogram equalization, and an enhancement formula is:
[0023] ,
[0024] wherein, is an image after CLAHE enhancement, is a limited contrast adaptive histogram equalization function, is a contrast limit parameter,
[0025] An adaptive threshold is calculated, and a formula is:
[0026] ,
[0027] Binarization is performed:
[0028] If, , ,
[0029] If, , ,
[0030] wherein, is an adaptive threshold is a mean value and a standard deviation in a window respectively, is an adjustment coefficient, is an image after background suppression.
[0031] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, in step S3, gradient direction histogram is combined for feature enhancement, and edge information of the corrosion defect is highlighted.
[0032] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, in step S3, gradient direction histogram is combined for feature enhancement, and edge information of the corrosion defect is highlighted.
[0033] A down-sampling process is defined as:
[0034] ,
[0035] wherein, is a low-resolution image, is a bicubic interpolation down-sampling function, is an image processed in step S2,
[0036] ESRGAN is used for super-resolution reconstruction:
[0037] ,
[0038] wherein, is the image after super-resolution reconstruction, is an ESRGAN generator, is a set of network parameters,
[0039] The edge information is extracted in combination with the histogram of gradient direction HOG, and the extraction formula is:
[0040] ,
[0041] wherein, is a HOG feature map, is gradient information along the direction , is the horizontal and vertical coordinates of the image.
[0042] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, in the defect detection process, multi-scale feature extraction is adopted, and a self-attention mechanism is added based on the YOLOv3 algorithm.
[0043] Focal loss and regression loss Soft IOU Loss are used as loss functions to enhance the focusing ability of the corrosion defect area in the detection process.
[0044] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, in the defect detection process, multi-scale feature extraction is adopted, and a self-attention mechanism is added based on the YOLOv3 algorithm.
[0045] Multi-scale feature extraction is performed, and the multi-scale feature map is defined as :
[0046] ,
[0047] wherein, respectively represent feature maps of different scales,
[0048] The channel attention mechanism is used to calculate the attention weight, and the calculation formula is:
[0049] ,
[0050] wherein, is an attention weight map, is a learnable parameter, is a rectified linear unit activation function, is a Sigmoid activation function, is a pixel point characteristic value of the feature at the position,
[0051] The detection frame prediction formula is defined as:
[0052] ,
[0053] wherein, is the target center coordinate, is the target frame width and height, is the target confidence,
[0054] The Focal Loss is used for classification optimization, and the optimization function is:
[0055] ,
[0056] wherein, is the Focal Loss, is an adjustment parameter, is the prediction probability.
[0057] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, the step of classifying the defect area extracted in step S4 is:
[0058] The input defect area image is defined as :
[0059] ,
[0060] wherein, is the defect area image, is the defect mask extracted in step S4, is the super-resolution image of step S3, is the horizontal and vertical coordinates of the image,
[0061] The multi-modal feature fusion vector is calculated, and the calculation formula is:
[0062] ,
[0063] wherein, is the multi-modal feature vector, is the visible light feature, is the infrared spectrum feature, is the ultraviolet spectrum feature, is the feature splicing operation,
[0064] The deep neural network DNN is used for classification, and the classification formula is:
[0065] ,
[0066] wherein, is a defect category probability vector, is a classification layer weight matrix, is a bias vector, is a Softmax function,
[0067] calculating the infrared temperature distribution deviation, the calculation formula is:
[0068] ,
[0069] wherein, is a temperature anomaly deviation, is a temperature value in the infrared image, is a background average temperature, is a number of defect region pixel points.
[0070] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, in step S6, for the micro corrosion defect with potential expansion trend, it is marked as a key monitoring object.
[0071] As a preferred scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, in step S6, for the micro corrosion defect with potential expansion trend, it is marked as a key monitoring object.
[0072] The determination threshold is defined as :
[0073] ,
[0074] wherein, is a dynamic determination threshold, is a mean value of historical defect samples, is a standard deviation of historical defect samples, Q is an adjustment coefficient,
[0075] According to the determination threshold, the defect severity is graded, and the grading method is:
[0076] If , then ,
[0077] If , then ,
[0078] If , then ,
[0079] wherein, is a defect level, 1 is slight, 2 is moderate, and 3 is severe, is a defect severity division coefficient,
[0080] The definition of the corrosion defect expansion trend prediction model is:
[0081] ,
[0082] wherein, is the corrosion defect expansion probability, is the prediction model weight, is the prediction model bias, is a Sigmoid function, if , it is marked as a key monitoring object, wherein is an expansion trend determination threshold.
[0083] The present application has the beneficial effects that: the present application uses multispectral imaging technology to obtain more comprehensive information by combining RGB, polarized light, infrared and ultraviolet spectral images, detects surface temperature difference changes using infrared spectrum, and improves the visibility of early corrosion areas; CLAHE and bilateral filtering are used for image preprocessing to suppress uneven illumination while maintaining edge details, improve the contrast of corrosion defects, and make them more prominent in complex backgrounds.
[0084] The present application uses super-resolution reconstruction technology to enhance the details of low-resolution areas, combines gradient direction histogram to further optimize the edge features of corrosion areas, and improves the recognition ability of small-scale defects; the improved YOLOv3 defect detection algorithm is introduced, multi-scale feature extraction is adopted, and self-attention mechanism is introduced, so that the model pays more attention to small corrosion areas, and the detection accuracy of small targets is enhanced by combining focal loss and regression loss, avoiding the missing detection problem caused by large target dominant training.
[0085] The present application uses multi-modal data fusion to splice infrared, ultraviolet and visible light features into complete feature vectors, and classifies them through a deep neural network, and further improves the classification accuracy of corrosion defects by combining infrared temperature deviation analysis; the dynamic threshold method is used to optimize the defect judgment standard, and the small but possible developing corrosion defects are marked as key points through the expansion trend prediction model, so as to facilitate subsequent quality control and maintenance.
[0086] In summary, the present application effectively improves the precision of micro-channel aluminum flat tube appearance detection, can timely find early corrosion defects, reduces missed detection and false detection, and improves detection efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0087] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0088] Figure 1 The flowchart of the image processing-based micro-channel aluminum flat tube appearance detection method of the present application.
[0089] Figure 2 The image of another micro-channel aluminum flat tube after the step S2 pretreatment.
[0090] Figure 3 The image of another micro-channel aluminum flat tube after the step S2 pretreatment.
[0091] Figure 4 The image after the step S3 processing. Figure 2 The image after the step S3 processing. DETAILED DESCRIPTION
[0092] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.
[0093] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0094] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0095] Embodiment 1, refer to Figure 1 The embodiment provides an image processing-based micro-channel aluminum flat tube appearance detection method, comprising the following steps:
[0096] Step S1, collecting the collected image of the micro-channel aluminum flat tube, using a multispectral imaging system, combining polarized light imaging on the basis of RGB visible light, additionally acquiring infrared spectrum images and ultraviolet spectrum images;
[0097] The infrared spectrum image is used for detecting the surface temperature difference.
[0098] Step S2, pre-processing the collected image, including light balance, local contrast enhancement and background suppression, wherein the limited contrast adaptive histogram CLAHE equalization is used to enhance the visibility of the corrosion defects;
[0099] The step of pre-processing the collected image is:
[0100] The light balance processing is performed, and the collected image is normalized and transformed, and the conversion formula is:
[0101] ,
[0102] Wherein, is the gray value of the original collected image, is the normalized image, is the minimum value of the image pixel value, is the maximum value of the image pixel value, is the horizontal and vertical coordinates of the image,
[0103] The uneven light area is smoothed by bilateral filtering, and the formula is:
[0104] ,
[0105] Wherein, is the image after bilateral filtering, is the spatial domain Gaussian kernel, is the pixel intensity Gaussian kernel, is the gray value of the neighborhood pixel point, is the pixel coordinate in the filtering window,
[0106] The limited contrast adaptive histogram equalization is used for enhancement, and the enhancement formula is:
[0107] ,
[0108] Wherein, is the image after CLAHE enhancement, is the limited contrast adaptive histogram equalization function, is the contrast limit parameter,
[0109] The adaptive threshold is calculated, and the formula is:
[0110] ,
[0111] Binaryzation is performed:
[0112] If , ,
[0113] If , ,
[0114] wherein, is an adaptive threshold, are the mean and standard deviation in the window respectively, is an adjustment coefficient, is the image after background suppression,
[0115] Specifically, the influence of light changes is reduced by the normalization method here to stabilize the image brightness distribution; the bilateral filter is used to balance the uneven light in the image, improve the overall balance, and at the same time preserve the edge detail information; the limited contrast adaptive histogram equalization is used to enhance the local contrast, making the slight corrosion defects more obvious; and the adaptive threshold method is used for background suppression to reduce irrelevant information interference, thereby preserving important defect areas.
[0116] Step S3, based on the pre-processed collected image in step S2, super-resolution reconstruction is performed to enhance the details of the low-resolution area using the super-resolution ESRGAN algorithm to generate a super-resolution image.
[0117] In step S3, feature enhancement is performed in combination with the gradient direction histogram to highlight the edge information of the corrosion defects;
[0118] Based on the pre-processed collected image in step S2, super-resolution reconstruction is performed to enhance the details of the low-resolution area using the super-resolution ESRGAN algorithm to generate a super-resolution image, the steps are:
[0119] The downsampling process is defined as:
[0120] ,
[0121] wherein, is a low-resolution image, is a bicubic interpolation downsampling function, is the image after step S2 processing,
[0122] ESRGAN is used for super-resolution reconstruction:
[0123] ,
[0124] wherein, is the image after super-resolution reconstruction, is an ESRGAN generator, is a set of network parameters,
[0125] Edge information is extracted in combination with the gradient direction histogram HOG, and the extraction formula is:
[0126] ,
[0127] wherein, is a HOG feature map, is gradient information along the direction , is a horizontal direction and a vertical direction coordinate of the image.
[0128] Specifically, a super-resolution generative adversarial network is used here to reconstruct a low-resolution image, enhance image details, and make defect areas clearer; perceptual loss, adversarial loss and content loss are jointly optimized in the reconstruction process, so that the generated super-resolution image has high visual quality and retains sufficient texture details.
[0129] Step S4, based on the super-resolution image generated in step S3, an improved YOLOv3 defect detection algorithm is used to extract defect areas and perform target detection, and the defect areas are extracted;
[0130] In the defect detection process, multi-scale feature extraction is used, and a self-attention mechanism is added based on the YOLOv3 algorithm;
[0131] Focal loss and regression loss Soft IOU Loss are used as loss functions to enhance the focusing ability of the detection process on the corrosion defect area.
[0132] Based on the super-resolution image generated in step S3, the step of using the improved YOLOv3 defect detection algorithm to extract defect areas and perform target detection is:
[0133] Multi-scale feature extraction is performed, and the multi-scale feature map is defined as :
[0134] ,
[0135] wherein, respectively represent feature maps of different scales,
[0136] The channel attention mechanism is used to calculate the attention weight, and the calculation formula is:
[0137] ,
[0138] wherein, is an attention weight map, is a learnable parameter, is a rectified linear unit activation function, is a Sigmoid activation function, is a feature value at pixel point ,
[0139] The detection frame prediction formula is defined as:
[0140] ,
[0141] Wherein, is the target center coordinate, is the target frame width and height, is the target confidence,
[0142] The Focal Loss is used for classification optimization, and the optimization function is:
[0143] ,
[0144] Wherein, is the Focal Loss, is the adjustment parameter, is the prediction probability,
[0145] Specifically, this step adopts a multi-scale feature extraction method to capture defect features of different scales and improve the recognition ability of micro defects; the channel attention mechanism is introduced to enhance the focusing ability of the network on the defect area; the FocalLoss is used to optimize the classification loss to enhance the learning ability of the model for difficult-to-detect defects, and the regression loss is used to improve the accuracy of the target frame, and the super-resolution image and the deep learning detection algorithm are combined to improve the recognition efficiency of the corrosion defects.
[0146] Step S5, classifying the defect area extracted in step S4, combining the infrared spectrum image, the ultraviolet spectrum image and the visible light information, and analyzing the temperature anomaly and the spectrum absorption characteristics of the defect area through multi-modal data fusion;
[0147] The step of classifying the defect area extracted in step S4 is:
[0148] The input defect area image is defined as :
[0149] ,
[0150] Wherein, is the defect area image, is the defect mask extracted in step S4, is the super-resolution image of step S3, is the horizontal and vertical coordinates of the image,
[0151] The multi-modal feature fusion vector is calculated, and the calculation formula is:
[0152] ,
[0153] Wherein, a multi-modal feature vector, a visible light feature, an infrared spectrum feature, an ultraviolet spectrum feature, a feature splicing operation,
[0154] Classification is performed using a deep neural network (DNN), and the classification formula is:
[0155] ,
[0156] wherein, is a defect category probability vector, is a classification layer weight matrix, is a bias vector, is a Softmax function,
[0157] The infrared temperature distribution deviation is calculated, and the calculation formula is:
[0158] ,
[0159] wherein, is a temperature anomaly deviation, is a temperature value in an infrared image, is a background average temperature, is a number of defect region pixel points,
[0160] Specifically, based on the defect region extracted in step S4, the information of visible light, infrared spectrum, and ultraviolet spectrum is combined to form a complete feature vector by a multi-modal data fusion method. The deep neural network is used to classify the fused data to determine the defect category probability distribution. The severity of the defect is determined by combining the temperature anomaly analysis, so that the classification process is more accurate.
[0161] In step S6, based on the defect region classified in step S5, a dynamic determination threshold method is used to optimize the defect determination standard in combination with historical data to determine the final detection result. In step S6, for a small corrosion defect with potential expansion trend, it is marked as a key monitoring object. The small defect referred to here refers to a defect with a pixel point number less than a certain threshold. The threshold is specifically limited according to the size of the micro-channel aluminum flat tube and the purpose of the product.
[0162] The step of determining the final detection result based on the defect region classified in step S5 by using a dynamic determination threshold method in combination with historical data to optimize the defect determination standard is:
[0163] The determination threshold is defined as :
[0164] ,
[0165] wherein, is a dynamic determination threshold, is the mean of historical defect samples, is the standard deviation of historical defect samples, is an adjustment coefficient,
[0166] According to the determination threshold, the defect severity is graded in the following manner:
[0167] If , then ,
[0168] If , then ,
[0169] If , then ,
[0170] wherein, is the defect grade, 1 for slight, 2 for moderate, and 3 for severe, is the defect severity division coefficient,
[0171] The corrosion defect expansion trend prediction model is defined as:
[0172] ,
[0173] wherein, is the corrosion defect expansion probability, is the prediction model weight, is the prediction model bias, is the Sigmoid function, if , it is marked as a key monitoring object, wherein is the expansion trend determination threshold;
[0174] Specifically, the dynamic threshold is calculated based on historical data here, making the defect determination process more intelligent and able to adapt to different detection needs under different working conditions; the defect grade is calculated according to the temperature abnormal deviation, and for corrosion defects that may expand, a prediction model is introduced to calculate the corrosion expansion probability to judge its development trend, which is convenient for subsequent maintenance.
[0175] Figure 2 and Figure 3 are both post-microchannel aluminum flat tube images preprocessed by step S2. It can be seen from the images that the microchannel aluminum flat tube has quality defects, but there is still a missed detection situation, see Figure 4 The image details after step S3 processing are clearer, which is convenient for subsequent extraction of defect areas, for example Figure 4The middle frame area is not obvious in the original drawing, but can be accurately extracted after processing, which can greatly improve the detection accuracy and avoid missed detection.
[0176] The super-resolution reconstruction technology is used to enhance the details of the low-resolution area, the gradient direction histogram is further optimized to optimize the edge features of the corrosion area, and the identification ability of small-scale defects is improved; the improved YOLOv3 defect detection algorithm is introduced, multi-scale feature extraction is adopted, and a self-attention mechanism is introduced, so that the model pays more attention to the small corrosion area, and the focal loss and regression loss are combined to enhance the detection accuracy of small targets and avoid the missed detection problem caused by the large target leading the training. Combined with historical data, a dynamic threshold method is used to optimize the defect judgment standard, and a trend prediction model is used to mark the small but possible developing corrosion defects, so as to facilitate the subsequent quality control and maintenance.
[0177] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A method for detecting the appearance of a micro-channel aluminum flat tube based on image processing, characterized in that: The application relates to an image processing method and device. Step S1: collecting an acquisition image of a micro-channel aluminum flat tube, using a multispectral imaging system to additionally acquire infrared spectral images and ultraviolet spectral images on the basis of RGB visible light combined with polarized light imaging; Step S2: preprocessing the acquisition image, including light balance, local contrast enhancement and background suppression, wherein a limited contrast adaptive histogram (CLAHE) equalization is used; Step S3: performing super-resolution reconstruction based on the acquisition image after the preprocessing in step S2, using a super-resolution ESRGAN algorithm to enhance the details of a low-resolution region, and generating a super-resolution image; Step S4: based on the super-resolution image generated in step S3, using an improved YOLOv3 defect detection algorithm to extract a defect region and perform target detection, in the defect detection process, multi-scale feature extraction is used, and a self-attention mechanism is added based on the YOLOv3 algorithm; Step S5: classifying the defect region extracted in step S4, combining infrared spectral images, ultraviolet spectral images and visible light information, and analyzing the temperature anomaly and spectral absorption characteristics of the defect region through multi-modal data fusion; Step S6: based on the defect region classified in step S5, using a dynamic threshold determination method, combining historical data to optimize the defect determination standard, and determining the final detection result.
2. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 1, characterized in that: The infrared spectral image is used for detecting surface temperature difference.
3. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 2, characterized in that: The preprocessing step of the acquisition image is, The light balance processing is performed, the acquisition image is normalized, and the conversion formula is: , wherein I(u, v) is a gray value of the original collected image, is a normalized image, is a minimum value of the image pixel value, is a maximum value of the image pixel value, is a horizontal direction and a vertical direction coordinate of the image, The uneven light area is smoothed by using a bilateral filter, and the formula is: , wherein, is the bilateral filtered image, is the spatial domain Gaussian kernel, is the pixel intensity Gaussian kernel, is the gray value of the neighboring pixel, m, n are the pixel coordinates within the filter window, The enhancement is performed by using a limited contrast adaptive histogram equalization, and the enhancement formula is: , wherein, is the image after CLAHE enhancement, CLAHE(·) is a limited contrast adaptive histogram equalization function, is a contrast limiting parameter, The adaptive threshold is calculated, and the formula is: , The binarization is performed: If then , If then , wherein, is an adaptive threshold, are the mean and standard deviation within the window w, respectively, and k is an adjustment factor, is the background suppressed image.
4. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 3, characterized in that: In step S3, the gradient direction histogram is combined to enhance the features and highlight the edge information of the corrosion defects.
5. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 4, characterized in that: The super-resolution reconstruction based on the acquisition image after the preprocessing in step S2 is performed, the details of a low-resolution region are enhanced by using a super-resolution ESRGAN algorithm, and a super-resolution image is generated, and the steps are as follows, The down-sampling process is defined as: , wherein, is a low resolution image, D(·) is a bicubic interpolation down-sampling function, is the image processed in step S2, The ESRGAN is used for super-resolution reconstruction: , wherein, is the image after super-resolution reconstruction, is an ESRGAN generator, and θ is a set of network parameters. The edge information is extracted by combining the gradient direction histogram HOG, and the extraction formula is: , where H(p, q) is the HOG feature map, is the gradient information along the direction Φ, p, q are the horizontal and vertical coordinates of the image.
6. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 1, characterized in that: In step S4, the focal loss Focal Loss and the regression loss Soft IOU Loss are used as loss functions to enhance the focusing ability of the corrosion defect region in the detection process.
7. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 1, characterized in that: The super-resolution image generated in step S3 is used as the input of the improved YOLOv3 defect detection algorithm, the defect region is extracted, and the target detection is performed, and the steps are as follows, Multi-scale feature extraction is performed, and a multi-scale feature map is defined as : , wherein respectively represent feature maps of different scales, The channel attention mechanism is used to calculate the attention weight, and the calculation formula is: , wherein, is an attention weight map, is a learnable parameter, is a rectified linear unit activation function, σ(·) is a sigmoid activation function, and F(p, q) is a feature value at pixel point (p, q). The detection frame prediction formula is defined as: , wherein, is the target center coordinate, w, h are the target box width and height, is the target confidence, The Focal Loss is used for classification optimization, and the optimization function is: , wherein, is Focal Loss, and a, g are adjustment parameters, is the predicted probability.
8. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 7, characterized in that: The defect region extracted in step S4 is classified, and the steps are as follows, Defining the input defect area image as : , wherein, is the defect area image, is the defect mask extracted at step S4, is the super-resolution image of step S3, u, v are the horizontal and vertical coordinates of the image, The multi-modal feature fusion vector is calculated, and the calculation formula is: , wherein, is a multi-modal feature vector, is a visible light feature, is an infrared spectrum feature, is an ultraviolet spectrum feature, Concat(·) is a feature concatenation operation, The deep neural network DNN is used for classification, and the classification formula is: , Wherein, P is a defect category probability vector, W is a classification layer weight matrix, b is a bias vector, and Softmax(·) is a Softmax function. The infrared temperature distribution deviation is calculated, and the calculation formula is: , wherein, is the temperature anomaly deviation, is the temperature value in the infrared image, is the background average temperature, is the number of defect area pixels.
9. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 8, characterized in that: In step S6, for the small but potentially expanding corrosion defects, mark as the key monitoring object.
10. The method for inspecting the appearance of micro-channel aluminum flat tubes based on image processing according to claim 9, characterized in that: The step of determining the final detection result is that, based on the defect area classified in step S5, a dynamic determination threshold method is adopted, historical data is combined to optimize the defect determination standard, The decision threshold is defined as : , wherein, is a dynamic decision threshold, is a mean of historical defect samples, is a standard deviation of historical defect samples, is an adjustment coefficient, According to the determination threshold, the defect severity is graded, and the grading method is: If then , If then , If then , wherein, is a defect grade, 1 is slight, 2 is moderate, 3 is severe, is a defect severity division coefficient, The corrosion defect expansion trend prediction model is defined as: , wherein, is the corrosion defect propagation probability, is the prediction model weight, is the prediction model bias, σ(·) is a Sigmoid function, and if is marked as a key monitoring object, wherein P thres is the propagation trend determination threshold.
Citation Information
Patent Citations
Laser additive manufacturing diffuser crack defect DR detection image processing method
CN112150437A
Industrial defect detection method, system and device and storage medium
CN118967672A