Carbon-coated foil coating uniformity detection method and system based on machine vision
Through multi-angle multi-spectral image acquisition and deep learning feature extraction methods based on machine vision, the problems of complex texture processing and light sensitivity in coating detection are solved, and the accurate detection and unified evaluation standards of coating uniformity are achieved.
Patent Information
- Application Number
- CN202510640760.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-06-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing coating coating detection methods for coated foils are insufficiently accurate when dealing with complex surface textures, and are sensitive to light conditions. They lack unified evaluation standards, making it difficult to achieve accurate detection of coating uniformity.
Using machine vision-based detection method, multi-angle multi-spectral image acquisition and fusion technology, combined with adaptive histogram equalization and reflected spot suppression processing, multi-scale texture features of the coating area were extracted, and the coating surface feature vector was constructed using a pre-trained ResNet-50 deep convolutional network, and the coating uniformity index was calculated through the uniformity evaluation model.
Accurate detection of coating uniformity is achieved, the influence of light changes is overcome, complex texture features can be accurately extracted and analyzed, unified evaluation standards are established, and the accuracy and comparability of detection are improved.
Smart Images

Figure CN120182252A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of detecting the coating uniformity of coated carbon foils, and particularly to a method and system for detecting the coating uniformity of coated carbon foils based on machine vision. Background Art
[0002] As an important carrier for the negative electrode material of lithium-ion batteries, the coating uniformity of coated carbon foils directly affects the performance and service life of the batteries. Against the backdrop of the rapid development of the lithium battery industry, higher requirements are put forward for the detection of the coating quality of coated carbon foils. Currently, on the production line of coated carbon foils, quality detection mainly relies on manual visual inspection or simple machine vision methods, which have problems such as low efficiency, strong subjectivity, and unstable detection results.
[0003] Existing detection methods for coated carbon foils mainly focus on whether there are obvious defects in the coating. For example, the method disclosed in CN202311631400.8 judges the coating quality by comparing the change in grayscale images and surface density before and after baking. Although this method can detect obvious defects in the coating, it has obvious deficiencies in evaluating the coating uniformity. First, simply relying on the comparison of grayscale images cannot comprehensively reflect the complex texture features on the coating surface; second, although the surface density index can reflect the overall situation of the coating, it is difficult to reflect the subtle differences in local uniformity; third, this method is relatively sensitive to environmental lighting conditions and is easily interfered by factors such as reflection and shadow, affecting the accuracy of detection.
[0004] In addition, existing technologies generally lack a unified evaluation standard for coating uniformity. The detection results between different production lines and different detection devices are often difficult to directly compare, which brings difficulties to product quality control and production process optimization. At the same time, traditional machine vision methods perform poorly in dealing with the complex texture features on the coating surface, especially when multiple scale features need to be considered simultaneously, it is often difficult to obtain satisfactory detection results.
[0005] Therefore, there is an urgent need to develop a detection method that can accurately evaluate the coating uniformity of coated carbon foils. This method should be able to overcome the influence of environmental lighting changes, accurately extract and analyze the complex texture features on the coating surface, and establish a unified evaluation standard to achieve precise detection of coating uniformity. Summary of the Invention
[0006] In view of this, the present invention provides a method for detecting the coating uniformity of coated carbon foils based on machine vision, aiming to solve the technical problems such as insufficient accuracy in dealing with complex surface textures, sensitivity to lighting conditions, and lack of a unified evaluation standard in existing coating detection methods, and to achieve precise detection of coating uniformity.
[0007] To achieve the above object, a method for detecting the coating uniformity of carbon-coated foil based on machine vision provided by the present invention includes the following steps: S1: Use a multi-angle camera to collect blue, green, red, and near-infrared spectral images of the surface of the carbon-coated foil, and generate a fused composite image through a multi-spectral image fusion algorithm; S2: Perform adaptive histogram equalization and reflection spot suppression processing on the fused composite image, and output the enhanced image; S3: Extract the coating edge features in the enhanced image, and combine the region growing method to achieve the segmentation of the coating region, and obtain the coating region mask; S4: Use a pre-trained ResNet-50 deep convolutional network to extract multi-scale texture features of the coating region, and construct a coating surface feature vector; S5: Based on the extracted feature vector and the standard template library, calculate the uniformity index of the coating through a uniformity evaluation model to detect the coating uniformity.
[0008] As a further improvement method of the present invention: Optionally, in the step S1, using a multi-angle camera to collect blue, green, red, and near-infrared spectral images of the surface of the carbon-coated foil, and generating a fused composite image through a multi-spectral image fusion algorithm, includes: S11: Use a camera to collect blue, green, red, and near-infrared spectral images of the surface of the carbon-coated foil, and collect images of the surface of the carbon-coated foil at four angles of 0°, 45°, 90°, and 135° to obtain a multi-spectral image sequence , where is the band number, , is the angle number, , is the th band, the th angle of the collected image; S12: Perform spatial registration and spectral correction on the obtained multi-spectral image sequence, specifically: ; Among them, is the th band, the th angle of the corrected image; is the pixel coordinate in the image, is the horizontal coordinate of the image, is the vertical coordinate of the image; is the pixel value of the corrected image at the pixel coordinate ; is at the pixel coordinate The pixel value at and are the standard brightness mean and variance respectively; and are the mean and variance of the pixel values within the neighborhood centered at the pixel coordinate respectively, where \(e\) is the natural constant; S13: Construct an adaptive weight fusion algorithm to generate a fused composite image, specifically: ; where is the fused composite image; is the pixel value of the fused composite image at the pixel coordinate ; is the th band, th angle, and the fusion weight at the pixel coordinate , specifically: ; where is the th band, th angle, and the sharpness evaluation value at the pixel coordinate , which is calculated based on the gradient value of the corrected image.
[0009] Optionally, in the S2 step, perform adaptive histogram equalization and reflection spot suppression on the fused composite image, and output the enhanced image, including: S21: Perform block processing on the fused composite image, specifically: Divide the fused composite image into non-overlapping sub-blocks, and the number of sub-blocks is calculated as: ; where is the total number of divided sub-blocks; is the width of the fused composite image; is the height of the fused composite image; is the width of each sub-block; is the height of each sub-block; is the ceiling operation; S22: Calculate the histogram and cumulative distribution function of each sub-block, specifically: ; where is the Histogram of sub - blocks; is the row index of the sub - block, ; is the column index of the sub - block, ; is the pixel gray value, ; is the pixel value of the fused composite image at the pixel coordinate ; is an indicator function, which takes the value of 1 when , otherwise 0; Calculate the cumulative distribution function: ; where, is the cumulative distribution function of the th sub - block; is an intermediate variable for cumulative calculation, ; S23: Perform reflection spot suppression processing, specifically: ; where, is the cumulative distribution function of the th sub - block after reflection spot suppression; is the reflection suppression threshold of the th sub - block; is the minimum - value operation; The reflection suppression threshold is specifically: ; where, is the pixel mean of the th sub - block; is the pixel standard deviation of the th sub - block; S24: Generate the enhanced image, specifically: ; where, is the enhanced image; is the pixel value of the enhanced image at the pixel coordinate ; is the rounding - off operation; is the contribution weight of the th sub - block to the pixel coordinate , specifically: ; where, is the distance from the pixel coordinate to the The reciprocal of the Euclidean distance from the center of the sub-blocks.
[0010] Optionally, in step S3, extract the coating edge features in the enhanced image, and combine the region growing method to achieve accurate segmentation of the coating area, obtaining a coating area mask, including: S31: For the enhanced image Perform Gaussian smoothing, specifically: ; where is the smoothed image; is the pixel value of the smoothed image at pixel coordinates ; and are the horizontal and vertical offsets of the Gaussian kernel respectively, ; is pi; is the pixel value of the enhanced image at pixel coordinates ; S32: Calculate the image gradient, specifically: ; where is the horizontal gradient at pixel coordinates ; is the vertical gradient at pixel coordinates ; is the gradient magnitude at pixel coordinates ; S33: Calculate the adaptive threshold and generate the edge detection result: S331: Calculate the adaptive threshold: ; where is the high threshold at pixel coordinates ; is the low threshold at pixel coordinates ; is the neighborhood mean; is the 5×5 neighborhood standard deviation; S332: Obtain the edge detection result image: ; where is the pixel value of the edge detection result image at pixel coordinates , 1 is an edge point, and 0 is a non-edge point; S34: Perform region growing segmentation on the edge detection result to obtain the coating area mask , where the specific region growing segmentation is: Select the pixel points in the edge detection result that are greater than as the seed point set; Create an empty labeling matrix with the same size as the edge detection result image, and the initial values are all 0; traverse each seed point in the seed point set and label the value at the corresponding position in the labeling matrix as 1; For each seed point that has been labeled as 1, check the pixel points in its 8-neighborhood, that is, the eight directly adjacent pixel points in the up, down, left, right, upper left, lower left, upper right, and lower right directions of the position where the seed point is located. When the value of the neighborhood pixel point in the labeling matrix is 0 and the absolute value of the difference between its pixel value in the smoothed image and the pixel value of the current seed point in the smoothed image is less than the preset growth threshold, add the neighborhood pixel point to the seed point set and label it as 1 in the labeling matrix; Repeat the above growth process until the seed point set is empty; Output the labeling matrix as the coating area mask, where the pixel points labeled as 1 are the coating area, and the pixel points labeled as 0 are the background area; among them, the preset growth threshold is adaptively determined according to the contrast characteristics of the smoothed image, and the calculation method is 0.2 times the standard deviation of the grayscale of the smoothed image.
[0011] Optionally, in step S4, a pre-trained ResNet-50 deep convolutional network is used to extract multi-scale texture features of the coating area and construct a coating surface feature vector, including: S41: Preprocess the coating area mask and the enhanced image. The preprocessing multiplies the coating area mask and the enhanced image pixel by pixel to obtain an image that only contains the coating area; uniformly scale this image to a size of 224×224 pixels to obtain the preprocessed image; S42: Input the preprocessed image into the pre-trained ResNet-50 deep convolutional network to extract multi-scale texture features; the ResNet-50 network uses the model parameters pre-trained on the ImageNet dataset, only retains the feature extraction layer, and removes the last classification layer; S43: Perform global average pooling operation on the feature map output by the ResNet-50 network to convert the multi-channel feature map into a 256-dimensional feature vector as the feature vector representing the coating surface texture features .
[0012] Optionally, in step S5, based on the extracted feature vector and the standard template library, the uniformity index of the coating is calculated through a uniformity evaluation model to detect the coating uniformity, specifically including: S51: Establish a standard template feature library: Collect standard coating samples of different grades, including four grades: excellent, good, qualified, and unqualified. Select 100 typical samples for each grade, extract their feature vectors, and construct a template feature library; calculate the mean vector of the sample feature vectors for each grade as the standard template feature for that grade. S52: Calculate the similarity between the sample to be measured and the standard template: ; Among them, is the similarity score between the sample to be measured and the -th level standard template; The feature vector of the sample to be measured; is the feature vector of the -th level standard template; is the grade index, representing the four grades of excellent, good, qualified, and unqualified respectively; is the Euclidean distance; S53: Determine the coating quality grade: Based on the similarity score and the standard template grade corresponding to the maximum similarity, determine the coating quality grade according to the following rules: When the similarity score is greater than 0.9 and the maximum similarity corresponds to the excellent-level template, it is determined to be the excellent level; When the similarity score is between 0.8 and 0.9 and the maximum similarity corresponds to the good-level or above template, it is determined to be the good level; When the similarity score is between 0.7 and 0.8 and the maximum similarity corresponds to the qualified-level or above template, it is determined to be the qualified level; In other cases, it is determined to be the unqualified level.
[0013] The present invention also discloses a machine vision-based carbon-coated foil coating uniformity detection system, including: Fusion module: Use multi-angle cameras to collect blue, green, red, and near-infrared spectral images of the carbon-coated foil coating surface, and generate a fused composite image through a multi-spectral image fusion algorithm; Enhancement module: Perform adaptive histogram equalization and reflection spot suppression processing on the fused composite image, and output the enhanced image; Segmentation module: Extract the coating edge features in the enhanced image, and combine the region growing method to achieve the segmentation of the coating area; Feature vector extraction module: Use a pre-trained ResNet-50 deep convolutional network to extract multi-scale texture features of the coating area, and construct a coating surface feature vector; Evaluation module: Based on the extracted feature vectors and the standard template library, calculate the uniformity index of the coating through a uniformity evaluation model to detect the coating uniformity.
[0014] Compared with the prior art, the present invention has at least the following beneficial effects: Through multi-angle and multi-spectral image acquisition and fusion technology, combined with adaptive histogram equalization and reflection spot suppression processing, the present invention effectively solves the acquisition problem in coating surface detection. Multi-angle acquisition fully captures the three-dimensional texture features of the coating surface, multi-spectral fusion provides rich spectral information, and the adaptive image enhancement algorithm effectively suppresses the interference of reflection and shadow.
[0015] The present invention uses a deep learning method to extract the coating surface features. Through the pre-trained ResNet-50 network, it automatically learns and extracts multi-scale texture features, avoiding the limitations of manually designed features in traditional methods. The deep structure of the network can automatically capture features at various scales from micro-texture to macro-structure, and the residual connection design ensures the accuracy of feature extraction.
[0016] The present invention establishes a standardized uniformity evaluation system. By constructing a multi-level standard template library and a similarity calculation model, it realizes the precise quantitative evaluation of the coating uniformity. The standard template library contains a large number of typical samples, ensuring the reliability of the evaluation benchmark, and the multi-level determination rules based on similarity provide a clear grading standard. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic flow chart of a method for detecting the coating uniformity of carbon-coated foil based on machine vision according to an embodiment of the present invention; Figure 2 is a schematic diagram of the image fusion result according to an embodiment of the present invention. Among them, (a) is a schematic diagram of the surface image of the carbon-coated foil coating collected at 0°; (b) is a schematic diagram of the fused composite image; Figure 3 is a schematic flow chart of feature vector extraction according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] The present invention will be further described below with reference to the drawings, but the present invention is not limited in any way. Any transformation or replacement made based on the teachings of the present invention falls within the protection scope of the present invention.
[0019] Embodiment 1: A method for detecting the coating uniformity of carbon-coated foil based on machine vision, as Figure 1 shown, includes the following steps: S1: Use a multi-angle camera to collect blue, green, red, and near-infrared spectral images of the carbon-coated foil coating surface, and generate a fused composite image through a multi-spectral image fusion algorithm, including: S11: Use a camera to collect blue light, green light, red light, and near-infrared spectral images of the surface of the coated carbon foil. Collect surface images of the coated carbon foil at four angles: 0°, 45°, 90°, and 135°. The surface image of the coated carbon foil collected at 0° is as shown in Figure 2 (a), and obtain a multi-spectral image sequence , where is the band number, respectively represents the blue light band, green light band, red light band, and near-infrared band, is the angle number, respectively represents 0°, 45°, 90°, and 135°, is the th band, the image collected at the th angle; S12: Perform spatial registration and spectral correction on the obtained multi-spectral image sequence. Specifically: ; Among them, is the corrected image at the th band and the th angle; is the pixel coordinate in the image, is the horizontal coordinate of the image, is the vertical coordinate of the image; is the pixel value of the corrected image at the pixel coordinate ; is at the pixel coordinate pixel value; and are the standard brightness mean and variance respectively, which are 128 and 20 in this embodiment; and are the mean and variance of the pixel values in the neighborhood centered on the pixel coordinate , is the natural constant; S13: Construct an adaptive weight fusion algorithm to generate a fused composite image, as shown in Figure 2 (b). Specifically: ; Among them, is the fused composite image; is the fused composite image at the pixel coordinate pixel value; is the th band, the pixel coordinate at the th angle The fusion weight at ; wherein is the th band, the th angle, and the sharpness evaluation value at the pixel coordinate is specifically: ; wherein and are the neighborhood coordinate offsets; is the pixel value of the corrected image at the pixel coordinate .
[0020] In this step, through multi - angle and multi - spectral image acquisition and fusion technology, the image information of the coating surface at different bands and different angles can be comprehensively obtained. The acquisition method with four different angles can effectively capture the three - dimensional texture features of the coating surface and avoid information loss caused by single - angle acquisition. At the same time, through the image acquisition of four different bands of blue light, green light, red light, and near - infrared light, the reflection characteristics of the coating surface in different spectral ranges can be obtained.
[0021] S2: Perform adaptive histogram equalization and reflection spot suppression processing on the fused composite image, and output the enhanced image, including: S21: Perform block processing on the fused composite image, specifically: Divide the fused composite image into non - overlapping sub - blocks. The calculation method of the number of sub - blocks is: ; wherein is the total number of divided sub - blocks; is the width of the fused composite image; is the height of the fused composite image; is the width of each sub - block, which is 16 in this embodiment; is the height of each sub - block, which is 16 in this embodiment; is the ceiling operation; S22: Calculate the histogram and cumulative distribution function of each sub - block, specifically: ; wherein is the histogram of the th sub - block; is the row index of the sub - block, ; is the column index of the sub - block, ; is the pixel grayscale value, ; is the fused composite image at the pixel coordinate pixel value at; is the indicator function, when takes the value of 1, otherwise 0; Calculate the cumulative distribution function: ; where, is the cumulative distribution function of the th sub-block; is the intermediate variable for cumulative calculation, ; S23: Perform reflected spot suppression processing, specifically: ; where, is the cumulative distribution function of the th sub-block after reflected spot suppression; is the reflection suppression threshold of the th sub-block; is the minimum value operation; The reflection suppression threshold is specifically: ; where, is the pixel mean of the th sub-block; is the pixel standard deviation of the th sub-block; S24: Generate the enhanced image, specifically: ; where, is the enhanced image; is the pixel value of the enhanced image at the pixel coordinate ; is the rounding operation; is the contribution weight of the th sub-block to the pixel coordinate , specifically: ; where, is the reciprocal of the Euclidean distance from the pixel coordinate to the center of the th sub-block. Specifically in this embodiment: ; where, is the The central coordinates of the sub-blocks.
[0022] In this step, through adaptive histogram equalization and reflection spot suppression processing, the problems of insufficient contrast and local reflection in the coating surface image are effectively solved. By dividing the image into sub-blocks of appropriate size for processing, not only the image enhancement effect of the local area is ensured, but also the over-enhancement problem that may be caused by traditional global histogram equalization is avoided. The histogram and cumulative distribution function are calculated independently for each sub-block, enabling the image enhancement process to adaptively adjust according to the brightness characteristics of the local area and better preserve the local details of the image.
[0023] S3: Extract the coating edge features in the enhanced image, and combine the region growing method to achieve accurate segmentation of the coating area, obtaining a coating area mask, including: S31: Perform Gaussian smoothing on the enhanced image Specifically, it is: ; Wherein, Is the smoothed image; Is the pixel value of the smoothed image at the pixel coordinate ; And Are the horizontal and vertical offsets of the Gaussian kernel respectively, ; Is the pi; Is the pixel value of the enhanced image at the pixel coordinate ; S32: Calculate the image gradient, specifically: ; Wherein, Is the horizontal gradient at the pixel coordinate ; Is the vertical gradient at the pixel coordinate ; Is the gradient magnitude at the pixel coordinate ; S33: Calculate the adaptive threshold and generate the edge detection result: S331: Calculate the adaptive threshold: ; Wherein, Is the high threshold at the pixel coordinate ; Is the low threshold at the pixel coordinate ; Is The neighborhood mean; Is the 5×5 neighborhood standard deviation; S332: Obtain the edge detection result image: ; Wherein, is the pixel value of the edge detection result image at pixel coordinates , 1 represents an edge point, and 0 represents a non-edge point; S34: Perform region growing segmentation on the edge detection result to obtain the coating region mask , where the specific process of region growing segmentation is: Select the pixel points in the edge detection result greater than as the seed point set; Establish an empty marking matrix, with the same size as the edge detection result image, and the initial values are all 0; traverse each seed point in the seed point set, and mark the value at the corresponding position of the seed point in the marking matrix as 1; For each seed point marked as 1, check the pixel points in its 8-neighborhood, that is, the eight directly adjacent pixel points in the upper, lower, left, right, upper left, lower left, upper right, and lower right directions of the position where the seed point is located. When the value of the neighborhood pixel point in the marking matrix is 0, and the absolute value of the difference between its pixel value in the smoothed image and the pixel value of the current seed point in the smoothed image is less than the preset growth threshold, then add the neighborhood pixel point to the seed point set and mark it as 1 in the marking matrix; Repeat the above growth process until the seed point set is empty; Output the marking matrix as the coating region mask, where the pixel points marked as 1 are the coating regions, and the pixel points marked as 0 are the background regions; wherein, the preset growth threshold is adaptively determined according to the contrast feature of the smoothed image, and the calculation method is 0.2 times the standard deviation of the gray level of the smoothed image.
[0024] In this step, the precise segmentation of the coating region is achieved through a multi-level image processing strategy. First, Gaussian smoothing preprocessing effectively reduces the influence of image noise while retaining important edge information. On this basis, by calculating the image gradients in the horizontal and vertical directions, the direction features and intensity information of the coating edges are accurately captured. Particularly innovative is the adoption of an adaptive threshold strategy based on local statistical features. By analyzing the gradient distribution features of the local region, high and low thresholds are automatically determined, enabling the edge detection process to adapt to the characteristics of different regions of the image, ensuring both the integrity of strong edges and effectively detecting weak edges.
[0025] S4: Use the pre-trained ResNet-50 deep convolutional network to extract the multi-scale texture features of the coating region and construct the coating surface feature vector, as Figure 3 shown, including: S41: Preprocess the coating area mask and the enhanced image. This preprocessing multiplies the coating area mask and the enhanced image pixel by pixel to obtain an image that only contains the coating area. Scale this image uniformly to a size of 224×224 pixels to obtain the preprocessed image. In this embodiment, bilinear interpolation algorithm is used for image scaling, and the pixel value range is normalized to the interval [0,1]. S42: Input the preprocessed image into a pre-trained ResNet-50 deep convolutional network to extract multi-scale texture features. The ResNet-50 network uses the model parameters pre-trained on the ImageNet dataset, only retains the feature extraction layer, and removes the last classification layer. S43: Perform global average pooling operation on the feature map output by the ResNet-50 network to convert the multi-channel feature map into a 256-dimensional feature vector, which is used as the feature vector representing the texture features of the coating surface. 。
[0026] This step realizes the automatic extraction of the texture features of the coating surface through deep learning methods, with significant technical advantages. First, through the mask preprocessing operation, the coating area is accurately located and extracted, eliminating the interference of the background area on feature extraction. The use of standardized image size and pixel value normalization processing ensures the consistency and numerical stability of the input data. In particular, the pre-trained ResNet-50 deep convolutional network is used as the feature extractor, making full use of the feature extraction ability of this network pre-trained on a large-scale image dataset.
[0027] S5: Based on the extracted feature vector and the standard template library, calculate the uniformity index of the coating through the uniformity evaluation model to detect the coating uniformity, specifically including: S51: Establish a standard template feature library: Collect standard coating samples of different grades, including four grades: excellent, good, qualified, and unqualified. Select 100 typical samples for each grade, extract their feature vectors to construct a template feature library; calculate the mean vector of the sample feature vectors for each grade as the standard template feature of this grade. S52: Calculate the similarity between the sample to be measured and the standard template: ; where is the similarity score between the sample to be measured and the th level standard template; the feature vector of the sample to be measured; is the feature vector of the th level standard template; is the grade index, They respectively represent four grades: excellent, good, qualified, and unqualified. is the Euclidean distance; S53: Determine the coating quality grade: Based on the similarity score and the standard template grade corresponding to the maximum similarity, determine the coating quality grade according to the following rules: When the similarity score is greater than 0.9 and the maximum similarity corresponds to the excellent-level template, it is determined as the excellent level; When the similarity score is between 0.8 and 0.9 and the maximum similarity corresponds to the good-level or above template, it is determined as the good level; When the similarity score is between 0.7 and 0.8 and the maximum similarity corresponds to the qualified-level or above template, it is determined as the qualified level; In other cases, it is determined as the unqualified level.
[0028] This step establishes a complete coating uniformity evaluation system, and realizes the precise quantitative evaluation of coating quality through the standard template library and similarity calculation. First, by establishing a standard template feature library containing multiple grades, a reliable reference benchmark is provided for the evaluation. Selecting a sufficient number of typical samples for each grade ensures the representativeness and statistical reliability of the template features. In the similarity calculation link, an exponential similarity metric method based on the Euclidean distance is adopted. This calculation method not only considers the distance relationship between samples in the feature space, but also normalizes the similarity to the interval from zero to one through exponential mapping, making the evaluation results more intuitive.
[0029] Embodiment 2: The present invention also discloses a carbon-coated foil coating uniformity detection system based on machine vision, which includes the following five modules: Fusion module: Use a multi-angle camera to collect blue light, green light, red light, and near-infrared spectral images of the carbon-coated foil coating surface, and generate a fused composite image through a multi-spectral image fusion algorithm; Enhancement module: Perform adaptive histogram equalization and reflection spot suppression processing on the fused composite image, and output the enhanced image; Segmentation module: Extract the coating edge features in the enhanced image, and combine the region growing method to realize the segmentation of the coating area; Feature vector extraction module: Use a pre-trained ResNet-50 deep convolutional network to extract multi-scale texture features of the coating area, and construct a coating surface feature vector; Evaluation module: Based on the extracted feature vector and the standard template library, calculate the uniformity index of the coating through the uniformity evaluation model to detect the coating uniformity.
[0030] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments. Moreover, the term "including", "comprising" or any other variant thereof in this text is intended to cover non-exclusive inclusion, so that a process, apparatus, article or method including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, apparatus, article or method. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, apparatus, article or method including such element.
[0031] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0032] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for detecting uniformity of carbon-coated foil coating based on machine vision, characterized in that: The following steps are involved: S1: Use a multi-angle camera to collect blue, green, red and near-infrared spectral images of the carbon-coated foil coating surface, and generate a fused composite image through a multi-spectral image fusion algorithm; S2: performing adaptive histogram equalization and reflection spot suppression processing on the fused composite image, and outputting an enhanced image; S3: Extract the coating edge features in the enhanced image, combine the region growing method to segment the coating area, and obtain the coating area mask; S4: A pre-trained ResNet-50 deep convolutional network is used to extract multi-scale texture features of the coating area and construct a coating surface feature vector; S5: Based on the extracted feature vectors and standard template library, the uniformity index of the coating is calculated through the uniformity evaluation model, and the coating uniformity is tested.
2. The method for detecting uniformity of carbon-coated foil coating based on machine vision according to claim 1 is characterized in that: The step S1 comprises: S11: Use a multi-angle camera to collect carbon-coated foil coating surface images at four angles: 0°, 45°, 90°, and 135° to obtain a multispectral image sequence ,in is the band number, , is the angle number, , For the Band, Images collected at different angles; S12: Perform spatial registration and spectral correction on the acquired multispectral image sequence, specifically: ; in, For the Band, The corrected image at each angle; is the pixel coordinate in the image, is the horizontal coordinate of the image, is the vertical coordinate of the image; The pixel coordinates of the corrected image are The pixel value at ; for In pixel coordinates The pixel value at ; and are the standard brightness mean and variance respectively; and The pixel coordinates are centered The mean and variance of the pixel values in the neighborhood, is a natural constant; S13: Construct an adaptive weight fusion algorithm to generate a fused composite image, specifically: ; in, is the composite image after fusion; The composite image after fusion In pixel coordinates The pixel value at ; For the Band, Pixel coordinates at angles The fusion weight at is: ; in, For the Band, Pixel coordinates at angles The clarity evaluation value at is obtained by calculating the gradient value of the corrected image.
3. The method for detecting uniformity of carbon-coated foil coating based on machine vision according to claim 2 is characterized in that: The step S2 comprises: S21: performing block processing on the fused composite image, specifically: The fused composite image Divide into non-overlapping sub-blocks, the number of sub-blocks is calculated as: ; in, is the total number of sub-blocks after division; is the width of the fused composite image; is the height of the fused composite image; is the width of each sub-block; is the height of each sub-block; This is a round-up operation; S22: Calculate the histogram and cumulative distribution function of each sub-block, specifically: ; in, For the Histogram of sub-blocks; is the row index of the sub-block, ; is the column index of the sub-block, ; is the pixel gray value, ; The composite image after fusion In pixel coordinates The pixel value at ; is the indicator function, when The value is 1 when it is, otherwise it is 0; Compute the cumulative distribution function: ; in, For the The cumulative distribution function of the sub-blocks; is the intermediate variable for cumulative calculation, ; S23: Performing a reflection spot suppression process, specifically: ; in, For the The cumulative distribution function of each sub-block after the reflected light spot is suppressed; For the The reflection suppression threshold of each sub-block; To take the minimum value operation; The reflex suppression threshold is: ; in, For the The pixel mean of each sub-block; For the The pixel standard deviation of each sub-block; S24: Generate an enhanced image, specifically: ; in, is the enhanced image; The pixel coordinates of the enhanced image are The pixel value at ; This is a rounding operation; For the Sub-block pixel coordinates The contribution weights are as follows: ; in, is the pixel coordinate To The inverse of the Euclidean distance between the centers of the sub-blocks.
4. The method for detecting uniformity of carbon-coated foil coating based on machine vision according to claim 3 is characterized in that: The step S3 comprises: S31: Enhanced image Perform Gaussian smoothing, specifically: ; in, is the smoothed image; The pixel coordinates of the smoothed image The pixel value at ; and are the horizontal and vertical offsets of the Gaussian kernel, ; is pi; The pixel coordinates of the enhanced image are The pixel value at ; S32: Calculate the image gradient, specifically: ; in, is the pixel coordinate The horizontal gradient at ; is the pixel coordinate The vertical gradient at ; is the pixel coordinate The gradient amplitude at ; S33: Calculate the adaptive threshold and generate edge detection results: S331: Calculate the adaptive threshold: ; in, is the pixel coordinate The high threshold at is the pixel coordinate The low threshold at for Neighborhood mean; is the standard deviation of the 5×5 neighborhood; S332: Obtain edge detection result image: ; in, The pixel coordinates of the edge detection result image The pixel value at , 1 is an edge point, 0 is a non-edge point; S34: Perform region growing segmentation on the edge detection result to obtain the coating region mask , where the specific region growing segmentation is: Select edge detection results Greater than The pixel points are taken as the seed point set; Create an empty marking matrix with the same size as the edge detection result image and initial values of 0; traverse each seed point in the seed point set and mark the value of the corresponding position of the seed point in the marking matrix as 1; For each seed point marked as 1, check the pixels in its 8-neighborhood, that is, the directly adjacent pixels in eight directions of the top, bottom, left, right, upper left, lower left, upper right, and lower right of the position of the seed point. When the value of the directly adjacent pixel in the marking matrix is 0, and the absolute value of the difference between its pixel value in the smoothed image and the pixel value of the current seed point in the smoothed image is less than a preset growth threshold, add the directly adjacent pixel to the seed point set and mark it as 1 in the marking matrix; define the step of checking the neighboring pixels, judging the growth conditions, and expanding the marked area according to the marked seed point as a single growth iteration operation; Repeat the single growth iteration operation until the seed point set is empty; The marking matrix is output as a coating area mask, where the pixels marked as 1 are the coating area, and the pixels marked as 0 are the background area; wherein the preset growth threshold is adaptively determined according to the contrast characteristics of the smoothed image, and is calculated as 0.2 times the grayscale standard deviation of the smoothed image.
5. The method for detecting uniformity of carbon-coated foil coating based on machine vision according to claim 4 is characterized in that: The step S4 comprises: S41: preprocessing the coating area mask and the enhanced image, wherein the preprocessing multiplies the coating area mask and the enhanced image pixel by pixel to obtain an image containing only the coating area; and uniformly scaling the image to a size of 224×224 pixels to obtain a preprocessed image; S42: inputting the preprocessed image into a pre-trained ResNet-50 deep convolutional network to extract multi-scale texture features; the ResNet-50 network uses model parameters pre-trained on the ImageNet dataset, retains only the feature extraction layer, and removes the last classification layer; S43: Perform global average pooling on the feature map output by the ResNet-50 network, and convert the multi-channel feature map into a 256-dimensional feature vector as the feature vector representing the surface texture characteristics of the coating .
6. The method for detecting uniformity of carbon-coated foil coating based on machine vision according to claim 5 is characterized in that: The step S5 comprises: S51: Establish standard template feature library: Collect standard coating samples of different levels, including excellent, good, qualified and unqualified. Select 100 typical samples for each level, extract their feature vectors to build a template feature library; calculate the mean vector of the sample feature vectors of each level as the standard template feature of that level; S52: Calculate the similarity between the sample to be tested and the standard template: ; in, The sample to be tested and Similarity score of the standard template; The feature vector of the sample to be tested; For the The feature vector of the standard template of the level; is the level index, They represent four levels: excellent, good, qualified and unqualified. is the Euclidean distance; S53: Determine coating quality level: Based on the similarity score and the standard template level corresponding to the maximum similarity, the coating quality level is determined according to the following rules: When the similarity score is greater than 0.9 and the maximum similarity corresponds to an excellent template, it is judged as excellent; When the similarity score is between 0.8 and 0.9, and the maximum similarity corresponds to a template of good level or above, it is judged as good level; When the similarity score is between 0.7 and 0.8, and the maximum similarity corresponds to a qualified level or above template, it is judged as qualified level; Other situations will be judged as unqualified levels.
7. A carbon-coated foil coating uniformity detection system based on machine vision, characterized in that: include: Fusion module: Use multi-angle cameras to collect blue, green, red and near-infrared spectral images of the carbon-coated foil coating surface, and generate a fused composite image through a multi-spectral image fusion algorithm; Enhancement module: performs adaptive histogram equalization and reflection spot suppression processing on the fused composite image, and outputs the enhanced image; Segmentation module: extract the coating edge features in the enhanced image and realize the segmentation of the coating area by combining the region growing method; Feature vector extraction module: uses a pre-trained ResNet-50 deep convolutional network to extract multi-scale texture features of the coating area and construct a coating surface feature vector; Evaluation module: Based on the extracted feature vectors and standard template library, the uniformity evaluation model is used to calculate the uniformity index of the coating and detect the uniformity of the coating; To realize a carbon-coated foil coating uniformity detection method based on machine vision as described in any one of claims 1-6.
Citation Information
Patent Citations
Carbon-coated foil coating defect detection method and system
CN117351005A
Cited By
Dynamic evaluation method for thermal paper coating uniformity driven by deep learning
CN121280391A
Judgment method for spraying quality of graphene ceramic gold coating of water turbine
CN121415169A
Method for judging coating quality of graphene-taikong coating of water turbine
CN121415169B
High-voltage switch shell surface coating uniformity evaluation method and system
CN121437512A
Thermal spraying coating quality detection system and method based on machine vision
CN121544558A