CN120163798B - A Microchannel Aluminum Flat Tube Appearance Inspection Method Based on Image Processing - Google Patents

A Microchannel Aluminum Flat Tube Appearance Inspection Method Based on Image Processing

Info

Publication number
CN120163798B
CN120163798B CN202510283285.2A CN202510283285A CN120163798B CN 120163798 B CN120163798 B CN 120163798B CN 202510283285 A CN202510283285 A CN 202510283285A CN 120163798 B CN120163798 B CN 120163798B
Authority
CN
China
Prior art keywords
image
defect
resolution
follows
super
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202510283285.2A
Other languages
Chinese (zh)
Other versions
CN120163798A (en
Inventor
蔡莹
刘金凤
丁锦灵
张文国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Weirui Refrigeration Technology Co ltd
Original Assignee
Shandong Weirui Refrigeration Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Weirui Refrigeration Technology Co ltd filed Critical Shandong Weirui Refrigeration Technology Co ltd
Priority to CN202510283285.2A priority Critical patent/CN120163798B/en
Publication of CN120163798A publication Critical patent/CN120163798A/en
Application granted granted Critical
Publication of CN120163798B publication Critical patent/CN120163798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4053Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a microchannel aluminum flat tube appearance detection method based on image processing, which relates to the technical field of appearance detection, and comprises the steps of performing more comprehensive information acquisition by combining RGB, polarized light, infrared and ultraviolet spectrograms through a multispectral imaging technology, detecting surface temperature difference change through infrared spectroscopy, performing image preprocessing by adopting limiting contrast self-adaptive histogram equalization and bilateral filtering, inhibiting uneven illumination while maintaining edge details, improving the contrast of corrosion defects, enhancing the details of a low-resolution area through a super-resolution reconstruction technology, further optimizing the edge characteristics of the corrosion area through combining a gradient direction histogram, improving the identification capability of small-scale defects, introducing an improved YOLOv defect detection algorithm, adopting multi-scale characteristic extraction and introducing a self-attention mechanism, enabling a model to pay more attention to the small corrosion area, and simultaneously combining focus loss and regression loss, and enhancing the detection precision of the small target.

Description

Image processing-based micro-channel aluminum flat tube appearance detection method
Technical Field
The invention relates to the technical field of appearance detection, in particular to a microchannel aluminum flat tube appearance detection method based on image processing.
Background
In the large-scale production process of the micro-channel aluminum flat tube, the surface quality of the micro-channel aluminum flat tube directly influences the heat exchange performance and the service life of the product, so that the appearance detection is extremely important, and the common defects such as surface scratches and depressions are automatically identified by combining a deep learning target detection technology by generally adopting an automatic detection method based on machine vision on the current industrial production line.
In practical application, the detection environment of the aluminum flat tube is complex, the surface of the material has higher reflectivity, the local area is easy to be overexposed or shaded due to illumination change, part of defects are difficult to identify, even polarized light or multi-angle imaging is introduced, the interference of specular reflection is difficult to be completely eliminated, and the defect information of certain highlight areas is covered.
In addition, some defects are very fine at an 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 the defects in an RGB image is very low, and the conventional YOLO-based detection method is difficult to stably distinguish normal areas from defective areas, particularly corrosion defects, the early form of which is generally represented by extremely small chromatic aberration of the surface of a material or slight change of local energy distribution, and no obvious geometric features are formed, so that a micro-channel aluminum flat tube appearance detection method based on image processing is needed to solve the problems.
Disclosure of Invention
The present invention has been made in view of the above-described problems occurring in the prior art.
The invention provides a micro-channel aluminum flat tube appearance detection method based on image processing, which solves the problems that the existing RGB visual detection is difficult to distinguish early corrosion, is interfered by reflection, is missed to detect micro cracks, and is difficult to detect small target defects.
In order to solve the technical problems, the invention provides the following technical scheme:
The embodiment of the invention provides a micro-channel aluminum flat tube appearance detection method based on image processing, which comprises the following steps of,
Step S1, collecting an image of a micro-channel aluminum flat tube, adopting a multispectral imaging system, combining polarized light imaging on the basis of RGB visible light, and additionally obtaining an infrared spectrogram image and an ultraviolet spectrogram image;
step S2, preprocessing the acquired image, including illumination equalization, local contrast enhancement and background suppression, wherein the visibility of corrosion defects is enhanced by utilizing a restricted contrast adaptive histogram CLAHE equalization;
Step S3, performing super-resolution reconstruction based on the acquired image preprocessed in the step S2, and enhancing details of a low-resolution area by using a super-resolution ESRGAN algorithm to generate a super-resolution image;
Step S4, based on the super-resolution image generated in the step S3, adopting an improved YOLOv defect detection algorithm to extract a defect area, performing target detection, and extracting the defect area;
step S5, classifying the defect area extracted in the step S4, and analyzing the temperature abnormality and spectral absorption characteristics of the defect area through multi-mode data fusion by combining the infrared spectrum image, the ultraviolet spectrum image and the visible light information;
And S6, optimizing a defect judgment standard by adopting a dynamic judgment threshold method and combining historical data based on the defect area classified in the step S5, and determining a final detection result.
As an optimal scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, the infrared spectrogram image is used for detecting surface temperature difference.
As a preferable scheme of the microchannel aluminum flat tube appearance detection method based on image processing, the method comprises the following steps of:
carrying out illumination equalization treatment, collecting images, carrying out normalization transformation, and converting the formulas into:
,
Wherein, the For the gray values of the original acquired image,For the normalized image, the image is obtained,Is the minimum value of the pixel values of the image,Is the maximum value of the pixel values of the image,Is the horizontal and vertical coordinates of the image,
The bilateral filtering is adopted to smooth the area with uneven illumination, and the formula is as follows:
,
Wherein, the In order to have a bilateral filtered image,In the form of a spatial domain gaussian kernel,For the gaussian kernel of the pixel intensity,Is the gray value of the neighboring pixel point,For pixel coordinates in the filter window, enhancement is performed by adopting limiting contrast adaptive histogram equalization, and an enhancement formula is as follows:
,
Wherein, the For an image enhanced by the CLAHE,To limit the contrast adaptive histogram equalization function,For the contrast-limiting parameter,
Calculating an adaptive threshold, wherein the formula is as follows:
,
binarization is carried out:
If it is Then,
If it isThen,
Wherein, the Is an adaptive threshold valueWindows respectivelyThe mean value and standard deviation of the inner,In order to adjust the coefficient of the power supply,Is a background suppressed image.
As an optimal scheme of the microchannel aluminum flat tube appearance detection method based on image processing, in the step S3, characteristic enhancement is carried out by combining a gradient direction histogram, and edge information of corrosion defects is highlighted.
As a preferable scheme of the microchannel aluminum flat tube appearance detection method based on image processing, the method comprises the following specific steps of:
The downsampling process is defined as:
,
Wherein, the In the case of a low-resolution image,For a bicubic interpolation downsampling function,For the image processed in step S2,
Super-resolution reconstruction was performed using ESRGAN:
,
Wherein, the For the super-resolution reconstructed image,In the form of a ESRGAN generator,As a set of parameters of the network,
And extracting edge information by combining the gradient direction histogram HOG, wherein an extraction formula is as follows:
,
Wherein, the In order to make the HOG characteristic diagram,To be in the direction ofIs used for the gradient information of (1),Is the horizontal and vertical coordinates of the image.
As a preferable scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, the invention adopts multi-scale feature extraction and adds a self-attention mechanism on the basis of YOLOv algorithm in the defect detection process;
focus Loss Focal Loss and regression Loss Soft IOU Loss are used as Loss functions to enhance focusing capability of the corrosion defect area in the detection process.
As a preferable scheme of the microchannel aluminum flat tube appearance detection method based on image processing, the method comprises the following specific steps of:
extracting multi-scale features, and defining a multi-scale feature map as :
,
Wherein, the Respectively representing characteristic diagrams of different scales,
The attention weight is calculated by adopting a channel attention mechanism, and the calculation formula is as follows:
,
Wherein, the In order to pay attention to the weight map,In order for the parameters to be able to be learned,In order to modify the linear cell activation function,The function is activated for Sigmoid,Is a pixel pointThe characteristic value of the position,
Defining a detection frame prediction formula as follows:
,
Wherein, the As the center coordinates of the object,For the target frame width and height,For the degree of confidence of the target,
The Focal Loss is adopted for classification optimization, and the optimization function is as follows:
,
Wherein, the For the Focal Loss of the optical fiber,In order to adjust the parameters of the device,To predict probability.
As an optimal scheme of the microchannel aluminum flat tube appearance detection method based on image processing, the method comprises the following steps of:
defining an input defect area image as :
,
Wherein, the As an image of the defective area,For the defect mask extracted in step S4,As the super-resolution image of step S3,Is the horizontal and vertical coordinates of the image,
The multi-modal feature fusion vector is calculated, and the calculation formula is as follows:
,
Wherein, the In the form of a multi-modal feature vector,In order to be a feature of the visible light,As a characteristic of the infrared spectrum,Is characterized by the ultraviolet spectrum,For the characteristic splicing operation, the method comprises the following steps,
Classifying by adopting a deep neural network DNN, wherein the classification formula is as follows:
,
Wherein, the As a probability vector for a defect class,For the classification layer weight matrix,As a result of the offset vector,As a function of Softmax (r),
Calculating the infrared temperature distribution deviation, wherein the calculation formula is as follows:
,
Wherein, the In order to be a temperature anomaly deviation,For the temperature value in the infrared image,As the average temperature of the background of the light,The number of pixels in the defect area.
As an optimal scheme of the micro-channel aluminum flat tube appearance detection method based on image processing, in the step S6, the micro corrosion defect with potential expansion trend is marked as a key monitoring object.
As a preferable scheme of the microchannel aluminum flat tube appearance detection method based on image processing, the method comprises the following specific steps of:
defining a decision threshold as :
,
Wherein, the In order to dynamically determine the threshold value,As the average value of the historical defect samples,Standard deviation of historical defect sample, QIn order to adjust the coefficient of the power supply,
The defect severity is graded according to a judging threshold value in the following grading mode:
If it is Then,
If it isThen,
If it isThen,
Wherein, the A defect rating of 1, a slight, a medium, a severe,The coefficients are divided for the severity of the defect,
Defining a corrosion defect expansion trend prediction model as follows:
,
Wherein, the In order to spread the probability of corrosion defects,In order to predict the weight of the model,In order to predict the bias of the model,As a Sigmoid function, ifMarked as an important monitoring object, whereinA threshold is determined for the expanded trend.
The method has the advantages that through the multispectral imaging technology and combining RGB, polarized light, infrared and ultraviolet spectrograms, more comprehensive information acquisition is performed, the infrared spectrum is utilized to detect the surface temperature difference change, the visibility of an early corrosion area is improved, the contrast-limited self-adaptive histogram equalization CLAHE and bilateral filtering are adopted to perform image preprocessing, the uneven illumination is restrained while the edge details are kept, the contrast of corrosion defects is improved, and the method is more outstanding under a complex background.
The invention adopts super-resolution reconstruction technology to enhance details of a low-resolution area, combines gradient direction histogram to further optimize edge characteristics of a corrosion area and improve identification capability of small-scale defects, introduces an improved YOLOv defect detection algorithm, adopts multi-scale characteristic extraction and introduces a self-attention mechanism to make a model pay more attention to a micro corrosion area, combines focus loss and regression loss, enhances detection precision of a small target, and avoids missed detection problem caused by large target leading training.
Aiming at defect classification, the method adopts multi-mode data fusion to splice infrared, ultraviolet and visible light characteristics into complete characteristic vectors, classifies the characteristic vectors through a deep neural network, combines infrared temperature deviation analysis to further improve the classification precision of corrosion defects, adopts a dynamic judgment threshold method to optimize defect judgment standards in combination with historical data, and adopts an expanded trend prediction model to carry out key marking on tiny corrosion defects which are possibly developed so as to facilitate subsequent quality control and maintenance.
In conclusion, the method effectively improves the accuracy of appearance detection of the micro-channel aluminum flat tube, can discover early corrosion defects in time, reduces missing detection and false detection, and improves the detection efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of the image processing-based micro-channel aluminum flat tube appearance detection method.
Fig. 2 is an image of a microchannel aluminum flat tube pretreated in step S2.
Fig. 3 is an image of another microchannel aluminum flat tube pretreated in step S2.
Fig. 4 is an image of fig. 2 processed in step S3.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways other than those described herein, and persons skilled in the art will readily appreciate that the present invention is not limited to the specific embodiments disclosed below.
Further, reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic can be included in at least one implementation of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments.
Embodiment 1, referring to fig. 1, the embodiment provides a microchannel aluminum flat tube appearance detection method based on image processing, comprising the following steps:
Step S1, collecting an image of a micro-channel aluminum flat tube, adopting a multispectral imaging system, combining polarized light imaging on the basis of RGB visible light, and additionally obtaining an infrared spectrogram image and an ultraviolet spectrogram image;
the infrared spectral image is used to detect the surface temperature difference.
Step S2, preprocessing the acquired image, including illumination equalization, local contrast enhancement and background suppression, wherein the visibility of corrosion defects is enhanced by utilizing restricted contrast adaptive histogram CLAHE equalization;
The preprocessing of the acquired image comprises the following steps:
carrying out illumination equalization treatment, collecting images, carrying out normalization transformation, and converting the formulas into:
,
Wherein, the For the gray values of the original acquired image,For the normalized image, the image is obtained,Is the minimum value of the pixel values of the image,Is the maximum value of the pixel values of the image,Is the horizontal and vertical coordinates of the image,
The bilateral filtering is adopted to smooth the area with uneven illumination, and the formula is as follows:
,
Wherein, the In order to have a bilateral filtered image,In the form of a spatial domain gaussian kernel,For the gaussian kernel of the pixel intensity,Is the gray value of the neighboring pixel point,To filter the pixel coordinates within the window,
The enhancement is carried out by adopting the self-adaptive histogram equalization of limiting contrast, and the enhancement formula is as follows:
,
Wherein, the For an image enhanced by the CLAHE,To limit the contrast adaptive histogram equalization function,For the contrast-limiting parameter,
Calculating an adaptive threshold, wherein the formula is as follows:
,
binarization is carried out:
If it is Then,
If it isThen,
Wherein, the In order to adapt the threshold value to be used,Windows respectivelyThe mean value and standard deviation of the inner,In order to adjust the coefficient of the power supply,For the image after the background suppression,
The method comprises the steps of reducing the influence of illumination change through a normalization method, stabilizing the brightness distribution of an image, balancing illumination non-uniformity in the image through bilateral filtering, improving overall balance, simultaneously keeping edge detail information, enhancing local contrast through contrast-limiting self-adaptive histogram balance, enabling tiny corrosion defects to be more obvious, and reducing irrelevant information interference through a self-adaptive threshold method to keep important defect areas.
And step S3, performing super-resolution reconstruction based on the acquired image preprocessed in the step S2, and enhancing details of the low-resolution area by using a super-resolution ESRGAN algorithm to generate a super-resolution image.
In the step S3, feature enhancement is carried out by combining the gradient direction histogram, so that the edge information of the corrosion defect is highlighted;
Performing super-resolution reconstruction based on the acquired image preprocessed in the step S2, and enhancing details of a low-resolution area by utilizing a super-resolution ESRGAN algorithm, wherein the step of generating the super-resolution image comprises the following steps of:
The downsampling process is defined as:
,
Wherein, the In the case of a low-resolution image,For a bicubic interpolation downsampling function,For the image processed in step S2,
Super-resolution reconstruction was performed using ESRGAN:
,
Wherein, the For the super-resolution reconstructed image,In the form of a ESRGAN generator,As a set of parameters of the network,
And extracting edge information by combining the gradient direction histogram HOG, wherein an extraction formula is as follows:
,
Wherein, the In order to make the HOG characteristic diagram,To be in the direction ofIs used for the gradient information of (1),Is the horizontal and vertical coordinates of the image.
The super-resolution image is reconstructed by using the super-resolution generation countermeasure network, image details are enhanced, a defect area is clearer, and the perception loss, the countermeasure loss and the content loss are jointly optimized in the reconstruction process, so that the generated super-resolution image has higher visual quality and enough texture details are reserved.
Step S4, based on the super-resolution image generated in the step S3, adopting an improved YOLOv defect detection algorithm to extract a defect area, performing target detection, and extracting the defect area;
In the defect detection process, multi-scale feature extraction is adopted, and a self-attention mechanism is added on the basis of YOLOv algorithm;
focus Loss Focal Loss and regression Loss Soft IOU Loss are used as Loss functions to enhance focusing capability of the corrosion defect area in the detection process.
Based on the super-resolution image generated in the step S3, the steps of adopting the improved YOLOv defect detection algorithm to extract the defect area and carrying out target detection are as follows:
extracting multi-scale features, and defining a multi-scale feature map as :
,
Wherein, the Respectively representing characteristic diagrams of different scales,
The attention weight is calculated by adopting a channel attention mechanism, and the calculation formula is as follows:
,
Wherein, the In order to pay attention to the weight map,In order for the parameters to be able to be learned,In order to modify the linear cell activation function,The function is activated for Sigmoid,Is a pixel pointThe characteristic value of the position,
Defining a detection frame prediction formula as follows:
,
Wherein, the As the center coordinates of the object,For the target frame width and height,For the degree of confidence of the target,
The Focal Loss is adopted for classification optimization, and the optimization function is as follows:
,
Wherein, the For the Focal Loss of the optical fiber,In order to adjust the parameters of the device,In order to predict the probability of a probability,
The method comprises the steps of capturing defect characteristics of different scales by adopting a multi-scale characteristic extraction method, improving the identification capability of micro defects, introducing a channel attention mechanism, enhancing the focusing capability of a network on a defect area, optimizing classification Loss by using Focal Loss, enhancing the learning capability of a model on defects which are difficult to detect, improving the accuracy of a target frame by using regression Loss, and improving the identification efficiency of corrosion defects by combining a super-resolution image and a deep learning detection algorithm.
Step S5, classifying the defect area extracted in the step S4, and analyzing the temperature abnormality and spectral absorption characteristics of the defect area through multi-mode data fusion by combining the infrared spectrum image, the ultraviolet spectrum image and the visible light information;
the step of classifying the defect area extracted in the step S4 is as follows:
defining an input defect area image as :
,
Wherein, the As an image of the defective area,For the defect mask extracted in step S4,As the super-resolution image of step S3,Is the horizontal and vertical coordinates of the image,
The multi-modal feature fusion vector is calculated, and the calculation formula is as follows:
,
Wherein, the In the form of a multi-modal feature vector,In order to be a feature of the visible light,As a characteristic of the infrared spectrum,Is characterized by the ultraviolet spectrum,For the characteristic splicing operation, the method comprises the following steps,
Classifying by adopting a deep neural network DNN, wherein the classification formula is as follows:
,
Wherein, the As a probability vector for a defect class,For the classification layer weight matrix,As a result of the offset vector,As a function of Softmax (r),
Calculating the infrared temperature distribution deviation, wherein the calculation formula is as follows:
,
Wherein, the In order to be a temperature anomaly deviation,For the temperature value in the infrared image,As the average temperature of the background of the light,As the number of pixels in the defective area,
Specifically, the defect area extracted in the step S4 is based on the information of visible light, infrared spectrum and ultraviolet spectrum is combined through a multi-mode data fusion method to form complete feature vectors, the fused data is classified through a deep neural network to determine probability distribution of defect types, and the severity of defects is judged through temperature anomaly analysis, so that the classification process is more accurate.
In the step S6, the corrosion defects which are tiny but have potential expansion trend are marked as important monitoring objects, wherein the tiny defects refer to the defects of which the number of pixel points is smaller than a certain threshold value, and the threshold value is specifically defined according to the size of the micro-channel aluminum flat tube and the application of a product.
Based on the defect areas classified in the step S5, a dynamic judgment threshold method is adopted, and a defect judgment standard is optimized by combining historical data, so that the final detection result is determined as follows:
defining a decision threshold as :
,
Wherein, the In order to dynamically determine the threshold value,As the average value of the historical defect samples,As the standard deviation of the historical defect samples,In order to adjust the coefficient of the power supply,
The defect severity is graded according to a judging threshold value in the following grading mode:
If it is Then,
If it isThen,
If it isThen,
Wherein, the A defect rating of 1, a slight, a medium, a severe,The coefficients are divided for the severity of the defect,
Defining a corrosion defect expansion trend prediction model as follows:
,
Wherein, the In order to spread the probability of corrosion defects,In order to predict the weight of the model,In order to predict the bias of the model,As a Sigmoid function, ifMarked as an important monitoring object, whereinDetermining a threshold value for the expansion trend;
the method comprises the steps of calculating a dynamic threshold based on historical data, enabling a defect judging process to be more intelligent, adapting to detection requirements of different working conditions, calculating defect levels according to temperature abnormal deviation, introducing a prediction model for corrosion defects which are possibly expanded, calculating corrosion expansion probability to judge the development trend of the corrosion defects, and facilitating subsequent maintenance.
Both the fig. 2 and the fig. 3 are images of the micro-channel aluminum flat tube after the pretreatment in the step S2, and it can be seen that the micro-channel aluminum flat tube has quality defects, but still has missed detection, and referring to fig. 4, the details of the images processed in the step S3 are clearer, so that the defect regions can be conveniently extracted later, for example, the square frame regions in fig. 4 are not obviously visible in the original image, but can be extracted accurately after the processing, so that the detection precision can be greatly improved, and missed detection is avoided.
The method comprises the steps of adopting a super-resolution reconstruction technology to enhance details of a low-resolution area, combining a gradient direction histogram to further optimize edge characteristics of a corrosion area and improve the identification capability of small-scale defects, introducing an improved YOLOv defect detection algorithm, adopting multi-scale characteristic extraction and introducing a self-attention mechanism to enable a model to pay more attention to a micro corrosion area, combining focus loss and regression loss, enhancing the detection precision of a small target, and avoiding the problem of missed detection caused by leading training of a large target. And optimizing a defect judgment standard by adopting a dynamic judgment threshold method in combination with historical data, and carrying out key marking on tiny corrosion defects which are possibly developed through an extended trend prediction model so as to facilitate subsequent quality control and maintenance.
It should be noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention may be modified or substituted without departing from the spirit and scope of the technical solution of the present invention, which is intended to be covered in the scope of the claims of the present invention.

Claims (10)

1.一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:包括,1. A method for appearance inspection of microchannel aluminum flat tubes based on image processing, characterized in that: it includes, 步骤S1,采集微通道铝扁管的采集图像,采用多光谱成像系统,在RGB可见光的基础上结合偏振光成像,额外获取红外光谱图像和紫外光谱图像;Step S1: Acquire images of the microchannel aluminum flat tube using a multispectral imaging system, combining polarized light imaging with RGB visible light to additionally acquire infrared and ultraviolet spectral images. 步骤S2,对所述采集图像进行预处理,包括光照均衡、局部对比度增强和背景抑制,其中利用限制对比度自适应直方图CLAHE均衡化;Step S2, preprocessing the acquired image, including illumination equalization, local contrast enhancement and background suppression, wherein contrast-limited adaptive histogram (CLAHE) equalization is used. 步骤S3,基于步骤S2预处理后的采集图像进行超分辨率重建,利用超分辨率ESRGAN算法增强低分辨率区域的细节,生成超分辨率图像;Step S3: Perform super-resolution reconstruction based on the preprocessed image acquired in step S2, using the ESRGAN super-resolution algorithm to enhance the details of the low-resolution region and generate a super-resolution image. 步骤S4,基于步骤S3生成的超分辨率图像,采用改进YOLOv3缺陷检测算法,提取缺陷区域并进行目标检测,缺陷检测过程中,采用多尺度特征提取,并在YOLOv3算法基础上增加自注意力机制;Step S4: Based on the super-resolution image generated in step S3, the improved YOLOv3 defect detection algorithm is used to extract the defect region and perform target detection. During the defect detection process, multi-scale feature extraction is used, and a self-attention mechanism is added on the basis of the YOLOv3 algorithm. 步骤S5,对步骤S4提取的缺陷区域进行分类,结合红外光谱图像、紫外光谱图像与可见光信息,通过多模态数据融合分析缺陷区域的温度异常、光谱吸收特性;Step S5: Classify the defect areas extracted in step S4, and combine infrared spectral images, ultraviolet spectral images and visible light information to analyze the temperature anomalies and spectral absorption characteristics of the defect areas through multimodal data fusion analysis. 步骤S6,基于步骤S5分类的缺陷区域,采用动态判定阈值方法,结合历史数据优化缺陷判定标准,确定最终检测结果。Step S6: Based on the defect areas classified in Step S5, a dynamic judgment threshold method is used, and the defect judgment criteria are optimized by combining historical data to determine the final detection result. 2.如权利要求1所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:所述红外光谱图像用于检测表面温差。2. The microchannel aluminum flat tube appearance inspection method based on image processing as described in claim 1, wherein the infrared spectral image is used to detect surface temperature difference. 3.如权利要求2所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:对所述采集图像进行预处理的步骤为,3. The method for appearance inspection of microchannel aluminum flat tubes based on image processing as described in claim 2, characterized in that: the step of preprocessing the acquired image is as follows: 进行光照均衡处理,采集图像进行归一化变换,转换公式为:To perform illumination equalization processing, the acquired image is normalized using the following formula: , 其中,I(u,v)为原始采集图像的灰度值,为归一化后的图像,为图像像素值的最小值,为图像像素值的最大值,为图像的水平方向与垂直方向坐标,Where I(u, v) is the grayscale value of the original acquired image. The image after normalization. The minimum value of the image pixel. The maximum value of the image pixels. The horizontal and vertical coordinates of the image. 采用双边滤波平滑光照不均匀区域,公式为:Bilateral filtering is used to smooth areas of uneven illumination, using the following formula: , 其中,为经过双边滤波的图像,为空间域高斯核,为像素强度高斯核,为邻域像素点的灰度值,m,n为滤波窗口内的像素坐标,in, The image is after bilateral filtering. For the spatial domain Gaussian kernel, For pixel intensity Gaussian kernel, Let m and n be the gray values of neighboring pixels, and m and n be the pixel coordinates within the filtering window. 采用限制对比度自适应直方图均衡化进行增强,增强公式为:Enhancement is achieved using contrast-limited adaptive histogram equalization, with the enhancement formula as follows: , 其中,为经过CLAHE增强后的图像,CLAHE(·)为限制对比度自适应直方图均衡化函数,为对比度限制参数,in, The image is enhanced using CLAHE, where CLAHE(·) is a contrast-limited adaptive histogram equalization function. This is a contrast limiting parameter. 计算自适应阈值,公式为:The adaptive threshold is calculated using the following formula: , 进行二值化:Binarization: ,则like ,but , ,则like ,but , 其中,为自适应阈值,分别为窗口w内的均值和标准差,k为调节系数,为背景抑制后的图像。in, For adaptive threshold, Here, represents the mean and standard deviation within window w, respectively, and k is the adjustment coefficient. This is the image after background suppression. 4.如权利要求3所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:步骤S3中,结合梯度方向直方图进行特征增强,突出腐蚀缺陷的边缘信息。4. The microchannel aluminum flat tube appearance inspection method based on image processing as described in claim 3, characterized in that: in step S3, feature enhancement is performed by combining gradient direction histogram to highlight the edge information of corrosion defects. 5.如权利要求4所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:所述基于步骤S2预处理后的采集图像进行超分辨率重建,利用超分辨率ESRGAN算法增强低分辨率区域的细节,生成超分辨率图像的步骤为,5. The microchannel aluminum flat tube appearance inspection method based on image processing as described in claim 4, characterized in that: the step of performing super-resolution reconstruction based on the acquired image after preprocessing in step S2, and using the super-resolution ESRGAN algorithm to enhance the details of low-resolution regions to generate a super-resolution image is as follows: 定义降采样过程为:The downsampling process is defined as follows: , 其中,为低分辨率图像,D(·)为双三次插值降采样函数,为步骤S2处理后的图像,in, For low-resolution images, D(·) is the bicubic interpolation downsampling function. The image after processing in step S2. 采用ESRGAN进行超分辨率重建:Super-resolution reconstruction using ESRGAN: , 其中,为超分辨率重建后的图像,为ESRGAN生成器,θ为网络参数集合,in, For the super-resolution reconstructed image, For the ESRGAN generator, θ is the set of network parameters. 结合梯度方向直方图HOG提取边缘信息,提取公式为:Edge information is extracted by combining histogram of gradient orientation (HOG). The extraction formula is as follows: , 其中,H(p,q)为HOG特征图,为沿方向Φ的梯度信息,p,q为图像的水平方向和垂直方向坐标。Where H(p, q) is the HOG feature map. The gradient information is along the direction Φ, where p and q are the horizontal and vertical coordinates of the image. 6.如权利要求1所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:步骤S4中采用焦点损失Focal Loss和回归损失Soft IOU Loss作为损失函数,用于增强检测过程中对腐蚀缺陷区域的聚焦能力。6. The microchannel aluminum flat tube appearance inspection method based on image processing as described in claim 1, characterized in that: in step S4, focal loss and soft IOU loss are used as loss functions to enhance the focusing ability on corrosion defect areas during the inspection process. 7.如权利要求1所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:所述基于步骤S3生成的超分辨率图像,采用改进YOLOv3缺陷检测算法,提取缺陷区域并进行目标检测的步骤为,7. The microchannel aluminum flat tube appearance inspection method based on image processing as described in claim 1, characterized in that: the step of extracting defect regions and performing target detection based on the super-resolution image generated in step S3 using an improved YOLOv3 defect detection algorithm is as follows: 进行多尺度特征提取,定义多尺度特征图为Multi-scale feature extraction is performed, and the multi-scale feature map is defined as follows: : , 其中,分别表示不同尺度的特征图,in, These represent feature maps at different scales. 采用通道注意力机制计算注意力权重,计算公式为:Attention weights are calculated using a channel attention mechanism, and the formula is as follows: , 其中,为注意力权重图,为可学习参数,为修正线性单元激活函数,σ(·)为Sigmoid激活函数,F(p,q)为像素点(p,q)处的特征值,in, For attention weights, For learnable parameters, To correct the linear unit activation function, σ(·) is the Sigmoid activation function, and F(p, q) is the feature value at pixel (p, q). 定义检测框预测公式为:The formula for predicting the detection box is defined as follows: , 其中,为目标中心坐标,w,h为目标框宽度和高度,为目标置信度,in, Here are the coordinates of the target center, and w and h are the width and height of the target bounding box. For target confidence level, 采用Focal Loss进行分类优化,优化函数为:Focal Loss is used for classification optimization, and the optimization function is: , 其中,为Focal Loss,α,γ为调整参数,为预测概率。in, For Focal Loss, α and γ are adjustment parameters. To predict probabilities. 8.如权利要求7所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:所述对步骤S4提取的缺陷区域进行分类的步骤为,8. The image processing-based microchannel aluminum flat tube appearance inspection method as described in claim 7, characterized in that: the step of classifying the defect regions extracted in step S4 is as follows: 定义输入缺陷区域图像为Define the input defect region image as : , 其中,为缺陷区域图像,为步骤S4提取的缺陷掩码,为步骤S3的超分辨率图像,u,v为图像的水平方向和垂直方向坐标,in, Image of the defect area. The defect mask extracted in step S4. The super-resolution image from step S3, where u and v are the horizontal and vertical coordinates of the image. 计算多模态特征融合向量,计算公式为:The multimodal feature fusion vector is calculated using the following formula: , 其中,为多模态特征向量,为可见光特征,为红外光谱特征,为紫外光谱特征,Concat(·)为特征拼接操作,in, For multimodal feature vectors, It has visible light characteristics. Infrared spectral characteristics, For ultraviolet spectral features, Concat() is the feature splicing operation. 采用深度神经网络DNN进行分类,分类公式为:The classification is performed using a deep neural network (DNN), and the classification formula is as follows: , 其中,P为缺陷类别概率向量,W为分类层权重矩阵,b为偏置向量,Softmax(·)为Softmax函数,Where P is the defect category probability vector, W is the classification layer weight matrix, b is the bias vector, and Softmax(·) is the Softmax function. 计算红外温度分布偏差,计算公式为:The formula for calculating the infrared temperature distribution deviation is as follows: , 其中,为温度异常偏差,为红外图像中的温度值,为背景平均温度,为缺陷区域像素点数量。in, This is due to an abnormal temperature deviation. The temperature value in the infrared image. The background average temperature, This represents the number of pixels in the defective area. 9.如权利要求8所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:步骤S6中,对于微小但具潜在扩展趋势的腐蚀缺陷,标记为重点监测对象。9. The microchannel aluminum flat tube appearance inspection method based on image processing as described in claim 8, characterized in that: in step S6, small corrosion defects with potential for expansion are marked as key monitoring objects. 10.如权利要求9所述的一种基于图像处理的微通道铝扁管外观检测方法,其特征在于:所述基于步骤S5分类的缺陷区域,采用动态判定阈值方法,结合历史数据优化缺陷判定标准,确定最终检测结果的步骤为,10. The image processing-based microchannel aluminum flat tube appearance inspection method as described in claim 9, characterized in that: the step of determining the final detection result by using a dynamic judgment threshold method and combining historical data to optimize the defect judgment criteria based on the defect area classified in step S5 is as follows: 定义判定阈值为Define the judgment threshold as : , 其中,为动态判定阈值,为历史缺陷样本的均值,为历史缺陷样本的标准差,为调节系数,in, To dynamically determine the threshold, This represents the mean of historical defect samples. The standard deviation of the historical defect samples. For adjustment coefficients, 依据判定阈值对缺陷严重度分级,分级方式为:The severity of defects is graded based on a judgment threshold, and the grading method is as follows: ,则like ,but , ,则like ,but , ,则like ,but , 其中,为缺陷等级,1为轻微,2为中等,3为严重,为缺陷严重度划分系数,in, The defects are categorized by severity: 1 for minor, 2 for moderate, and 3 for severe. The severity of the defect is determined by a coefficient. 定义腐蚀缺陷扩展趋势预测模型为:The corrosion defect propagation trend prediction model is defined as follows: , 其中,为腐蚀缺陷扩展概率,为预测模型权重,为预测模型偏置,σ(·)为Sigmoid函数,若,则标记为重点监测对象,其中Pthres为扩展趋势判定阈值。in, For the probability of corrosion defect propagation, To predict the model weights, For the prediction model bias, σ(·) is the Sigmoid function, if If a target is identified as a key monitoring target, then it is marked as such, where P <sub>thres</sub> is the threshold for determining the expansion trend.
CN202510283285.2A 2025-03-11 2025-03-11 A Microchannel Aluminum Flat Tube Appearance Inspection Method Based on Image Processing Active CN120163798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510283285.2A CN120163798B (en) 2025-03-11 2025-03-11 A Microchannel Aluminum Flat Tube Appearance Inspection Method Based on Image Processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510283285.2A CN120163798B (en) 2025-03-11 2025-03-11 A Microchannel Aluminum Flat Tube Appearance Inspection Method Based on Image Processing

Publications (2)

Publication Number Publication Date
CN120163798A CN120163798A (en) 2025-06-17
CN120163798B true CN120163798B (en) 2026-01-02

Family

ID=96002946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510283285.2A Active CN120163798B (en) 2025-03-11 2025-03-11 A Microchannel Aluminum Flat Tube Appearance Inspection Method Based on Image Processing

Country Status (1)

Country Link
CN (1) CN120163798B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120543539B (en) * 2025-07-23 2025-10-28 曙光数据基础设施创新技术(北京)股份有限公司 A liquid-cooled cold plate defect detection method and system based on image processing
CN120543950B (en) * 2025-07-25 2025-10-31 山东迪特智联信息科技有限责任公司 Deep learning-based micro-channel aluminum flat tube classification detection method and system
CN121120816A (en) * 2025-08-27 2025-12-12 佛山大学 A visual mapping method for low-light environments

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150437A (en) * 2020-09-23 2020-12-29 南昌航空大学 Image processing method for DR detection of crack defects in laser additive manufacturing diffuser
CN118967672A (en) * 2024-10-15 2024-11-15 无锡学院 Industrial defect detection method, system, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119086020B (en) * 2024-09-27 2025-04-11 深圳华和信科技发展有限公司 Liquid crystal screen defect detection method, system and storage medium based on machine vision

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150437A (en) * 2020-09-23 2020-12-29 南昌航空大学 Image processing method for DR detection of crack defects in laser additive manufacturing diffuser
CN118967672A (en) * 2024-10-15 2024-11-15 无锡学院 Industrial defect detection method, system, device and storage medium

Also Published As

Publication number Publication date
CN120163798A (en) 2025-06-17

Similar Documents

Publication Publication Date Title
CN120163798B (en) A Microchannel Aluminum Flat Tube Appearance Inspection Method Based on Image Processing
Ren et al. State of the art in defect detection based on machine vision
CN113469177B (en) Deep learning-based drainage pipeline defect detection method and system
CN118967672B (en) Industrial defect detection method, system, device and storage medium
CN113505865B (en) Sheet surface defect image recognition processing method based on convolutional neural network
CN118608504A (en) A method and system for detecting component surface quality based on machine vision
CN116012291A (en) Method and system for image defect detection of industrial parts, electronic device and storage medium
CN119515875B (en) Chip defect visual detection method
CN112862744A (en) Intelligent detection method for internal defects of capacitor based on ultrasonic image
CN118799592A (en) A reducer appearance detection method and system based on deep learning
CN118967644A (en) A workpiece surface defect detection method based on multi-attention mechanism
CN119991544B (en) Intelligent classification method and system for strain clamp defects of power transmission line based on two-dimensional image
CN113313678A (en) Automatic sperm morphology analysis method based on multi-scale feature fusion
CN121120603A (en) An automatic inspection method and device for weld seams in welded parts based on machine vision
CN120655596A (en) Earphone appearance shell appearance defect detection method based on visual detection
CN114332506A (en) A multi-scale space joint model and its visual detection method
CN118840336A (en) Deep learning-based intelligent endoscopic defect detection method
CN114818977A (en) Self-adaptive algorithm for image recognition
CN119850539B (en) Electronic industry AOI visual detection optimization method based on large model
CN120563939B (en) Area-array-camera-based method and system for classifying broken filament defects
CN117593301B (en) Machine vision-based memory bank damage rapid detection method and system
CN120013886A (en) Industrial product defect detection method and system
CN121392390A (en) Visual inspection method for surface defects of engine cylinder body and cylinder cover
CN120635040A (en) A method for detecting surface defects of aircraft engine turbine blades
Liu et al. Improved YOLOv11 with RFAConv and ASFF Fusion for Photovoltaic Panel Defect Detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant