Electrolytic copper plate defect detection method and system based on computer vision technology

By employing adaptive image acquisition and multi-label classification technology, the problems of near-large and far-small effect and light source shadow interference in the inspection of electrolytic copper plates have been solved, achieving high-precision defect detection and judgment, and improving the reliability of copper plate quality control and the automation of the production process.

CN121788935AActive Publication Date: 2026-04-03SHAANXI QIANBAIZE TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing computer vision inspection technology has problems in detecting defects in electrolytic copper plates, such as near-large and far-small effect, interference from shadows on uneven surfaces under light source illumination, and poor versatility, which leads to missed or false detections and makes it difficult to adapt to copper plate surfaces with different degrees of unevenness.

Method used

An adaptive image acquisition module is used to acquire three-dimensional undulation morphology data and 2D images of copper plates. The size of structural elements is dynamically adjusted through the top-hat transformation algorithm. Grayscale processing and feature extraction are performed in combination with the three-dimensional undulation morphology data. A 3D feature enhancement and dynamic threshold segmentation strategy is used, combined with a multi-label classification structure, to determine defects.

Benefits of technology

It achieves high-precision identification of defects in electrolytic copper plates, reduces missed and false detections, provides simultaneous judgment of defect type and severity, and improves the reliability of product quality control and the ability to dynamically adjust production parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121788935A_ABST
    Figure CN121788935A_ABST
Patent Text Reader

Abstract

The invention discloses an electrolytic copper plate defect detection method and system based on a computer vision technology, and relates to the technical field of image processing, the system is composed of a plurality of functional modules, and the system comprises a self-adaptive image acquisition module for acquiring three-dimensional undulating form data and 2D images of a copper plate, and adopting a top-hat transformation algorithm to obtain a three-dimensional undulating form of the copper plate; dynamically adjusting the size of structural elements in the 2D image based on the three-dimensional fluctuation form data to obtain a standard image; the defect segmentation module is used for carrying out gray processing on illumination reflection differences of different areas on the surface of the copper plate based on the three-dimensional fluctuation form data to obtain gray values, mapping the gray values of the different areas to a unified standard interval, and carrying out defect image extraction on the standard image by adopting a 3D feature enhancement and dynamic threshold segmentation strategy; the feature fusion recognition module is used for extracting geometric features and texture features from the three-dimensional fluctuation form data and the 2D image, and splicing the geometric features and the texture features with the defect image to form an initial feature vector;
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to a method and system for detecting defects in electrolytic copper plates based on computer vision technology. Background Technology

[0002] Electrolytic copper plates are the core raw materials of the copper processing industry, and their surface quality directly determines the performance of downstream products. During the electrolytic production process, due to factors such as insufficient purity of anode copper and incomplete purification of electrolyte, impurities such as sulfur, arsenic, bismuth, and lead are easily deposited at the cathode, forming impurity defects. At the same time, uneven current density distribution in the electrolytic cell will lead to inconsistent deposition rates on the surface of the copper plate, resulting in uneven thickness and undulating morphological defects.

[0003] The application of existing computer vision inspection technology in the defect detection of electrolytic copper plates faces the following key technical bottlenecks: First, the near-large and far-small effect caused by undulating surfaces makes defects of the same size appear as different pixel sizes in different areas of the image, which can easily lead to missed or false detections during threshold segmentation; Second, the shadow interference generated by the light source illuminating the undulating surface can mask the characteristics of impurities and defects, reducing the recognition accuracy; Third, existing detection methods mostly use single 2D image features or fixed algorithm parameters, which have poor versatility and are difficult to adapt to copper plate surfaces with different degrees of undulation. Summary of the Invention

[0004] To achieve the above objectives, the present invention provides the following technical solution: A defect detection system for electrolytic copper plates based on computer vision technology, comprising: The adaptive image acquisition module acquires three-dimensional undulation morphology data and 2D images of the copper plate. It uses the top-hat transformation algorithm to dynamically adjust the size of structural elements in the 2D image based on the three-dimensional undulation morphology data to obtain a standard image. The defect segmentation module, based on three-dimensional undulation morphology data, performs grayscale processing on the light reflection differences in different areas of the copper plate surface to obtain grayscale values, maps the grayscale values ​​of different areas to a unified standard range, and uses 3D feature enhancement and dynamic threshold segmentation strategies to extract defect images from the standard image. The feature fusion and recognition module extracts geometric and texture features from 3D undulation morphology data and 2D images, and splices them with the defect image to form an initial feature vector. The PCA algorithm is used to reduce the dimensionality of the initial feature vector. The initial feature vector with high contribution to defect classification is selected by variance analysis. The high contribution features are weighted based on the feature attention mechanism, and a multi-label classification structure is used to determine the defect type and degree.

[0005] Furthermore, when acquiring 2D images, the surface of the copper plate is photographed line by line at a fixed frequency matching the speed of the conveyor belt, and then stitched together to form a complete 2D image; When acquiring the three-dimensional undulation morphology data of the copper plate, laser lines are continuously emitted onto the surface of the copper plate, and the distorted laser line images are captured in real time. Combining the pre-calibrated mapping relationship between the curvature of the laser lines and their height, the pixel coordinates of each laser line image are converted into the corresponding height value. At the same time, the encoder records the moving distance of the copper plate and stitches the height values ​​of each row into three-dimensional undulation morphology data.

[0006] Furthermore, the process of acquiring the standard image is as follows: When extracting features from three-dimensional undulation morphology data, pixel blocks of 2D images are used as 2D sub-regions, corresponding to the height values ​​of the same region in the three-dimensional undulation morphology data, and the average undulation amplitude and undulation frequency of the sub-region are calculated. The average fluctuation amplitude within a 2D sub-region is used as the criterion for determining low-fluidity, medium-fluidity, and high-fluidity regions. The size of structural elements in the 2D image is dynamically adjusted based on the determination results. The opening operation is performed by calling the structuring element of the 2D sub-region matching, and the opening operation result of the 2D sub-region is calculated by the top-hat transform algorithm to obtain the top-hat transform output of the region. The top-hat transform results of all 2D sub-regions are stitched together to form a complete image, and the complete image is subjected to preliminary grayscale normalization and isolated noise point removal to output a standard image.

[0007] Furthermore, the process of mapping grayscale values ​​from different regions to a unified standard range is as follows: Copper plate sample data with different degrees of undulation were pre-selected, and their three-dimensional undulation morphology data and corresponding 2D images were collected respectively. The variation law of gray value of copper plate surface under different degrees of undulation was analyzed one by one. By fitting and optimizing the copper plate sample data, a correlation model between three-dimensional undulation morphology data and light reflection was established. At the same time, the 2D image and the corresponding three-dimensional undulation morphology data were divided into multiple sub-regions of equal size, so that the processing parameters in each sub-region matched its own degree of undulation and reflection characteristics. Based on the pre-established three-dimensional undulation morphology data and the light reflection correlation model, combined with the undulation characteristics of each sub-region, grayscale deviation correction is performed on the corresponding 2D sub-region. The correction process is adjusted differently according to the different undulation characteristics of the sub-region.

[0008] Furthermore, the process of extracting defect images from standard images is as follows: Based on 3D undulation morphology data and 2D images, the extracted 3D features include local height abrupt change values, surface roughness, and slope change rate. By mapping the spatial location to each pixel of the standard image, a correlation matrix between 2D pixels and 3D features is established. For different sub-regions of the standard image, 3D feature enhancement processing is performed according to the corresponding 3D features. The standard image after 3D feature enhancement is segmented pixel by pixel using a dynamic threshold distribution map to extract defect regions and generate a binarized defect image.

[0009] Furthermore, the process of obtaining the initial feature vector is as follows: Based on 3D undulation morphology data and 2D images, geometric features and texture features are extracted respectively. Geometric features include calculating the average height, slope and aspect features, and curvature features of 2D sub-regions. Texture features include grayscale mapping, grayscale co-occurrence matrix features, and fractal dimension features. The values ​​of all features are mapped to the interval between 0 and 1, and the correlation coefficients between all features are calculated. The discrimination degree of each feature between defective and normal areas is calculated through variance analysis. Features with high discrimination degree are retained. The normalized and aligned single-group defect corresponding data are stitched together in a preset order. For all defects detected in a copper plate image, a corresponding initial feature vector is generated for each defect.

[0010] Furthermore, the process of selecting features that contribute highly to defect classification is as follows: The initial feature vector after dimensionality reduction is associated with the corresponding defect category label. The copper plate sample data is grouped according to the defect category, and the variance between groups and within groups are calculated respectively. For each feature of the initial feature vector after dimensionality reduction, its statistic is calculated, a statistical threshold is set, and features higher than the statistical threshold are retained. The features filtered by variance analysis are sorted from largest to smallest to form features that contribute highly to defect classification.

[0011] Furthermore, the process of determining the type and severity of defects is as follows: The selected high-contribution features are input into the attention network. The high-contribution features are mapped to the attention feature space through a fully connected layer to generate an attention feature vector. The attention weight parameters are initialized and assigned the same initial weight. The category label and degree label of the defect sample are obtained in advance, and an attention loss function is constructed. The value of each high-contribution feature is multiplied by the corresponding attention weight parameter to obtain the weighted feature value. All weighted feature values ​​are combined in the original order to form an attention weighted feature vector. A multi-label classification network is constructed based on a fully connected layer. The multi-label classification network structure is divided into a shared feature layer and an independent classification branch, and a loss function is defined for each. The loss functions of the shared feature layer and the independent classification branch are then weighted and summed to obtain the total multi-label loss function. The entire network is trained using labeled defect samples. The attention-weighted feature vector is used as input, and the probability distributions of defect type and defect severity are output. The total multi-label loss function is minimized, and the network parameters are updated through backpropagation until the model converges. After the model is trained, new copper plate defect samples are judged. The attention-weighted feature vector of the sample to be judged is input into the multi-label classification network. The probability distribution of the type classification branch is output, and the category corresponding to the maximum probability is selected as the defect type of the sample. The probability distribution of the degree classification branch is output, and the level corresponding to the maximum probability is selected as the defect degree of the sample. The defect type and degree are judged by combining the output results of the two branches.

[0012] A defect detection method for electrolytic copper plates based on computer vision technology includes the following steps: Step 1: Obtain the three-dimensional undulation morphology data and 2D image of the copper plate. Using the top-hat transformation algorithm, dynamically adjust the size of the structural elements in the 2D image based on the three-dimensional undulation morphology data to obtain the standard image. Step 2: Based on the three-dimensional undulation morphology data, grayscale processing is performed on the light reflection differences in different areas of the copper plate surface to obtain grayscale values. The grayscale values ​​of different areas are mapped to a unified standard range. A 3D feature enhancement and dynamic threshold segmentation strategy is adopted to extract defect images from the standard image. Step 3: Extract geometric and texture features from the 3D undulation morphology data and 2D images, and stitch them with the defect image to form an initial feature vector. Use the PCA algorithm to reduce the dimensionality of the initial feature vector. Use variance analysis to select features that contribute highly to defect classification from the reduced initial feature vector. Use the feature attention mechanism to assign weights to the high-contribution features, and use a multi-label classification structure to determine the defect type and degree.

[0013] The present invention provides a method and system for defect detection in electrolytic copper plates based on computer vision technology, which has the following beneficial effects: (1) In this invention, the top cap transformation of large-sized structural elements in the high-undulation area of ​​the copper plate completely covers the undulation shadow, avoiding misjudging the shadow as a defect; the small-sized structural elements in the low-undulation area accurately retain the outline of the minute defects, preventing the omission of minute scratches, pits and other hidden dangers; at the same time, the two grayscale normalizations first realize the uniformity of image brightness, and combine the three-dimensional data to correct the difference in light reflection, so that the defect features in different areas are on the same recognition benchmark, thereby improving the reliability of product quality control.

[0014] (2) This invention can output the defect type and degree simultaneously through a multi-label classification structure, and give quantitative indicators such as pit depth and scratch length by combining three-dimensional features. It can be connected to the production line MES system to help process personnel locate the cause of defects. For example, the severe pit in the high undulation area corresponds to the precision deviation of the rolling equipment, realizing the dynamic adjustment of production parameters. At the same time, based on the graded results of the defect degree, the product grade is automatically determined. For example, products with slight defects are downgraded and products with severe defects are intercepted and scrapped, replacing manual subjective judgment and reducing quality disputes caused by human error.

[0015] (3) This invention uses an adaptive strategy for three-dimensional undulation morphology data to dynamically adjust parameters in image acquisition, preprocessing, defect segmentation, feature extraction and classification. From regional adaptation of structural element size to undulation feature-driven grayscale correction model, the feature weights of the attention mechanism are self-learned, eliminating the need for separate parameter tuning for copper plates with different degrees of undulation, enabling the system to operate with high precision and stability. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the system of the present invention; Figure 2 This is a schematic diagram of the overall method of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1 Please see Figure 1 Embodiment 1 of this application provides a defect detection system for electrolytic copper plates based on computer vision technology. The system includes: The adaptive image acquisition module acquires three-dimensional undulation morphology data and 2D images of the copper plate. It uses the top-hat transformation algorithm to dynamically adjust the size of structural elements in the 2D image based on the three-dimensional undulation morphology data to obtain a standard image. Above the production line conveyor belt, a line scan industrial camera and a line laser sensor are deployed, both perpendicularly distributed along the direction of the conveyor belt's movement. The laser sensor emits a laser line vertically downwards, covering the width of the copper plate. The line scan camera is tilted at a 45° angle to the laser irradiation area, and an encoder is installed on the side of the conveyor belt to record the distance the copper plate moves. Reference data is collected using a standard flat plate with known flatness to correct the optical distortion of the line scan camera and to calibrate the spatial relationship between the line laser and the camera.

[0019] 2D Image Acquisition and Preprocessing: As the copper plate passes through the acquisition area at a constant speed with the conveyor belt, the line scan camera takes pictures of the copper plate surface line by line at a fixed frequency that matches the speed of the conveyor belt. The continuous line data is stitched together to form a complete 2D image with a resolution of usually above 2048×10000 pixels, covering the entire copper plate. After acquisition, the 2D image is preprocessed. Gaussian filtering is used to remove noise caused by ambient light interference, and histogram equalization is used to enhance image contrast and highlight the fine texture and potential defect contours of the copper plate surface.

[0020] Acquisition and analysis of three-dimensional undulation morphology data: Synchronized with 2D image acquisition, the line laser sensor continuously emits high-brightness laser lines onto the copper plate surface. When the laser lines illuminate the copper plate surface, the unevenness of the copper plate undergoes shape distortion. The laser lines in the raised areas are shifted upwards, and those in the recessed areas are shifted downwards. The line scan camera captures the distorted laser line images in real time. Combining the pre-calibrated mapping relationship between the degree of curvature of the laser lines and their height, the pixel coordinates of each laser line image are converted into the height value of the corresponding position. At the same time, the encoder records the copper plate's movement distance, which stitches the height values ​​line by line into three-dimensional point cloud data, that is, the height information corresponding to each pixel position on the copper plate surface, ultimately forming complete three-dimensional undulation shape data.

[0021] When acquiring the encoder's position signal, the pixel rows of the 2D image and the height rows of the 3D point cloud are synchronized in time and space. Based on the distance the conveyor belt moves, the 2D image area acquired at the same time is bound to the 3D height data to ensure that the two correspond to the same physical position of the copper plate.

[0022] The process of obtaining a standard image is as follows: When extracting features from 3D undulation morphology data, a sub-region of the 2D image, such as a 128×128 pixel block, is used as a unit. The height value of the corresponding region in the 3D undulation morphology data is used to calculate the average undulation amplitude of the sub-region, which is the difference between the maximum and minimum heights within the region, and the undulation frequency, which is the number of height changes per unit length. For example, if the 3D data of a sub-region shows a height difference of 0.5mm, it is considered a large undulation region and is marked as a high undulation region; if the height difference is only 0.05mm, it is marked as a low undulation region.

[0023] Dynamic matching of structural element dimensions: Using the 3D data corresponding to a 2D sub-region of 128×128 pixels as the unit, the difference between the maximum and minimum height within the region is calculated, i.e., the average undulation amplitude. Regions with a height difference of 0.5mm are defined as high undulation regions; regions with a height difference of only 0.05mm are defined as low undulation regions. For high undulation regions, the size of the structural element is increased, such as from 5×5 pixels to 11×11 pixels, because the surface of this region is significantly uneven, and a larger structural element can avoid excessive erosion of the effective texture by the top-hat transformation, while also covering the shadow range caused by the undulation. For low undulation regions, the size of the structural element is reduced, such as to 3×3 pixels. The surface of this region is relatively flat, and a smaller structural element can accurately remove small shadows and noise, while preserving the outline of subtle defects. For medium undulation regions, a 7×7 pixel size is used.

[0024] Perform top-hat transformation on a region-by-region basis: By calling the matching structuring element to perform an opening operation on each sub-region of the 2D image, the erosion process eliminates small bright spots such as undulating shadows in the sub-region, and the dilation process restores the normal texture contours in the region; the top-hat transformation output of the region is obtained by calculating the 2D sub-region and the opening operation result, highlighting the bright features of potential defects; the top-hat transformation results of all sub-regions are stitched together to form a complete image.

[0025] Standard image generation and post-processing: After completing the top-hat transformation of the different regions, the stitched image is processed; preliminary gray-level normalization is performed to map the gray-level values ​​of the stitched image to the standard range of 0 to 255, eliminating the brightness differences between different regions; median filtering is used to remove isolated noise points left by the top-hat transformation, while preserving the edge contours of the defects; the output image is the standard image, which eliminates the surface shadow interference caused by three-dimensional undulations while fully preserving the defect features of the copper plate surface.

[0026] The defect segmentation module, based on three-dimensional undulation morphology data, performs grayscale processing on the light reflection differences in different areas of the copper plate surface to obtain grayscale values, maps the grayscale values ​​of different areas to a unified standard range, and uses 3D feature enhancement and dynamic threshold segmentation strategies to extract defect images from the standard image. The specific process of mapping grayscale values ​​from different regions to a unified standard range is as follows: The unevenness of the copper plate surface alters the propagation path of incident light and the scattering direction of reflected light: when light shines on the raised areas of the copper plate, the light is mostly reflected in the form of specular reflection, easily forming bright highlight areas, which are reflected in the 2D image as areas with high grayscale values; while when light shines on the recessed areas, some light is blocked by the surrounding raised structures and cannot be smoothly reflected into the lens of the image acquisition camera, thus forming shadow areas with low brightness, corresponding to areas with low grayscale values ​​in the 2D image. Statistical analysis and model training are performed on a large amount of standard sample data beforehand. During the training process, copper plate sample data with different degrees of undulation are selected, and their three-dimensional undulation morphology data and corresponding 2D images are collected. The variation law of grayscale values ​​on the copper plate surface under different undulation amplitudes is analyzed one by one. Through fitting and optimization of the copper plate sample data, a correlation model between three-dimensional undulation and light reflection is established. Based on the three-dimensional undulation characteristics of any region, the approximate range of grayscale value deviation in that region can be accurately determined.

[0027] Simultaneous extraction of grayscale and fluctuation features by region: The surface of a copper plate has different degrees of undulation, and the corresponding light reflection is also different. It is difficult to guarantee the normalization effect of each region by using a globally uniform processing method. Therefore, the 2D image and the corresponding 3D undulation morphology data are synchronously divided into multiple sub-regions of equal size according to the same division rules, so that the processing parameters in each sub-region can match its own undulation and reflection characteristics.

[0028] Targeted grayscale deviation correction based on fluctuation characteristics: After feature extraction, based on the pre-established 3D undulation and light reflection correlation model, and combined with the undulation features of each sub-region, targeted grayscale deviation correction is performed on the corresponding 2D sub-region. The correction process adopts differentiated adjustment strategies according to the different undulation types of the sub-region to ensure the accuracy of the correction. For sub-regions identified as raised highlight areas, that is, areas with a large height standard deviation and an average height that is significantly higher than the average height of the entire copper plate surface, the grayscale deviation caused by the highlight effect in this area is calculated according to the correlation model. Based on this deviation, the original grayscale value of each pixel in the sub-region is adjusted accordingly to reduce the brightness of the highlight area and restore the normal texture grayscale information of the area. For sub-regions identified as recessed shadow areas, i.e., areas with a large height standard deviation and an average height significantly lower than the average height of the entire copper plate surface, the grayscale level of the area caused by shadow occlusion is calculated using an association model. Based on the level of grayscale, the original grayscale values ​​of all pixels in the sub-region are adjusted accordingly to compensate for the insufficient brightness of the shadow area and bring the grayscale of the area closer to the normal level. For sub-regions identified as flat areas, i.e. areas with small height standard deviation and gentle surface undulations, the light reflection is relatively uniform and the grayscale deviation is small; the grayscale value of this area is slightly adjusted to preserve the original texture details within the area while ensuring grayscale uniformity.

[0029] Global grayscale unified mapping and optimization: By performing grayscale statistics on the entire 2D image after deviation correction, the maximum and minimum grayscale values ​​of the entire image are identified. Using the maximum and minimum grayscale values ​​as references, the corrected grayscale values ​​of all pixels are uniformly mapped to a standard grayscale range commonly used in the industry. The standard range is usually selected from 0 to 255, which can fully preserve the grayscale details of the image. During the mapping process, the grayscale values ​​of each pixel are uniformly scaled according to the relative position of the corrected grayscale values ​​to ensure that the adjusted grayscale values ​​can accurately reflect the relative differences of the original corrected grayscale values. After the mapping is completed, boundary truncation is performed to adjust the grayscale values ​​of pixels whose grayscale values ​​exceed the standard range due to calculation errors to the boundary values ​​of the range, so that the grayscale values ​​of the entire image are all within the standard range. The result is a standardized image with uniform grayscale and a unified benchmark.

[0030] The process of extracting defect images from standard images is as follows: 3D feature enhancement utilizes three-dimensional undulating morphology data to amplify the grayscale and texture differences between defective and normal areas in a standard image, making the blurred defect outline clearer. Filtering and mapping of three-dimensional defect features: From the three-dimensional undulation morphology data and 2D images of copper plates, three-dimensional features strongly correlated with defects are extracted, including local height abrupt change value, surface roughness, and slope change rate; local height abrupt change value, that is, the height difference between the defect area and the surrounding normal area; surface roughness, that is, the density of concavity and convexity in the defect area; slope change rate, that is, the slope of the height change of the defect edge; and a correlation matrix between two-dimensional pixels and three-dimensional defect features is established by mapping the spatial location to each pixel point of the standard image. Regional feature weighting enhancement: For different sub-regions of the standard image, weighted enhancement processing is performed based on the corresponding three-dimensional feature values. For regions with obvious height abrupt changes, such as raised defects and indented scratches, the gray-level contrast of the region in the standard image is amplified according to the height abrupt change value, making the gray-level jump at the defect edge more obvious. For areas with high roughness, such as pits and corrosion pits, Gaussian difference filtering is used to enhance texture details, and the distinction between defect textures and normal copper plate textures is enhanced by combining three-dimensional roughness data; for normal areas with gentle slope changes, the original gray level is maintained to avoid excessive enhancement that would amplify noise. After weighted enhancement, defective areas in the standard image will form obvious visual highlights or texture abnormalities, while normal areas will maintain a uniform and stable grayscale distribution.

[0031] Threshold segmentation and defect region extraction: The enhanced image is segmented pixel by pixel using a dynamic threshold distribution map to accurately extract defect areas. The gray value of each pixel in the enhanced image is compared with the threshold at the corresponding position in the dynamic threshold distribution map. If the pixel gray value is higher than the upper threshold, such as the bright area of ​​a protruding defect, or lower than the lower threshold, such as the dark area of ​​a concave defect, it is determined to be a defect pixel. If the pixel gray value is within the threshold range, it is determined to be a normal pixel. After segmentation, a small number of isolated noise points and holes in the defect area are optimized through morphological operations. First, erosion operation is used to eliminate small noise points and remove burrs from the defect edges. Then, dilation operation is used to restore the true shape of the defect area and fill the holes. Through connected component analysis, connected regions with an area greater than a set threshold are selected, and tiny noise connected regions are filtered out to obtain a complete defect outline. The finally determined defect area is extracted from the enhanced image to generate a binary defect image. The defect area is white and the background is black, while retaining the spatial coordinates, area, shape and other feature information of the defect area.

[0032] The feature fusion and recognition module extracts geometric and texture features from 3D undulation morphology data and 2D images, and splices them with the defect image to form an initial feature vector. The PCA algorithm is used to reduce the dimensionality of the initial feature vector. The initial feature vector with high contribution to defect classification is selected by variance analysis. The high contribution features are weighted based on the feature attention mechanism, and a multi-label classification structure is used to determine the defect type and degree. The specific process of extracting geometric and texture features from 3D undulation morphology data and 2D images: The point cloud data in the original 3D undulating morphology data is preprocessed to eliminate noise interference during the acquisition process. A statistical filtering algorithm is used to calculate the mean and standard deviation of the height of each point and its neighboring points. Points that deviate from the mean by more than 3 times the standard deviation are identified as outliers, such as false high points caused by laser scattering, and are removed. The filtered point cloud is then subjected to moving least squares smoothing to eliminate high-frequency small noise while preserving the surface undulation trend, so that the height changes of the laser-scanned point cloud closely match the actual surface morphology of the copper plate. The entire point cloud is divided into regular sub-regions of a fixed size, such as 64×64 pixels. All subsequent feature extraction is performed on a sub-region basis to ensure the local targeting of features. Geometric features reflect the macroscopic spatial shape and undulation trend of the copper plate surface, including the magnitude, direction, and curvature of height changes. Height statistical features are obtained by calculating the average height of each sub-region to reflect the overall height position of that region on the copper plate surface; the height range is calculated, which is the difference between the maximum and minimum heights within a region, to measure the overall undulation of that region; the height standard deviation is calculated to characterize the dispersion of the height distribution within a region. The larger the standard deviation, the more uneven the surface. Slope and aspect characteristics are determined by fitting a plane to the neighborhood points of each point, calculating the angle between the fitted plane and the horizontal plane, and statistically analyzing the average and maximum slope within the sub-region to reflect the severity of surface tilt. For example, the slope of scratches and raised edges will be significantly higher than that of normal areas. The normal direction of the fitted plane is calculated to determine the dominant direction of surface height change, i.e., the aspect, which is used to distinguish linear defects, such as the extension direction of scratches. Curvature characteristics are achieved by calculating the Gaussian curvature and mean curvature at each point: Gaussian curvature reflects the degree of curvature of the surface, with positive curvature in convex areas, negative curvature in concave areas, and near zero curvature in flat areas; mean curvature reflects the strength of surface unevenness; the mean and extreme values ​​of curvature within statistical sub-regions are used to identify local convex defects, such as copper nodules on copper plates, and concave defects, such as pits.

[0033] Texture feature extraction: The height values ​​within a sub-region are mapped to a grayscale image, with higher heights resulting in larger grayscale values. This transforms the height distribution of the 3D point cloud into a 2D texture image, facilitating the use of image texture analysis algorithms. The gray-level co-occurrence matrix of the texture image is calculated, and contrast, energy, entropy, and correlation are extracted. Contrast reflects the clarity of the texture; the contrast of defective areas is significantly higher than that of normal areas. Energy reflects the uniformity of the texture; normal copper plate surfaces have high energy values, while defective areas have low energy values. Entropy reflects the complexity of the texture; defective areas such as pits and corrosion pits have significantly higher entropy values. Correlation reflects the directional consistency of the texture; the correlation of linear scratch areas exhibits a clear directionality. The fractal dimension of the sub-region surface is calculated to characterize the surface roughness. The fractal dimension of a normal copper plate surface is stable within a fixed range, while the fractal dimension of defective areas, such as corrosion and wear, deviates from this range.

[0034] After extracting geometric and texture features, fusion optimization is performed to remove redundant features; all feature values ​​are mapped to the range of 0 to 1 to eliminate the influence of differences in the dimensions of different features; the correlation coefficient between features is calculated, and highly correlated redundant features are removed, such as height range and height standard deviation, which are highly correlated. The discrimination degree of each feature against defective and normal areas is calculated through analysis of variance. Based on the preset discrimination degree threshold, features with high discrimination degree are retained, and finally a three-dimensional feature set containing geometric and texture dimensions is formed.

[0035] The process of obtaining the initial feature vector is as follows: Three-dimensional geometric and texture features are normalized. Due to the significant differences in the dimensions and numerical ranges of different features (e.g., height range is measured in millimeters, and entropy is dimensionless and less than 10), all three-dimensional feature values ​​need to be uniformly mapped to the 0-1 range to eliminate dimensional interference. Specifically, a linear normalization method is used, converting each feature value into a relative proportion value through the global maximum and minimum values. For the binary defect image obtained after dynamic thresholding, quantitative features characterizing the two-dimensional morphology of the defect are extracted, including area, shape, and grayscale features. The area feature is the total number of pixels in the defect area, reflecting the size of the defect. The shape features include the aspect ratio and roundness to distinguish between long scratches and circular pits, and boundary complexity to measure the irregularity of the defect edges. The grayscale features are the average grayscale of the defect area in the standard image, and the grayscale variance to reflect the grayscale uniformity within the defect. Based on the spatial coordinates of the defect area, the correspondence between the three-dimensional features and the defect image features is realized. The three-dimensional feature extraction is carried out on a sub-region basis. After the defect image is segmented, the spatial position of each defect is also recorded, such as the row and column number of the sub-region. Based on the position information, the three-dimensional geometric texture features of the sub-region where the defect is located are selected so that the spliced ​​feature data all belong to the same defect target and cross-region feature mismatch is avoided. After normalization and alignment, the data corresponding to a single group of defects are stitched together in a preset order. First, all the three-dimensional normalized feature values ​​of the region where the defect is located are added to form a continuous three-dimensional feature sub-vector. Then, the two-dimensional shape and gray-level normalized feature values ​​of the defect are stitched together to form a two-dimensional defect feature sub-vector. The two sub-vectors are joined end to end to form a one-dimensional initial feature vector. For example, if the three-dimensional features have a total of 14 dimensions and the two-dimensional defect features have a total of 5 dimensions, then the initial feature vector after stitching has a dimension of 19 dimensions. For all defects detected in a copper plate image, the above steps are repeated to generate a corresponding initial feature vector for each defect.

[0036] The process of selecting features that contribute highly to defect classification is as follows: The initial feature vector is a matrix composed of feature vectors from multiple defect samples. For each column of features in the matrix, i.e., a certain type of feature, such as average height, defect area, etc., the mean of all samples is calculated. Then, the mean is subtracted from the feature value of each sample to make the mean of each column of features become 0. For the centered feature matrix X, its covariance matrix C is calculated. If the covariance value is close to 0, it indicates that the two features are linearly independent; if the absolute value is large, it indicates that the two features are linearly correlated and there is redundant information.

[0037] Feature dimensionality reduction of the PCA algorithm: The covariance matrix C is decomposed into eigenvalues ​​and corresponding eigenvectors. The magnitude of the eigenvalue represents the variance along the direction of the corresponding eigenvector. The larger the variance, the more difference information the feature along that direction can reflect. All eigenvalues ​​are sorted in descending order, and the corresponding eigenvectors are also arranged in the same order to form an ordered combination of eigenvalues ​​and eigenvectors. The cumulative contribution rate of all eigenvalues ​​is calculated, and a threshold for the cumulative contribution rate is set, such as 85% to 95%. The eigenvectors corresponding to the first k eigenvalues ​​are selected to form the principal component projection matrix P. The centered initial feature matrix X is multiplied by the projection matrix P to obtain the dimensionality-reduced feature matrix. The dimension of the initial feature vector is compressed from n dimensions to k dimensions, while retaining the main difference information of the samples and eliminating redundancy between features. The k-dimensional features after dimensionality reduction still need further screening to remove features that have no significant effect on defect classification. The dimensionality-reduced feature matrix is ​​then associated with the corresponding defect category labels, such as scratches, dents, pits, and normal areas. The samples are grouped according to defect categories, and the between-group variance and within-group variance are calculated separately. The between-group variance is the sum of squares of the differences in the feature means between different defect category groups, reflecting the feature's ability to distinguish between different categories of defects. The within-group variance is the sum of squares of the differences in the feature values ​​of samples within the same defect category group, reflecting the stability of the feature among similar defects. For each feature after dimensionality reduction, calculate its F-statistic. The F-value = between-group variance / within-group variance. The larger the F-value, the more significant the difference between different defect categories and the higher the contribution to defect classification. Conversely, the lower the F-value, the lower the contribution and the more invalid the feature. Set a statistical threshold for the F-value, retain features with F-values ​​higher than the threshold, and remove features with F-values ​​lower than the threshold. Sort the features selected by variance analysis in descending order of F-value to form features with high contribution to defect classification.

[0038] Weighting features with high contribution: When allocating weights for the feature attention mechanism, the selected high-contribution feature set is input into the attention network. First, the features are mapped to the attention feature space through a fully connected layer to generate an attention feature vector with the same dimension as the original features. At the same time, the attention weight parameters are initialized, and all features are given the same initial weight. Based on the category labels of defect samples, such as scratches, dents, and pits, and the severity labels, such as mild, moderate, and severe, an attention loss function is constructed. For features that differ significantly between different defect categories or severity levels, such as the defect area in relation to severity, their attention weights are increased. For features with slight differences between different categories or degrees, such as the distinction between surface roughness and fine scratches, their attention weight is reduced; the attention weight parameters are iteratively optimized through backpropagation until the loss function converges, and the final attention weight of each high-contribution feature is obtained; the value of each high-contribution feature is multiplied by the corresponding attention weight to obtain the weighted feature value, and then all weighted feature values ​​are combined in the original order to form the attention-weighted feature vector.

[0039] The process of determining the type and severity of defects is as follows: The defect type label branch includes all possible defect categories, such as {scratches, dents, pits, corrosion, bulges}, which is a multi-class classification task. The defect severity label branch includes the severity level of the defect, such as {mild, moderate, severe}, which is also a multi-class classification task. Each defect sample corresponds to a set of type and severity label combinations, such as mild scratches and severe dents. A multi-label classification network based on fully connected layers is constructed. The network structure is divided into a shared feature layer and independent classification branches. Shared feature layer: The attention-weighted feature vector is input into this layer, and feature depth extraction is performed through 2 to 3 fully connected layers to generate a shared feature representation that contains both type and severity information. Type classification branch: Through fully connected layers and the Softmax activation function, the output probability distribution of the sample belonging to each defect type is obtained. Severity classification branch: Through fully connected layers and the Softmax activation function, the output probability distribution of the sample belonging to each severity level is obtained.

[0040] The construction of the multi-label loss function and model training are carried out by defining loss functions for the two classification branches respectively, and then summing the losses of the two branches with weights to obtain the total multi-label loss function. The entire network is trained using the labeled defect sample dataset, with attention-weighted feature vectors as input, and the outputs the probability distribution of defect type and probability distribution of defect degree. The total multi-label loss function is minimized, and the network parameters are updated through backpropagation until the model converges. After the model is trained, new copper plate defect samples are judged. The attention-weighted feature vector of the sample to be judged is input into the multi-label classification network. The category corresponding to the maximum probability of the output probability distribution of the type classification branch is selected as the defect type of the sample. The level corresponding to the maximum probability of the output probability distribution of the degree classification branch is selected as the degree of defect of the sample. The final defect type and degree are judged by combining the output results of the two branches, such as moderate pitting defect and severe scratch defect. The confidence level of each judgment result is also output.

[0041] Example 2 Please see Figure 2 Based on Example 1, this embodiment also provides a method for detecting defects in electrolytic copper plates based on computer vision technology, including the following specific steps: Step 1: Obtain the three-dimensional undulation morphology data and 2D image of the copper plate. Using the top-hat transformation algorithm, dynamically adjust the size of the structural elements in the 2D image based on the three-dimensional undulation morphology data to obtain the standard image. Step 2: Based on the three-dimensional undulation morphology data, grayscale processing is performed on the light reflection differences in different areas of the copper plate surface to obtain grayscale values. The grayscale values ​​of different areas are mapped to a unified standard range. A 3D feature enhancement and dynamic threshold segmentation strategy is adopted to extract defect images from the standard image. Step 3: Extract geometric and texture features from the 3D undulation morphology data and 2D images, and stitch them with the defect image to form an initial feature vector. Use the PCA algorithm to reduce the dimensionality of the initial feature vector. Use variance analysis to select features that contribute highly to defect classification from the reduced initial feature vector. Use the feature attention mechanism to assign weights to the high-contribution features, and use a multi-label classification structure to determine the defect type and degree.

[0042] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0043] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0044] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A defect detection system for electrolytic copper plates based on computer vision technology, characterized in that, The system includes: an adaptive image acquisition module, which acquires three-dimensional undulation morphology data and 2D images of a copper plate; and a top-hat transformation algorithm, which dynamically adjusts the size of structural elements in the 2D image based on the three-dimensional undulation morphology data to obtain a standard image. The defect segmentation module, based on three-dimensional undulation morphology data, performs grayscale processing on the light reflection differences in different areas of the copper plate surface to obtain grayscale values, maps the grayscale values ​​of different areas to a unified standard range, and uses 3D feature enhancement and dynamic threshold segmentation strategies to extract defect images from the standard image. The feature fusion and recognition module extracts geometric and texture features from 3D undulation morphology data and 2D images, and splices them with the defect image to form an initial feature vector. The PCA algorithm is used to reduce the dimensionality of the initial feature vector. The initial feature vector with high contribution to defect classification is selected by variance analysis. The high contribution features are weighted based on the feature attention mechanism, and a multi-label classification structure is used to determine the defect type and degree.

2. The electrolytic copper plate defect detection system based on computer vision technology according to claim 1, characterized in that, When acquiring 2D images, the surface of the copper plate is photographed line by line at a fixed frequency that matches the speed of the conveyor belt, and then stitched together to form a complete 2D image. When acquiring the three-dimensional undulation morphology data of the copper plate, laser lines are continuously emitted onto the surface of the copper plate, and the distorted laser line images are captured in real time. Combining the pre-calibrated mapping relationship between the curvature of the laser lines and their height, the pixel coordinates of each laser line image are converted into the corresponding height value. At the same time, the encoder records the moving distance of the copper plate and stitches the height values ​​of each row into three-dimensional undulation morphology data.

3. The electrolytic copper plate defect detection system based on computer vision technology according to claim 2, characterized in that, The process of acquiring a standard image is as follows: When extracting features from three-dimensional undulation morphology data, pixel blocks of 2D images are used as 2D sub-regions, corresponding to the height values ​​of the same region in the three-dimensional undulation morphology data, and the average undulation amplitude and undulation frequency of the sub-region are calculated. The average fluctuation amplitude within a 2D sub-region is used as the criterion for determining low-fluidity, medium-fluidity, and high-fluidity regions. The size of structural elements in the 2D image is dynamically adjusted based on the determination results. The opening operation is performed by calling the structuring element of the 2D sub-region matching, and the opening operation result of the 2D sub-region is calculated by the top-hat transform algorithm to obtain the top-hat transform output of the region. The top-hat transform results of all 2D sub-regions are stitched together to form a complete image, and the complete image is subjected to preliminary grayscale normalization and isolated noise point removal to output a standard image.

4. The electrolytic copper plate defect detection system based on computer vision technology according to claim 3, characterized in that, The process of mapping grayscale values ​​from different regions to a unified standard range is as follows: Copper plate sample data with different degrees of undulation were pre-selected, and their three-dimensional undulation morphology data and corresponding 2D images were collected respectively. The variation law of gray value of copper plate surface under different degrees of undulation was analyzed one by one. By fitting and optimizing the copper plate sample data, a correlation model between three-dimensional undulation morphology data and light reflection was established. At the same time, the 2D image and the corresponding three-dimensional undulation morphology data were divided into multiple sub-regions of equal size, so that the processing parameters in each sub-region matched its own degree of undulation and reflection characteristics. Based on the pre-established three-dimensional undulation morphology data and the light reflection correlation model, combined with the undulation characteristics of each sub-region, grayscale deviation correction is performed on the corresponding 2D sub-region. The correction process is adjusted differently according to the different undulation characteristics of the sub-region.

5. The electrolytic copper plate defect detection system based on computer vision technology according to claim 4, characterized in that, The process of extracting defect images from standard images is as follows: Based on 3D undulation morphology data and 2D images, the extracted 3D features include local height abrupt change values, surface roughness, and slope change rate. By mapping the spatial location to each pixel of the standard image, a correlation matrix between 2D pixels and 3D features is established. For different sub-regions of the standard image, 3D feature enhancement processing is performed according to the corresponding 3D features. The standard image after 3D feature enhancement is segmented pixel by pixel using a dynamic threshold distribution map to extract defect regions and generate a binarized defect image.

6. The electrolytic copper plate defect detection system based on computer vision technology according to claim 5, characterized in that, The process of obtaining the initial feature vector is as follows: Based on 3D undulation morphology data and 2D images, geometric features and texture features are extracted respectively. Geometric features include calculating the average height, slope and aspect features, and curvature features of 2D sub-regions. Texture features include grayscale mapping, grayscale co-occurrence matrix features, and fractal dimension features; All feature values ​​are mapped to the range of 0 to 1. The correlation coefficient between all features is calculated. The discrimination of each feature between defective and normal areas is calculated through analysis of variance. Features with high discrimination are retained. The normalized and aligned single-group defect data are stitched together in a preset order. For all defects detected in a copper plate image, a corresponding initial feature vector is generated for each defect.

7. The electrolytic copper plate defect detection system based on computer vision technology according to claim 6, characterized in that, The process of selecting features that contribute highly to defect classification is as follows: The initial feature vector after dimensionality reduction is associated with the corresponding defect category label. The copper plate sample data is grouped according to the defect category, and the variance between groups and within groups are calculated respectively. For each feature of the initial feature vector after dimensionality reduction, its statistic is calculated, a statistical threshold is set, and features higher than the statistical threshold are retained. The features filtered by variance analysis are sorted from largest to smallest to form features that contribute highly to defect classification.

8. The electrolytic copper plate defect detection system based on computer vision technology according to claim 1, characterized in that, The process of determining the type and severity of defects is as follows: The selected high-contribution features are input into the attention network, and the high-contribution features are mapped to the attention feature space through a fully connected layer to generate attention feature vectors. The attention weight parameters are initialized and assigned the same initial weights. The category and severity labels of defective samples are obtained in advance. An attention loss function is constructed. The value of each high-contribution feature is multiplied by the corresponding attention weight parameter to obtain the weighted feature value. All weighted feature values ​​are combined in their original order to form an attention-weighted feature vector. A multi-label classification network is constructed based on a fully connected layer. The multi-label classification network structure is divided into a shared feature layer and an independent classification branch, and a loss function is defined for each. The loss functions of the shared feature layer and the independent classification branch are then weighted and summed to obtain the total multi-label loss function. The entire network is trained using labeled defect samples. The attention-weighted feature vector is used as input, and the probability distributions of defect type and defect severity are output. The total multi-label loss function is minimized, and the network parameters are updated through backpropagation until the model converges. After the model is trained, new copper plate defect samples are judged. The attention-weighted feature vector of the sample to be judged is input into the multi-label classification network. The probability distribution of the type classification branch is output, and the category corresponding to the maximum probability is selected as the defect type of the sample. The probability distribution of the degree classification branch is output, and the level corresponding to the maximum probability is selected as the defect degree of the sample. The defect type and degree are judged by combining the output results of the two branches.

9. A method for detecting defects in electrolytic copper plates based on computer vision technology, characterized in that, Includes the following steps: Step 1: Obtain the three-dimensional undulation morphology data and 2D image of the copper plate. Using the top-hat transformation algorithm, dynamically adjust the size of the structural elements in the 2D image based on the three-dimensional undulation morphology data to obtain the standard image. Step 2: Based on the three-dimensional undulation morphology data, grayscale processing is performed on the light reflection differences in different areas of the copper plate surface to obtain grayscale values. The grayscale values ​​of different areas are mapped to a unified standard range. A 3D feature enhancement and dynamic threshold segmentation strategy is adopted to extract defect images from the standard image. Step 3: Extract geometric and texture features from the 3D undulation morphology data and 2D images, and stitch them with the defect image to form an initial feature vector. Use the PCA algorithm to reduce the dimensionality of the initial feature vector. Use variance analysis to select features that contribute highly to defect classification from the reduced initial feature vector. Use the feature attention mechanism to assign weights to the high-contribution features, and use a multi-label classification structure to determine the defect type and degree.

Citation Information

Patent Citations

  • Copper sheet and strip surface defect detection method based on-line sequential extreme learning machine

    CN103593670A

  • Self-adaptive top hat transformation method based on Otsu-SSIM

    CN110942437A

  • Copper strip surface defect detection method and system based on machine vision

    CN112304958A

  • Ball screw thread defect detection method and system integrated with computer vision

    CN118644470A

  • Bridge detection image recognition method and system based on artificial intelligence

    CN118823481A