A method and apparatus for detecting microscopic defects on the surface of electroplated aluminum
By using multi-polarization angle sequence image acquisition and texture encoding technology, the problem of false defect interference in the detection of electroplated aluminum surfaces has been solved, realizing efficient defect detection and process cause analysis, and improving the accuracy of the detection system and the process control capability of the production line.
Patent Information
- Application Number
- CN202611328518.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-17
AI Technical Summary
Existing electroplated aluminum surface inspection technology is prone to producing false defects under mirror high gloss, resulting in a high false alarm rate. Furthermore, it lacks the ability to correlate with production line process parameters in a timely manner, making it impossible to accurately determine the cause of defects and affecting quality improvement and process optimization.
The system employs multi-polarization angle sequence image acquisition, locates defect areas through specular-diffuse reflection separation, eliminates false defects by combining texture encoding, constructs a cause mapping and calibrates the confidence level, and finally outputs a defect detection report.
It effectively reduces the false alarm rate of specular high-gloss defects, enables accurate location and cause analysis of defects on the surface of electroplated aluminum, supports proactive predictive process control of the production line, and improves the accuracy and efficiency of detection.
Smart Images

Figure CN123118533A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial visual inspection technology, and in particular to a method and apparatus for detecting microscopic defects on the surface of electroplated aluminum. Background Technology
[0002] Electroplated aluminum hot stamping foil is a core decorative material in the high-end packaging and printing industry. Microscopic surface defects directly determine the optical effect and yield of the stamped product. Currently, quality control on production lines relies primarily on manual visual inspection. Inspectors examine foil rolls under a fixed light source, judging the severity of defects such as pinholes and scratches based on experience. Manual judgment lacks quantifiable records of defect size and morphology. Systematic defects of the same type recur between batches because their root cause cannot be traced back to the process, preventing a closed-loop quality improvement process.
[0003] Existing automated solutions often employ line-scan cameras to capture images of the foil surface under a single illumination angle and extract candidate defects using grayscale thresholding or edge detection. However, the rolling texture and specular reflection on the high-gloss surface of electroplated aluminum mirrors can create false defect signals similar to real defects under a single angle, resulting in a persistently high false alarm rate. More critically, existing solutions lack the ability to correlate defect morphology with real-time process parameters after defect detection, making it impossible to determine the root cause of pinhole-dense areas. Detection only identifies the defect location but not its cause, failing to provide quantitative basis for online optimization of process parameters. Summary of the Invention
[0004] This invention provides a method and apparatus for detecting microscopic defects on the surface of electroplated aluminum, aiming to solve the problems of interference from pseudo-defects in single-angle imaging of specular high gloss and the disconnect between defect detection and process. The method uses multi-polarization angle sequence images as input, locates defect areas through specular-diffuse reflection separation, uses texture encoding to eliminate rolling pseudo-jumps to form morphological classification, constructs a causal mapping through production line time-series matching and calibrates the confidence level, and finally outputs a defect detection report graded according to downstream tolerance, reducing the workload of manual re-inspection caused by specular high gloss pseudo-defects.
[0005] The first aspect of this invention provides a method for detecting microscopic defects on the surface of electroplated aluminum, comprising the following steps:
[0006] A polarization angle image of the electroplated aluminum surface is acquired, and a polarization distortion feature map and a substrate texture map are obtained by analyzing the specular highlight polarization distortion mode based on the polarization angle image.
[0007] Based on the base texture map, the depolarization ratio difference is calculated to obtain a polarization difference image. The polarization difference image is used to locate the abnormal depolarization ratio jump area to form a suspected defect location map. The suspected defect location map is cross-compared with the polarization distortion feature map to generate a polarization enhancement defect map.
[0008] Based on the polarization enhancement defect map, depth texture features are extracted to generate a depth texture code. The depth texture code is compared with the base texture map to exclude known foil textures and determine texture anomaly areas. From the texture anomaly areas, the isotropic properties of pinholes and the directionality of scratches are analyzed to form defect morphology classification.
[0009] Defect traceability records are obtained by matching the defect morphology classification with the production line process timestamp. Defect cause mapping is constructed by identifying density surge windows of the same type of defects from the defect traceability records. Calibrated defect classification is obtained by quantifying the cause confidence through the defect cause mapping and the defect morphology classification.
[0010] The defect tolerance boundary is obtained by matching the downstream tolerance based on the calibration defect classification. The defect confidence level is obtained by comparing the defect tolerance boundary with the calibration defect classification and comparing the classification threshold. The defect detection result is generated by performing confidence weighting classification based on the defect confidence level and the calibration defect classification.
[0011] A second aspect of the present invention provides a device for detecting microscopic defects on the surface of electroplated aluminum, comprising:
[0012] The polarization analysis unit is used to acquire polarization angle images of the electroplated aluminum surface, and to obtain polarization distortion feature maps and substrate texture maps by analyzing the specular highlight polarization distortion mode based on the polarization angle images.
[0013] The depolarization depolarization sub-unit is used to calculate the depolarization ratio difference based on the base texture map to obtain a polarization difference image, use the polarization difference image to locate the abnormal depolarization ratio jump area to form a suspected defect location map, and cross-compare the suspected defect location map with the polarization distortion feature map to generate a polarization enhancement defect map.
[0014] The texture exclusion unit is used to extract deep texture features based on the polarization enhancement defect map to generate a deep texture code, compare the deep texture code with the base texture map to exclude known foil textures and determine texture abnormal areas, and analyze the isotropic pinholes and the directionality of scratches from the texture abnormal areas to form a defect morphology classification.
[0015] The cause tracing unit is used to obtain defect tracing records by matching the defect morphology classification with the production line process timestamp, construct a defect cause mapping by identifying density surge windows of the same type of defect from the defect tracing records, and obtain a calibrated defect classification by quantifying the cause confidence through the defect cause mapping and the defect morphology classification.
[0016] The tolerance grading unit is used to obtain the defect tolerance boundary by matching the downstream tolerance according to the calibration defect classification, obtain the defect confidence level by comparing the defect tolerance boundary with the calibration defect classification grading threshold, and generate the defect detection result by performing confidence weighted grading based on the defect confidence level and the calibration defect classification.
[0017] The beneficial effects of this invention are reflected in the following points: 1. This method does not rely on grayscale threshold segmentation under a single illumination angle, but utilizes the difference in polarization response between specular reflection and diffuse reflection components in multi-polarization angle sequence imaging to separate the inherent rolling texture reflection of the foil from the polarization distortion caused by real defects at the physical optics level. This eliminates the systematic false alarms caused by the similarity between texture reflection and defect morphology in traditional single-angle imaging of specular high-gloss surfaces. This allows the detection system to maintain high sensitivity to micron-level real defects while reducing false alarms caused by rolling textures to a level close to the predictable background fluctuation of the texture period. 2. The depth texture encoding of the defect micromorphology and the periodic benchmark of the foil rolling texture play a complementary role in anomaly determination in this method. The two achieve automatic arbitration of true and false defects through quantitative comparison of the length of texture period interruption. This bypasses the cumbersome process of manually labeling each false defect of the rolling texture as a training negative sample in the traditional scheme. This allows different types and texture specifications of electroplated aluminum foil to be quickly adapted to the detection model without re-collecting a large amount of labeled data when introducing new products. 3. This method performs cross-modal causal correlation analysis between the polarization-texture composite morphology classification results of defects and the real-time time-series records of production line process parameters. This upgrades the output of surface inspection from an isolated list of defect location coordinates to a structured quality data package carrying process cause confidence and downstream tolerance classification information. This allows the production line quality management system to use the data package to automatically complete the grade classification of foil rolls, process cause statistics of defect causes, and online drift warning of key process parameters. As a result, the quality control mode is upgraded from passive post-event sampling inspection to proactive predictive process control based on full roll data. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a method for detecting microscopic defects on the surface of electroplated aluminum according to the present invention.
[0019] Figure 2 This is a schematic diagram illustrating the elimination of rolling texture deflection ratio, background fluctuation, and actual defect jumps in the present invention.
[0020] Figure 3 This is a structural block diagram of a device for detecting microscopic defects on the surface of electroplated aluminum according to the present invention.
[0021] Wherein: 1-Foil direction axis; 2-De-bias ratio difference curve; 3-Texture background fluctuation envelope; 4-Baseline mean value; 5-Baseline anomaly threshold line; 6-Texture pseudo-jump region; 7-True defect jump region; 8-Spatial gradient indicator arrow; 9-Connected domain merging boundary; 10-Foil pattern phase-locked cycle marker. Detailed Implementation
[0022] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0023] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0024] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0025] The technical solutions of the embodiments of this application will be described below.
[0026] like Figure 1 As shown, this embodiment of the invention provides a method for detecting microscopic defects on the surface of electroplated aluminum, including the following steps S101-S105:
[0027] Step S101: Acquire polarization angle images of the electroplated aluminum surface, and obtain polarization distortion feature maps and substrate texture maps by analyzing the specular highlight polarization distortion mode based on the polarization angle images.
[0028] Specifically, polarization angle images of the electroplated aluminum surface are acquired. The electroplated aluminum foil roll is pulled through the inspection station at a constant linear speed via a tension control system. The consistency of the observation angles on the electroplated aluminum surface is ensured by a high-resolution industrial camera equipped with a motorized rotating polarizer mounted directly above it, with the camera's optical axis perpendicular to the foil surface. Driven by a stepper motor, the polarizer rotates 45° at a time, sequentially switching to four polarization acquisition angles: 0°, 45°, 90°, and 135°. After each angle switch, the camera triggers an exposure to acquire one frame. All four frames are acquired within 200 milliseconds, ensuring that the foil's displacement between the four frames does not exceed the physical size of one pixel, thus eliminating inter-frame registration errors. Each pixel in a single frame image records the reflected light intensity value I_θ at the corresponding polarization angle, where θ takes values of 0°, 45°, 90°, and 135°. After pixel-by-pixel spatial alignment of the four frames, a four-dimensional polarization response vector is formed for each pixel position in the polarization angle image. The four frames represent independent sampling values of the same pixel position at different polarization angles, without averaging or fusion. The image acquisition area covers the entire width of the electroplated aluminum surface and is continuously acquired along its length. The acquisition period is 200 milliseconds for four frames. The foil displacement within the interval between adjacent acquisition periods is the linear velocity multiplied by 0.2 seconds, thus determining the sampling interval along the foil movement direction. The specular highlight area on the electroplated aluminum surface exhibits a regular cosine-square modulation of reflected light intensity as the polarization angle changes. However, microscopic defects such as pinholes and scratches disrupt this regular modulation due to local abrupt changes in the surface normal; this deviation is the specular highlight polarization distortion mode. Each pixel in the polarization angle image is associated with reflected light intensity values at four polarization angles: two dimensions represent the foil plane coordinates, and the third dimension represents the polarization angle. The polarization angle image undergoes no smoothing or noise reduction preprocessing; the original readings in all four directions are fully preserved.
[0029] Polarization distortion feature maps and substrate texture maps are obtained by analyzing the specular highlight polarization distortion mode of the polarization angle image. Stokes parameter decomposition and specular-diffuse reflection separation are performed simultaneously on the four-dimensional polarization response vector of each pixel in the polarization angle image, both using the four-dimensional response vector of the polarization angle image as common input. The Stokes branch extracts two components, S1 and S2, from the polarization angle image. S1 = I_0 - I_90 represents the difference in linear polarization intensity between 0° and 90°, and S2 = I_45 - I_135 represents the difference in linear polarization intensity between 45° and 135°. The two-dimensional vector composed of S1 and S2 for each pixel is compared to the local mean vector of its 9×9 pixel neighborhood window. The Mahalanobis distance, calculated using the local covariance matrix of the window, is used as the polarization distortion intensity of that pixel. Simultaneously, the component deviation values of that pixel relative to the local mean at the four polarization angles are retained as auxiliary fields for angle-based retrieval of the polarization distortion feature map. On the surface of intact foil, S1 and S2 change synchronously and gradually, with a smooth distance change; the sharp peak of S2 at the edge of the pinhole causes a sharp increase in the Mahalanobis distance, thus effectively separating the pinhole. The polarization distortion feature map is constructed by filling each pixel with a comprehensive value and the angle-based field. The specular-diffuse branch fits the four-dimensional polarization response vector to a cosine square function using least squares. The fitted offset term is the estimated value of the diffuse reflection component. This estimated value is then used to fill all pixels in the image to form the base texture map. The base texture map and the polarization distortion feature map together constitute the two outputs of this step. If a pixel with high distortion in the polarization distortion feature map corresponds to a pixel in the base texture map that is also located at the edge of a texture stripe transition, this distortion is more likely due to edge polarization aliasing rather than a real defect. Such pixels have their weight reduced in the polarization distortion feature map to avoid misjudging them as defect jumps.
[0030] Step S102: Calculate the depolarization ratio difference based on the substrate texture map to obtain a polarization difference image. Use the polarization difference image to locate the abnormal depolarization ratio jump area to form a suspected defect location map. Cross-compare the suspected defect location map with the polarization distortion feature map to generate a polarization enhancement defect map.
[0031] Specifically, a polarization difference image is obtained by calculating the depolarization ratio difference based on the substrate texture map. The diffuse reflection component value of each pixel in the substrate texture map is compared with the original reflected light intensity of the same pixel in the four polarization directions in the polarization angle image. The ratio of the reflected light intensity to the diffuse reflection component of that pixel in each direction is then subtracted by one to obtain the ratio of specular reflection to diffuse reflection in that direction, i.e., the depolarization ratio D_i. A D_i value is generated for each of the four directions, forming a four-channel depolarization ratio vector for that pixel. This vector uses the diffuse reflection component of the substrate texture map as the calculation reference. The polarization difference image is a single-channel image composed of the difference between the maximum and minimum depolarization ratios in the four polarization directions, i.e., ΔD = max(D_i) - min(D_i). A ΔD of zero indicates that the polarization characteristics of the reflected light in the four directions are completely consistent. The larger the ΔD, the more significant the microscopic anomaly in the deviation from the substrate at that location. Figure 2 As shown, the depolarization ratio difference curve (2) unfolds along the foil direction axis (1): the transition edge area of the periodic brightness alternating stripes of the rolling texture in the base texture map generates a natural base ΔD texture background fluctuation envelope (3) in the single-channel ΔD image of the polarization difference image. This fluctuation is phase-locked with the foil texture phase-locked period mark (10). Even if the amplitude of individual fluctuations exceeds the background anomaly threshold line (5), as long as the slope remains consistent with the texture background envelope (3) and changes gradually, this area is still judged as a texture pseudo-jump area (6). The ΔD of the real defect jump area (7) shows a jump change that is completely different from the envelope (3). The slope indicated by the spatial gradient indicator arrow (8) is significantly higher. The slope, rather than the amplitude, is the basis for distinguishing (6) from (7). The ΔD of the uniform region of the foil material approximately follows a Gaussian distribution with mean μ_bg and standard deviation σ_bg. μ_bg is the arithmetic mean of ΔD in the flawless sampling area, which is the baseline mean (4). μ_bg+3σ_bg is used to schematically represent the baseline abnormal threshold line (5). In the specific embodiment, the abnormality judgment of the polarization difference image is replaced by the local threshold σ_local described later instead of the global threshold.
[0032] In some embodiments, the method of locating abnormal depolarization ratio jump regions using the polarization difference image to form a suspected defect location map includes: grouping the polarization difference image according to polarization direction to statistically analyze the depolarization ratio to obtain a depolarization ratio distribution; locating abnormal jump pixels based on the depolarization ratio distribution to obtain abnormal pixel points; merging the spatial connected regions of the abnormal pixel points to obtain abnormal depolarization connected regions; and removing foil texture pseudo-jumps from the abnormal depolarization connected regions to form a suspected defect location map.
[0033] The depolarization ratio distribution is obtained by statistically analyzing the depolarization ratio in groups according to the polarization direction of the polarization difference image. In this embodiment, the column direction of the image corresponds to the foil-moving direction, and the row direction corresponds to the foil-crossing direction. This mapping relationship is applicable to the determination of row and column coordinates throughout the entire image. A two-dimensional spatial distribution profile of ΔD is extracted from the polarization difference image along the foil-moving direction and the foil-crossing direction. This profile is directly taken from the single-channel ΔD data of the polarization difference image. In the foil-moving direction, all pixel columns are summarized one by one, and the mean and standard deviation of ΔD in each column are calculated and arranged to form the longitudinal profile of the depolarization ratio in the foil-moving direction. In the foil-crossing direction, the percentile values of ΔD in each row are statistically analyzed and arranged to form the transverse profile of the depolarization ratio in the foil-crossing direction. Both profiles are directly derived from the polarization difference image. The cross-sectional data from two directions are stitched together in a two-dimensional statistical table. The transition edges of the alternating bright and dark stripes of the rolling texture exhibit periodic fluctuations in the local diffuse reflection ratio due to the continuous deflection of the surface normal within tens of micrometers. This fluctuation, along the foil walking direction, manifests as a sinusoidal ΔD background fluctuation consistent with the physical period spacing of the rolling texture, exhibiting phase-locked spatial repetition on the order of tens of micrometers. The deflection ratio distribution includes the local mean and local standard deviation of ΔD at various locations along the entire length of the foil. A 21×21 pixel sliding window is used for the local statistical window to ensure sufficient pixel samples to support local statistical stability while avoiding the smoothing out of fine-grained features due to an excessively large window. This pattern is manifested in the deflection ratio distribution as a standard deviation peak appearing every other rolling texture cycle along the foil walking direction. The global ΔD mean and quantile reference values for the entire foil are written as baseline parameters into the header metadata of the deflection ratio distribution.
[0034] Abnormal pixel points are identified by locating anomalous pixels based on the depolarization ratio distribution. Within the entire length of the foil covered by the depolarization ratio distribution, the spatial rate of change of ∆D is scanned sequentially by pixel coordinates. When the difference in ∆D between two adjacent pixels exceeds 2.5 times the local standard deviation σ_local of the pixel's location, the current pixel is identified as a depolarization ratio anomalous pixel, and the determination result is directly written into the abnormal pixel point set. The local standard deviation σ_local recorded in the depolarization ratio distribution also serves as a unified benchmark for all subsequent anomalous pixel threshold adjustments. Anomalous pixels are classified according to the polarity of the anomalous jump: positive anomalous jump (a sudden increase in ∆D indicates an abnormally increased ratio of specular reflection to diffuse reflection in the current polarization direction, typically corresponding to pits or bubbles on the foil surface); and negative anomalous jump (a sudden decrease in ∆D indicates an abnormally decreased ratio, typically corresponding to protrusions or foreign object attachment defects). The abnormal pixel point set assigns each anomalous pixel its coordinates, anomalous jump significance (the ratio of the jump amplitude to σ_local), and a jump polarity marker. During the scanning process, the direction of the jump changes within five consecutive pixels, sometimes reversing from positive to negative. Such short-distance direction reversals rarely correspond to real defects physically, because both bubble-type pits and foreign object-attached protrusions have a certain continuous spatial extension in their surface morphology, and wouldn't suddenly change within a range of less than five pixels. High-frequency reversals are more likely jagged artifacts produced by the fine stripes of the rolling texture itself under pixel-level sampling. Therefore, this reversal section is marked as a high-frequency oscillation region. Even if the jump amplitude of a single pixel in the high-frequency oscillation region exceeds a threshold, it is not temporarily registered as an abnormal pixel; instead, a comprehensive judgment is made after the adjacent reverse jump ends. The jump pixels in the edge area of the rolling texture naturally have a higher σ_local value, and the jump judgment threshold for these pixels is set to 3.5 times σ_local. In the debiasing ratio distribution, the jump threshold for all pixels in areas where the ∆D value exceeds twice μ_bg is uniformly reduced to 1.5σ_local.
[0035] Abnormal pixels are spatially connected region merged to obtain debiased abnormal connected regions. The eight-neighborhood of each pixel in the abnormal pixel set is used as the search neighborhood for connectivity criteria. Two abnormal pixels are considered to belong to the same connected region if they share any boundary within their eight-neighborhood. After breadth-first traversal of each connected region, a bounding rectangle is drawn for each independent connected region. The bounding result is recorded in the debiased abnormal connected region, and the coordinates and polarity of the abnormal pixels are transferred to the corresponding connected region record. A record is created for each connected region in the debiased abnormal connected region, containing its region number, bounding rectangle coordinates, connected region area, total number of abnormal pixels within the region, and median ΔD jump amplitude within the region. The connected region area is calculated by multiplying the total number of pixels within the region by the physical area corresponding to a single pixel. Segmentation is triggered when the span of a connected region in the foil-walking direction exceeds eight times the average width of the connected region in the transverse direction. The segmentation point is selected at the hourglass-shaped narrowing point to avoid incorrectly cutting off a single long scratch. Scratch-like defects on the surface of electroplated aluminum foil often extend continuously along the foil feeding direction. If the aspect ratio of connected regions is not considered and they are only merged according to pixel connectivity, a continuous scratch will be regarded as a single large de-biasing abnormal connected region. Connected regions with positive and negative direction jumps in abnormal pixels usually exhibit different spatial characteristics in morphology. Positively dominant connected regions tend to be circular or elliptical, i.e., pit-type defects, while negatively dominant connected regions tend to be irregularly clustered, i.e., foreign object attachment type defects. Two adjacent connected regions that are across regions are merged into one connected region within the de-biasing abnormal connected region if the distance between their circumscribed rectangles is less than 10 pixels and the dominant jump direction of the two regions is the same.
[0036] A suspected defect location map is generated by removing foil pattern pseudo-jumps from the abnormal connected regions of the de-biasing. Starting from the circumscribed rectangle coordinates of the merged boundary (9) of each connected region in the abnormal connected region of the de-biasing, the corresponding base texture brightness profile is extracted within the same coordinate range of the base texture map. Autocorrelation analysis is performed on the brightness profile along the foil movement axis (1) to detect whether the connected region falls into the periodic brightness strip structure of the rolling texture, that is, whether there is a phase-locked relationship with the foil pattern phase-locked period marker (10). For example, if the physical period of the rolling texture is 20 pixels, the span of a certain connected region along the foil movement axis is 40 pixels (2 times the period), and the abnormal pixels are concentrated near the two strip transition edges, it is determined to be a foil pattern pseudo-jump; if the abnormal pixels of the connected region with the same 40-pixel span are concentrated in the middle of the strip, the phase-locked relationship is not satisfied, and it is retained as a suspected defect. When a connected component is identified as a foil texture pseudo-jump connected component within the texture pseudo-jump region (6), it is removed from the candidate set of de-biasing abnormal connected regions, and only connected components within the real defect jump region (7) are retained to enter the suspected defect location map. The physical period of the rolling texture is determined by taking a 1000-pixel length brightness sequence from the base texture map along the foil walking direction, performing a Fourier transform, and then using the reciprocal of the main frequency peak. This period value is used as the global period parameter for foil texture pseudo-jump removal. The suspected defect location map outputs the bounding rectangle coordinates of all connected components retained after foil texture pseudo-jump removal, the median of the ∆D jump amplitude within the component, and the traceability index of the original component number in the de-biasing abnormal connected region. The number of connected components in the suspected defect location map is usually significantly less than that in the de-biasing abnormal connected region, and most of the connected components phase-locked with the rolling texture period have been removed in this step.
[0037] In some embodiments, cross-comparing the suspected defect location map with the polarization distortion feature map to generate a polarization-enhanced defect map includes: analyzing the multi-polarization angle distortion intensity of each suspected defect location from the polarization distortion feature map to obtain a multi-angle distortion curve; locating the polarization direction with the lowest distortion intensity from the multi-angle distortion curve to determine the defect extinction angle; calculating the extinction attenuation amplitude at each location using the defect extinction angle to obtain the extinction attenuation amount; and weighting and superimposing the extinction attenuation amount with the suspected defect location map position by position to generate a polarization-enhanced defect map.
[0038] Multi-angle distortion curves are obtained by analyzing the multi-polarization angle distortion intensity at each suspected defect location from the polarization distortion feature map. Using the center coordinates of the bounding rectangle of each connected region in the suspected defect location map as the anchor point, nine pixels are taken within the 3×3 neighborhood of this anchor point in the polarization distortion feature map. The distortion intensity values in the four polarization angle directions are read from the pre-preserved angle-splitting auxiliary field of the polarization distortion feature map. The median of the nine pixels is used to obtain the representative distortion intensity I_distort of this anchor point in each polarization angle direction. Connected regions in the suspected defect location map that are not identified as candidate defects are not included in the anchor point extraction in this step. Therefore, the calculation range of the multi-angle distortion curve is limited to the candidate area already screened in the suspected defect location map, avoiding unnecessary sampling of large areas of normal texture. The multi-angle distortion curve is plotted with the polarization angle as the horizontal axis and the distortion intensity as the vertical axis, showing discrete data points of each connected region at the four angles. A continuous distortion response curve for the connected region is constructed using spline interpolation. The curve shape reflects the sensitivity distribution of the microstructure at that location to incident light in different polarization directions. The reason for using the median of 9 pixels within a 3×3 neighborhood, rather than the value of a single pixel at the anchor point, as the representative distortion intensity is that the coordinates of the outer rectangle's center are derived from geometric calculations and may not precisely fall on the pixel with the most typical response. The neighborhood median can suppress noise interference, making the curve more stably reflect the overall response rather than local random values. In the polarization distortion feature map, the distortion response of the specular highlight area is higher at all polarization angles, forming an overall uplift curve. In contrast, the distortion response of scattering defects such as pinholes exhibits obvious polarization angle selectivity, showing a single valley shape in the multi-angle distortion curve, and the valley depth has a near-linear relationship with the defect depth.
[0039] The extinction angle of the defect is determined by locating the polarization direction with the lowest distortion intensity in the multi-angle distortion curve. The global minimum value of distortion intensity and its corresponding polarization angle θ_extinct are searched on the spline interpolation curve of each connected region of the multi-angle distortion curve. θ_extinct is the extinction angle of the defect in that connected region, meaning that the disturbance of the specular reflection component by the defect in the reflection path of the incident light under that polarization direction is minimized. This minimum value is also recorded as I_min for direct reference by the extinction angle itself and subsequent steps. The multi-angle distortion curve thus becomes the common source of all fields of the extinction angle of the defect. Spline interpolation is used instead of directly taking the minimum value from the four original sampling angles because the extinction direction of the real defect usually does not fall exactly on the four fixed sampling angles of 0°, 45°, 90°, and 135°. Comparing only four discrete points only yields a rough approximation. The interpolation curve fills in the continuous response trajectory between sampling points, ensuring that the positioning accuracy of θ_extinct is not limited by the coarseness of the polarizer rotation step angle. The extinction angle of a defect is recorded for each connected region, including its θ_extinct, I_min, and the valley width of the curve. This valley width represents the polarization angle span Δθ_width as the distortion intensity rises from I_min to 1.1 times I_min on each side of the valley. A narrower Δθ_width indicates that the morphology corresponding to the defect extinction angle is closer to a fine structure in a single direction, such as a linear scratch; a wider Δθ_width indicates a more isotropic point depression, such as a pinhole. In multi-angle distortion curves, the overall uplift curve does not have a clear single minimum value. For such connected regions, the extinction angle is marked as "no extinction angle" to indicate that its extinction angle is not applicable, and the average value of all polarization angle distortion intensities is used instead of I_min for subsequent extinction attenuation calculations. If the θ_extinct of two adjacent connected regions differs by less than 5°, these connected regions, labeled as parallel orientation defect pairs, share the same θ_extinct direction during polarization enhancement fusion to avoid different enhancement directions being assigned to two segments of the same scratch within adjacent connected regions, leading to contrast jumps at the splicing point.
[0040] The extinction attenuation magnitude at each location is calculated using the extinction angle of the defect to obtain the extinction attenuation amount. In the θ_extinct direction given by the extinction angle of the defect, the I_min value already recorded in the extinction angle is directly taken as the response value of the defect in that direction. In the polarization distortion feature map, the distortion intensity value of the auxiliary field at the angle subdivision under the polarization angle of θ_extinct (orthogonal to θ_extinct plus 90°) is used as the reference benchmark value I_ref. Both core fields of the extinction attenuation amount are calculated from this. The orthogonal direction, rather than any other angle, is chosen as the reference benchmark because the disturbance of the defect to the specular reflection component is minimized in the extinction angle θ_extinct direction, and its orthogonal direction is precisely the direction where the defect's polarization response is least suppressed and the difference from the intact substrate is greatest. The comparison between the two provides the maximum response contrast obtainable by the defect in the polarization dimension. If an arbitrary central angle is used as the reference, the contrast will be compressed, and the discrimination effect of extinction attenuation will be weakened. The extinction attenuation is assigned to each connected region with its ΔI_atten and R_atten values, where ΔI_atten = I_ref - I_min, and R_atten = I_min / I_ref. The unit of ΔI_atten is a dimensionless relative value, consistent with the distortion intensity. The closer R_atten is to zero, the more completely the polarization distortion in the extinction angle direction is suppressed; the closer it is to one, the lower the sensitivity of the defect to the polarization angle, corresponding to micro / nano-scale surface unevenness with extremely small size and shallow depth. For connected regions marked as having no extinction angle in the defect extinction angle, the difference between the average of the distortion intensities of all four polarization angles and the baseline reflection value at the corresponding position in the substrate texture map is taken as the equivalent extinction attenuation substitute and included in the extinction attenuation. The extinction attenuation is sorted in descending order by ΔI_atten, and the ranking of extinction attenuation of each connected domain is output for quality control personnel to browse and refer to. The higher the ranking of the connected domain, the more significant the distortion suppression effect in the extinction direction, that is, the greater the potential for visual contrast enhancement of the defect.
[0041] The extinction attenuation amount is weighted and superimposed with the suspected defect location map position by position to generate a polarization-enhanced defect map. The R_atten value of each connected component is extracted from the extinction attenuation amount and mapped to the enhancement weight W_enh = 1 - R_atten during the fusion and superposition. The extinction attenuation amount is thus transformed into the connected component weight required for the generation of the polarization-enhanced defect map. The closer W_enh is to one, the greater the difference between the polarization response of the defect in the extinction direction and the orthogonal direction, and the more sufficient the space for visual enhancement of contrast. The polarization-enhanced defect map applies a weighted grayscale enhancement operation of W_enh to the pixel regions covered by each connected component on the basis of the suspected defect location map. The enhancement amount is the difference between the value of the pixel in the polarization distortion feature map's angle auxiliary field closest to θ_extinct and its orthogonal direction value, multiplied by W_enh. If the enhanced pixel grayscale value exceeds the 255 upper limit of an 8-bit image, it is truncated to 255. This truncation process ensures that the polarization-enhanced defect map always conforms to the standard 8-bit grayscale image format and can be directly sent to the downstream display, storage, and printing stages of the existing 8-bit image processing pipeline without the need to add a new high dynamic range image processing link specifically for this method. After weighted superposition, the pixel grayscale of the defect region in the polarization-enhanced defect map has a significantly improved contrast compared to the defect boundary presented by only the ∆D single channel in the suspected defect location map. A clear grayscale step transition is formed between the background where polarization distortion is suppressed in the extinction angle direction and the defect region where extinction attenuation is amplified. In the extinction attenuation, connected regions without extinction angles are given omnidirectional enhancement with an equal weight of W_enh = 0.5 in the polarization enhancement defect map to conservatively avoid introducing spurious enhancement noise. The enhancement weight W_enh of each connected region in the polarization enhancement defect map is retained along with it as a quantized record of the polarization response characteristics of that connected region.
[0042] Step S103: Extract depth texture features based on polarization enhancement defect map to generate depth texture code, compare depth texture code with base texture map to exclude known foil textures and determine texture anomaly area, and analyze pinhole isotropy and scratch directionality from texture anomaly area to form defect morphology classification.
[0043] Specifically, deep texture features are extracted from the polarization enhancement defect map to generate deep texture encoding. Image patches are extracted from the bounding rectangular regions of each connected component in the polarization enhancement defect map. These image patches are directly taken from the corresponding coordinates in the polarization enhancement defect map and input into a shallow convolutional feature extraction network consisting of two convolutional layers, one pooling layer, and one fully connected layer. The first layer of the network uses a 3×3 Gabor filter bank to extract texture response energy along eight directions from the image patches extracted from the polarization enhancement defect map. The second layer uses 1×1 convolution to fuse across directions. The third layer is compressed into a 64-dimensional feature vector by a fully connected layer after 5×5 max pooling, preserving the spatial correspondence of the defect boundary. The deep texture encoding extracts the first three principal components from the 64-dimensional feature vector of each connected component, namely the three-dimensional encoding values PC1, PC2, and PC3 after PCA dimensionality reduction. Each dimension of the three-dimensional encoding corresponds to three texture attribute dimensions with clear physical meaning: the overall energy level of the texture response, the principal orientation angle of the orientation distribution, and the concentration. The Gabor response of intact areas of the electroplated aluminum foil is symmetrically distributed in eight directions around the rolling texture direction. The energy vectors in each direction form an elongated ellipse with the major axis pointing towards the rolling direction in polar coordinates. In defective areas, the texture continuity is disrupted, and this ellipse becomes irregular. This deflection is directly captured by the response of a Gabor filter bank with fixed parameters, i.e., encoded into the feature space of the deep texture encoding. The Gabor filter layer parameters are fixed and do not require training. The weights of the subsequent fusion and compression layers still need to be pre-trained using normal foil data, but do not involve defect sample annotation. For each connected component, a segment of the image corresponding to the polarization enhancement sub-image in each of the four polarization directions is extracted independently to obtain a set of deep texture codes. These codes are provided for quality control personnel to refer to the texture feature drift at each polarization angle and are not involved in the automatic judgment of this method.
[0044] In some embodiments, comparing the deep texture encoding with the base texture map to exclude known foil-like textures and determine texture anomaly regions includes: measuring the foil period spacing from the base texture map to generate a texture period reference characterizing known foil-like textures; using the texture period reference to determine the adjacent period interruption lengths of the deep texture encoding to form a period interruption distribution; identifying interruption anomaly regions based on the period interruption distribution to obtain texture interruption regions; and performing connectivity merging through the texture interruption regions to determine texture anomaly regions.
[0045] The foil pattern period spacing is measured from the substrate texture map to generate a texture period reference characterizing the known foil pattern texture. A strip-shaped texture sampling band with a width of 512 pixels and a length covering the entire foil movement direction is extracted from the substrate texture map. The sampling band bypasses the defect connected regions marked in the polarization enhancement defect map to avoid brightness perturbation in the defect region and contamination of the period measurement accuracy. The normalized autocorrelation function ACF_lag (a dimensionless correlation coefficient with a value range of [-1,1]) of the gray values of the substrate texture map is calculated on each pixel row of the sampling band in the foil movement direction. The number of lag pixels corresponding to the first significant positive peak on the autocorrelation function other than zero lag is the estimated rolling texture period of that row. The raw data for this estimated period all come from the base texture map. The estimated periods of each of the 512 rows in the full sampling band are taken as the median after outlier removal, and the unit is pixels. Along with T_period, the coefficient of variation CV_period of the estimated periods of each row in the full sampling band is also recorded to reflect the uniformity of the period spacing of the rolling texture on the entire roll of foil. The texture period benchmark uses T_period as the core parameter and includes CV_period and the mean-peak ratio of the first positive peak of the autocorrelation function. Together, they characterize the regularity of the rolling texture of the roll of foil: CV_period reflects the degree of fluctuation of the period spacing itself along the foil movement direction, and the peak ratio reflects the vividness of the contrast between bright and dark alternations. The lower the values of both, the more regular the rolling texture of the roll and the more reliable the period estimated by the autocorrelation. When CV_period exceeds 0.15, it indicates that the rolling texture of the foil roll itself has a large non-uniform extension, that is, the stretching rate of the foil along the foil feeding direction fluctuates between different segments during the rolling process. At this time, T_period in the texture period reference is segmented according to the foil feeding direction, and each segment is 1000 pixels long to ensure the local consistency of the texture period within the segment. The segmentation results are also written into the texture period reference.
[0046] A periodic interruption distribution is formed by determining the length of adjacent periodic interruptions in deep texture coding using a texture periodicity benchmark. The texture periodicity benchmark uses T_period as the spacing template and sets expected peak positions on the one-dimensional profiles of the three-dimensional components PC1, PC2, and PC3 of the deep texture coding. The starting peak position of each component is taken as the actual peak closest to the start of the connected component on the component's profile to ensure that subsequent expected positions are aligned with the actual peak at the beginning. If the spatial deviation between the actual encoded peak of a component and its expected position exceeds 20% of T_period in the texture periodicity benchmark, the expected position is marked as a periodic interruption event. The pixel span in the foil-walking direction between two consecutive interruption events is the interruption length L_interrupt, which is then written into the periodic interruption distribution. The reason for setting expected peak templates independently for the three components PC1, PC2, and PC3 instead of combining them into a single comprehensive index for judgment is that the three components correspond to three different texture attributes: energy level, orientation angle, and concentration. Defects do not destroy them synchronously. If they are combined into a single index, the differentiated destruction modes will cancel each other out, thus reducing detection capability. The periodic fluctuations in the microstructure of the foil surface at the ridges of the rolled texture cause the PC1 component of the Gabor response in deep texture coding to reach a local maximum at these locations, much like the ridges of a fingerprint repeatedly appearing at fixed intervals. The spatial correspondence between the coding peak position and the texture ridges remains stable across the entire roll of foil. This stable correspondence is the physical prerequisite for the texture periodicity reference to serve as a spacing template. Defective regions disrupt this periodicity of the surface morphology, causing the spacing of the deep texture coding peaks to deviate from T_period. This deviation information is recorded segment by segment via a periodic interruption distribution. The periodic interruption distribution records the length and starting pixel coordinates of each interruption segment within each connected component. Interruption segments with a length less than half a texture period are considered micro-interruptions and are not included in subsequent anomaly detection.
[0047] Texture interruption regions are obtained by identifying abnormal interruption regions based on periodic interruption distribution. After traversing the interruption segments of each connected component in the periodic interruption distribution and arranging them in ascending order of foil-moving direction coordinates, the spacing between adjacent interruption segments is merged. If the distance between two adjacent interruption segments, i.e., the pixel interval from the end of the previous segment to the start of the next segment, is less than 0.3 times T_period, they are merged into a continuous interruption segment to avoid excessive fragmentation of the interruption signal of the same defect due to accidental jumps in the coding peak. The merging result is still registered back in the connected component record corresponding to the periodic interruption distribution, and the merged entry is output to the texture interruption region. The selection of this merging threshold balances the need to prevent adjacent real defects from being mistakenly identified and to prevent the interruption signal of the same defect from being fragmented: if the threshold is too small, the record of the same scratch in the periodic interruption distribution will be split into multiple isolated entries in the texture interruption area; if the threshold is too large, two adjacent independent pinholes may be misjudged as a continuous interruption. The value of 0.3 times T_period itself is also derived from an empirical estimate of the inherent fluctuation amplitude of the rolling texture: during normal rolling, the random fluctuation of the local tensile rate of the foil will cause sporadic misalignment of adjacent texture peaks. The misalignment amplitude is usually no more than one-third of the cycle. Taking 0.3 times as the merging threshold falls exactly outside this inherent fluctuation range, thereby distinguishing the process noise itself from the real defect signal. The cumulative interruption length L_acc of each continuous interruption segment after merging is the sum of all its sub-interrupt segments L_interrupt. The ratio of L_acc to T_period is the relative damage scale of the interruption segment, that is, the degree of damage to the texture continuity by the defect as measured by the number of rolling texture cycles. The texture break region records each merged break segment as an entry, attaching its start and end coordinates, L_acc, L_acc / T_period, and the number of the connected component to which it belongs. Break segments with L_acc exceeding twice T_period are identified as significant texture break regions and marked with a significant break mark in the texture break region.
[0048] Texture anomaly regions are determined by merging texture interruption regions. Adjacent significant texture interruption segments within a texture interruption region are spatially connected and merged. If the distance between two significant interruption segments in the foil-moving direction is less than T_period and their width projections along the transverse foil direction overlap by more than one-third, these two significant interruption segments are considered adjacent segments belonging to the same defect whole and are spatially merged. The merged result is transferred from the texture interruption region to the texture anomaly region for registration. The merged texture anomaly region is registered in the texture anomaly region using the coordinates of the bounding rectangle of the merged region and the cumulative interruption length L_total after merging. L_total is the sum of L_acc of each significant interruption segment before merging, without considering the contribution of intermediate intervals to avoid overestimating the degree of damage to the texture. Interruption segments in the texture interruption region with L_acc / T_period exceeding 5 are directly upgraded to a separate registration entry for the texture anomaly region, even if they do not meet the merging conditions with any other segments. This is because defects with a damage scale exceeding five rolling texture cycles already have independent physical interpretation meaning, and their corresponding texture interruption signals do not have ambiguity in the encoding space due to accidental fluctuations. The texture anomaly output table shows the merged texture anomaly entries, their bounding rectangle coordinates, and cumulative damage scale after merging all significant texture interruption areas. This table has a one-to-one spatial mapping relationship with the corresponding enhancement defects in the polarization enhancement defect diagram, constituting a multi-dimensional cross-verification of defects: the depolarization ratio jump in the polarization layer reflects the local abrupt change in the surface normal of the defect, and the periodic interruption in the texture layer reflects the destruction of the rolling texture continuity by the defect. The two have different physical causes but appear at the same coordinate. The consistent direction of independent information sources is less susceptible to random noise interference than the determination of a single channel.
[0049] In some embodiments, the method of analyzing the isotropic nature of pinholes and the directionality of scratches from the texture anomaly region to form a defect morphology classification includes: calculating the area change rate of each connected region of the texture anomaly region at multiple polarization angles to obtain an area change rate distribution; using the area change rate distribution to separate the polarization stable region and the polarization sensitive region to generate an initial morphology classification; determining the morphology classification boundary by statistically analyzing the mean and discrete interval of the area change rate of each morphology class from the initial morphology classification; and performing area change analysis on the transitional samples in the neighborhood of the morphology classification boundary to form a defect morphology classification.
[0050] The area change rate distribution is obtained by calculating the area change rate of each connected domain in the texture anomaly region at multiple polarization angles. The polarization-enhanced defect map is located using the bounding rectangle coordinates of each connected domain in the texture anomaly region. The boundary contours are extracted using the Canny edge detection operator on the sub-maps in the four polarization angle directions, and the internal pixel area A_i is calculated. i takes values of 0°, 45°, 90°, and 135°. The coordinates provided by the texture anomaly region serve as the spatial reference for all calculations in this step. The area change rate R_area_i = (A_max - A_i) / A_max, where A_max is the maximum value among the four A_i values, reflecting the degree to which the polarization angle weakens the visibility of the defect. The area change rate distribution is thus a summary of this vector from all connected domains in the texture anomaly region. For each connected domain, the area change rate distribution is calculated by arranging its four-dimensional area change rate vector and corresponding polarization angle coordinates. The variance σ of the four components in the vector is... 2 _area is a quantitative measure of the area change of this connected region under different polarization angles. The polarization direction at which R_area_i reaches its maximum value in the four-dimensional vector is recorded as θ_peak of this connected region, and is also written into the area change rate distribution. This pattern recorded in the area change rate distribution stems from the respective physical causes of the two types of defects: pinhole defects have nearly equal areas in all directions, and their R_area_i range usually does not exceed 0.05 and σ 2 When the area approaches zero, it is isotropic. For scratch-type defects, when the scratch direction is parallel to the polarization direction, the scattered light from the defect boundary is significantly suppressed, resulting in a significant reduction in the area along that direction, while the area along orthogonal directions remains unchanged. Pinholes are approximately circular micro-indentations with roughly symmetrical edge contours in all directions. Regardless of the polarization angle at which the light is illuminated, the proportion of scattered light blocked is similar. When a scratch extends in a single direction, and the polarization direction is parallel to the scratch direction, the scattered light from the groove wall is significantly suppressed, resulting in a significant reduction in the visible area along that direction. Other directions are minimally affected due to different geometric relationships.
[0051] For example, using the area change rate distribution to separate the polarization stable domain and the polarization sensitive domain to generate an initial morphological classification includes: dividing the polarization stable domain and the polarization sensitive domain based on the area change rate distribution to determine the change discrimination boundary; using the change discrimination boundary to classify approximately unchanging connected domains as pinhole candidate sets; using the change discrimination boundary to classify connected domains with directional area changes as scratch candidate sets; and synthesizing the pinhole candidate set and the scratch candidate set to generate an initial morphological classification.
[0052] The polarization stability region and polarization sensitivity region are divided based on the area change rate distribution to determine the boundary for change discrimination. The σ values of each connected region in the area change rate distribution are then used to... 2The peak-to-average ratio (PMR) of the four polarization angle components R_area_i of the connected component is used as the two-dimensional coordinates of the connected component in the area change feature space. K-means clustering is performed on all connected components in this space, with K fixed at 2, to adaptively find two natural cluster centers. The clustering input is entirely taken from the vectors recorded in the area change rate distribution. The reason for using roll-by-roll re-clustering instead of a fixed global segmentation threshold is that the inherent differences in the rolling process of different batches of substrates will cause the baseline of the area change rate of the two types of defects to shift overall. If a fixed threshold is used, batches with rougher textures may misclassify normal pinholes as scratch candidates. Roll-by-roll re-clustering ensures that the change discrimination boundary always conforms to the statistical characteristics of the current foil material itself. After clustering, σ... 2 The center of the area with the lower radius is denoted as the center of the stable polarization cluster, and the center of the area with the higher radius is denoted as the center of the sensitive polarization cluster. The perpendicular bisector of the two cluster centers is the boundary for determining the change. The expression of the dividing line is determined by the ratio of the difference between the horizontal and vertical coordinates of the two centers. The boundary for determining the change is expressed as a × σ. 2 The parameterized linear equation _area+b×R_areapeak-to-average ratio+c=0 records the coefficient triplets and refits them with the real-time characteristics of the area change rate distribution during full inspection of each roll of foil, instead of using a fixed global boundary. If the total number of samples in each connected region of the area change rate distribution is less than 20, K-means clustering is easily affected by outliers, causing the dividing line to shift randomly. In this case, the change discrimination boundary degenerates into a boundary based on the σ values of all connected regions. 2 The median of the area is the single-dimensional segmentation threshold. When the Euclidean distance D_centers between the centers of two clusters is less than 0.1, it indicates that the pinholes and scratches on the foil roll have a high degree of overlap in area variation characteristics. In this case, it is recommended to combine the classification results of the pinhole candidate set and the scratch candidate set with the range index for cross-verification.
[0053] By utilizing the change-discrimination boundary, approximately invariant connected components are classified into a pinhole candidate set. Using the dividing line of the change-discrimination boundary as the decision surface, all connected components in the area change rate distribution are substituted into the discriminant function value sign(a×σ) of the dividing line. 2 In the formula (_area+b×R_area peak-to-average ratio+c), a negative discriminant function value indicates that the connected region falls on one side of the polarization-stable cluster, and it is included in the pinhole candidate set. The criterion is that the area change rate of the connected region differs minimally across polarization angles, physically corresponding to an isotropic surface depression. This depression exhibits almost identical dark-field profile morphology under different illumination polarization directions. The pinhole candidate set lists the pinhole number and σ value under each connected region entry. 2The peak-to-average ratio (PAR) of the _area and R_area regions, as well as the vertical distance from the segmentation line of the change discrimination boundary, are used to determine the class confidence of the connected component. Smaller distance values indicate lower class confidence and a closer approximation to the blurred transition sample at the class boundary. Connected components with excessively small areas (fewer than 9 pixels) are inherently unstable in their classification on either side of the change discrimination boundary due to the area change rate statistics being driven by a very small number of pixels, resulting in high measurement uncertainty. Even if such connected components fall into the polarization-stable cluster, they are not directly included in the pinhole candidate set but are moved to the pending candidate queue, awaiting subsequent classification based on contextual inference from the already classified large defects in their neighborhood. All candidate connected components in the pinhole candidate set are arranged in ascending order of their vertical distance from the segmentation line. This allows quality control personnel to prioritize reviewing the original image ground truth of low-confidence candidate pinhole connected components located near the classification boundary, ensuring that the final pinhole candidate set determination is not based solely on the algorithm's classification result. In the actual quality control process, this sorting mechanism prioritizes the limited manual review effort on the most error-prone boundary samples, rather than randomly sampling from the pinhole candidate set. Once a boundary sample is manually confirmed, its judgment result can be used to verify whether the segmentation effect of the boundary itself is reasonable.
[0054] Connected regions exhibiting directional area changes are categorized into scratch candidate sets using the change-discrimination boundary. For all connected regions in the area change rate distribution whose discriminant function value is positive after being determined by the change-discrimination boundary (i.e., the region falls on one side of the polarization-sensitive cluster), the range of their R_area vectors and σ are verified one by one. 2 The proportional relationship between areas, the range and σ 2 The ratio of _area exceeds 1.8, and the range is approximately twice the dispersion, meaning that the area reduction is entirely concentrated in a single polarization direction while the other three directions remain essentially flat. This connected region, after initial boundary judgment based on change discrimination, is confirmed and included in the scratch candidate set, exhibiting a typical scratch polarization directionality response. This response is rooted in the geometric essence of scratches: scratches are linear grooves extending in a single direction. When the incident polarization direction is parallel to the groove wall, the groove wall specularly reflects most of the light rays in a direction deviating from the camera's receiving angle, causing a sharp drop in visible light flux. When the polarization direction turns perpendicular to the groove wall, the flux essentially recovers. This drastic fluctuation with angle is the physical basis that distinguishes the scratch candidate set from isotropic pinholes. The scratch candidate set establishes a connected region number and σ for each connected region. 2 _area, R_area peak-to-mean ratio, range / σ 2The ratio of _area and the angle value corresponding to the polarization direction with the largest area reduction (θ_peak) are used. The geometric relationship between θ_peak and the scratch direction in the polarization-enhanced defect map is that when the polarization angle is parallel to the scratch direction, the scattered light from the edges of the scratch is suppressed to the maximum extent in the dark field image because the specular reflection direction is consistent with the detection optical path. If the four components of the R_area vector of the connected region in the area change rate distribution have similar high values in two directions, i.e., a bimodal feature, the connected region is simultaneously included in the scratch candidate set and marked with a dual-direction label, indicating that it may correspond to a cross scratch or a V-shaped crease. Compared with the pinhole candidate set generated on the other side of the change discrimination boundary, the scratch candidate set is modeled by direction grouping according to θ_peak to statistically analyze the angle distribution heatmap.
[0055] The pinhole candidate set and the scratch candidate set are synthesized to generate the initial morphological classification. The pinhole and scratch candidate sets are generated independently before synthesis. During the synthesis stage, only the connected components that spatially overlap are processed; candidate members in the non-overlapping parts retain their original classification and directly enter the initial morphological classification. The classified pinhole and scratch candidate sets are then combined according to their connected component numbers. If the two sets have an inclusion or partial overlap in the span of the foil-moving direction and the transverse direction, and one is a pinhole candidate and the other a scratch candidate (e.g., the bounding rectangle of a pinhole candidate's connected component is 10×10 pixels, and the bounding rectangle of the partially overlapping scratch candidate's connected component is 8×30 pixels, with an overlap of approximately 10 pixels in the foil-moving direction), then the overall area change rate distribution of the combined bounding rectangle region covering both sets is used to recalculate the combined σ after merging. 2 If the _area value is still below 0.01, it is classified as a pinhole, indicating that large pinhole defects have local irregular edges that are misjudged as directional features; if the σ value is considered... 2 If the area exceeds 0.01, its original classification is retained without merging; that is, the overlapping area is a random spatial proximity of two unrelated defects, pinholes and scratches. Each connected component in the initial morphological classification is assigned a type label and a confidence score. The confidence score is the normalized value of the vertical distance from the boundary of the change rate distribution of the connected component, with a maximum score of 1.0 indicating distance from the boundary and high confidence in the classification. For the smallest connected component in the candidate queue to be confirmed, after the initial morphological classification is generated, the category of the largest classified connected component (pinhole candidate set or scratch candidate set) among its eight neighbors is taken as the presumed category. The initial morphological classification includes representative morphological snapshots of the pinhole and scratch candidate sets for quality control personnel to review.
[0056] The morphological classification boundary is determined by statistically analyzing the mean and discrete intervals of the area change rate of each morphological class in the initial morphological classification. All statistical objects in this step are taken from the candidate connected components already classified in the initial morphological classification; the σ values of all pinhole candidate connected components are extracted from their pinhole candidate set. 2The peak-to-mean ratio (PMR) of R_area is the ratio of the peak value of the R_area vector to the mean value in all four directions. σ is the value of the pinhole candidate set. 2 The _area distribution approximately follows a normal distribution with mean μ_pin and standard deviation σ_pin. We take μ_pin + 2σ_pin as the σ_pin of the pinhole class. 2 The upper boundary of the _area. Connected regions beyond this boundary, although previously classified as polarization-stable regions, exhibit significantly different dispersions in their area change rates compared to the statistical characteristics of the pinhole population, and should be re-examined as boundary anomaly samples. The σ of all candidate connected regions in the scratch candidate set. 2 The area is defined by the mean μ_scr and standard deviation σ_scr of its distribution, with μ_scr - 1.5σ_scr serving as the σ_scr for the scratch class. 2 The lower boundary of the _area indicates that connected regions below this boundary exhibit low dispersion in their rate of area change, resembling isotropic pinhole features rather than directional scratch features. Morphological classification boundaries are defined by σ. 2 Using `_area` as the horizontal axis and `R_area` as the peak-to-average ratio, Gaussian probability density contour lines are plotted for the pinhole and scratch classes. The intersection of these two contour lines represents the theoretical optimal decision boundary for both classes. The boundary's proximity width is the width of the intersection interval between the probability density values of the two classes at the decision boundary. In the initial morphological classification process, if a minimal connected component of the undetermined set falls within the uncertainty zone of the morphological classification boundary, and if a large connected component already classified exists in its neighborhood, it is directly classified according to the category of its nearest-neighbor classified connected component to reduce the size of the undetermined set. This decision is simultaneously written back to the morphological classification boundary record, and the confidence score of the corresponding connected component in the initial morphological classification is updated accordingly.
[0057] Area change analysis is performed on transitional samples within the morphological classification boundary to form defect morphological classification. Connected regions on both sides of the morphological classification boundary, where the category could be directly confirmed, are not included in this review. The review only targets transitional samples that are very close to the morphological classification boundary and where single-point statistics can no longer reliably distinguish them, to avoid unnecessary duplication of highly confident classification results. Within the decision neighborhood of the morphological classification boundary, i.e., from the upper boundary of the pinhole class to the interval μ_pin+2.5σ_pin and from the lower boundary of the scratch class to the interval μ_scr-2σ_scr, all transitional connected regions are re-evaluated for each connected region in terms of the original four components of the R_area vector in the area change rate distribution, rather than relying solely on σ. 2 The classification decision is based on the single-point statistics of the _area because σ 2 The discriminative power of _area as a single scalar near the boundary is insufficient. It is necessary to return to the uncompressed four-dimensional original vector to capture more subtle directional clues. This is why the two review rules separately examine the components corresponding to the range and θ_peak instead of relying on σ. 2The area itself. The review rule is: if the range of the four components of the R_area vector of the transitional connected region does not exceed 0.10 and σ 2 If the area is below the lower boundary of the scratch class, the connected component is changed from a scratch candidate to a pinhole confirmed defect. If the range of the four components exceeds 0.15 and the ratio of R_area_i corresponding to its θ_peak to the mean of R_area in the other three directions exceeds 1.5, the connected component is changed from a pinhole candidate to a scratch confirmed defect. Transitional connected components that still do not meet any confirmation conditions after review are classified into the mixed defect category in the defect morphology classification. The defect morphology classification finally outputs the classification results of all connected components in three major categories: pinhole, scratch, and mixed. Each record carries its connected component area (inherited from the debiased abnormal connected region) and is arranged in descending order of area. The mean shape parameter is written as the morphological fundamental model parameter of each category in the class overview row of the defect morphology classification.
[0058] Step S104: Obtain defect traceability records by matching the production line process timestamp with defect morphology classification, identify density surge windows of the same type of defects from the defect traceability records to construct defect cause mapping, and obtain calibrated defect classification by quantifying the cause confidence through defect cause mapping and defect morphology classification.
[0059] Specifically, defect tracing records are obtained by matching defect morphology classification with production line process timestamps. From the defect morphology classification, defect type labels (pinholes or scratches) and the position coordinates of each connected region on each roll of foil, along with the foil's position coordinates in the foil's travel direction, are extracted. These coordinates are converted to meters from the beginning of the parent roll based on the roll's initial offset relative to the parent roll. The position coordinates of each connected region are spatially aligned with the process parameter timestamps recorded in the production line PLC system using the same foil travel position as an index. The instantaneous values of four parameters—coating speed, foil travel speed, oven temperature, and rolling parameters—corresponding to the moment the connected region was detected are then found and written into the defect tracing record. Since there is a fixed foil travel distance and a known foil travel speed between the coating station and the inspection station, the transmission delay obtained by subtracting the foil travel distance from the inspection time and dividing by the foil travel speed yields the actual process time at which the defect was manufactured at the coating station. This manufacturing time is the benchmark field in the defect tracing record used for subsequent time-series comparisons and typically differs from the inspection time by several minutes to tens of minutes. The defect tracing record uses the connected component number as the primary key to register each defect's morphological category (derived from defect morphology classification), axial position of the parent roll, inspection time, and manufacturing time. It also records the mean and standard deviation of coating speed and foil travel speed, the mean and range of temperatures in each oven zone, and roll pressure fluctuation within a 30-second window before and after the manufacturing time. The manufacturing times of all connected components on the same roll of foil constitute the defect outbreak timeline for that roll. The degree of temporal overlap between the density surge window and the abnormal fluctuation window of process parameters serves as the basis for determining causal relationships in subsequent defect cause mapping. Connected components with lower confidence scores in the defect morphology classification are also registered, but the process window is widened to 60 seconds before and after to compensate for the loss of positioning accuracy.
[0060] In some embodiments, constructing a defect cause mapping by identifying density surge windows of similar defects from the defect tracing records includes: using the defect tracing records to count the number of defects in each time period according to defect category to generate a classified defect time series statistics; locating the period when the number of defects continuously exceeds the limit based on the classified defect time series statistics to obtain a density surge window; performing process offset time series analysis in the density surge window to obtain a process offset sequence; and constructing a defect cause mapping by the time series coupling relationship between the peak time of the process offset sequence and the start and end times of the density surge window.
[0061] Defect time-series statistics are generated by statistically analyzing the number of defects in each time period according to defect tracing records and categorizing them by defect type. From the defect tracing records, defects are categorized into three main types based on their morphology: pinholes, scratches, and mixed types. Using the manufacturing time (corrected for transmission delay) as the time axis, the number of defects detected for each roll of foil in each time period is collected. The duration of each time period is set to the 30-second parameter sampling period of the production line PLC. The transition period from room temperature to process temperature in the oven of the electroplated aluminum coating production line is approximately 3 to 5 minutes. A resolution of 30 seconds is sufficient to capture the temperature ramp-up curves of at least 6 sampling points within this transition period to distinguish between normal temperature rise and abnormal overheating. The defect time-series statistics unfold the counts of the three types of defects along the manufacturing time axis into three independent curves. The baseline density of pinholes naturally varies between different batches of foil, which is directly related to the batch characteristics of the coating solution. Suspended air bubbles in newly prepared or recently replaced coating solutions have not been fully allowed to settle and dissipate, resulting in a significantly higher pinhole background rate in the early stages of production compared to foil produced later in the same batch. This is why baseline density must be registered separately per roll. In the defect tracing record, defects from different sub-rolls of the same master roll are sequentially aligned along the foil-carrying direction based on their spatial location in the defect classification time-series statistics. This reflects density changes at the same spatial location rather than the mixed effect of different locations. The master roll coordinates required for this alignment are also provided by the defect tracing record. When the pinhole and scratch curves show synchronous peaks within the same time period, it indicates that the production line may be simultaneously affected by two different process disturbances during that period. For example, sudden changes in the surface roughness of the coating roller and instantaneous fluctuations in the oven temperature may independently drive the generation of pinholes and scratches. When only one curve shows a sudden increase, it indicates that the disturbance source has morphological selectivity. The three independent curves in the defect classification time-series statistics are the basic data for distinguishing the sources of disturbance.
[0062] Based on the time-series statistics of classified defects, density surge windows are obtained by locating periods when the number of defects continuously exceeds the limit. Each type of defect is continuously scanned across time periods on the manufacturing timeline of the classified defect time-series statistics. The baseline length of the scanning window is 6 consecutive time periods, covering 3 minutes of process time. When the number of defects of a certain category detected within the scanning window exceeds the baseline density of that category of foil plus 3 times the standard deviation for 6 consecutive time periods, the scanning window is locked as a density surge candidate window. The start time of the window is the manufacturing time of the first time period exceeding the limit, and the end time is the manufacturing time of the last time period exceeding the limit. The determination of this window is always based on the real-time curve in the classified defect time-series statistics. Density surge windows are grouped by defect category, and each candidate window in each group is accompanied by a window number, start and end timestamps, total number of detected defects, and peak density. If the distance between adjacent candidate windows in the same scan is less than 3 time periods, they are merged into one density surge window. In the time-series statistics of defect classification, the baseline density of pinhole defects is usually higher than that of scratches because the background occurrence rate of pinholes is naturally higher, which is related to the random entrainment of microbubbles in the coating solution. The threshold for judging a sudden increase in pinhole density is the baseline density plus four standard deviations. The density fluctuation of pinholes over time is significantly greater than that of scratches. The random changes of microbubbles in the coating solution between batches of agitation make the inter-time standard deviation of pinhole background density approximately 1.5 times that of scratches. Raising the threshold to four standard deviations can keep its false alarm rate consistent with the three standard deviations criterion for scratches. A real process anomaly on the production line will not be consistently exceeding the limit throughout every time period. A brief drop should not be misjudged as two independent anomalies. The merging rule for density surge windows is set up precisely for this purpose.
[0063] For example, performing process offset time-series analysis within the density surge window to obtain a process offset sequence includes: extracting process parameters by time slices within the density surge window to generate process parameter snapshots; statistically analyzing adjacent consecutive offset segments from the process parameter snapshots to generate a set of consecutive offset segments; locating the starting inflection point of the consecutive offset based on the set of consecutive offset segments to determine the trend inflection point; and obtaining the process offset sequence by accumulating the parameter deviations between adjacent trend inflection points.
[0064] Process parameter snapshots are generated by slicing process parameters into time slices within the density surge window. Along the time axis of the density surge window, with a slicing step of 10 seconds, the continuous time-series records of the four process parameters within the window are cut into non-overlapping time slices. Each slice contains instantaneous value sampling points of the four parameters within that 10-second period. The PLC sampling interval for the four process parameters is approximately 3 seconds, so each slice contains approximately 3 sampling points. The median is taken as the representative value of that slice. Each slice of the process parameter snapshot corresponds to one line of record, including the slice start timestamp, the slice representative value of the four parameters, and the deviation amount ΔP_slice. The positive or negative sign of the deviation amount directly reflects whether the parameter is higher or lower than the set value at the current slice moment. The start and end boundaries of the density surge window are not strictly aligned with the start point of the parameter sampling cycle of the production line PLC. Incomplete sampling cycles at the window boundaries are replaced by a weighted average of the actual number of sampling points contained in that cycle in the process parameter snapshot, instead of a simple truncation value, to avoid false jump signals introduced by boundary truncation. If the direction of deviation between two adjacent slices remains constant, i.e., two consecutive slices deviate by the same sign, then this pair of adjacent slices is marked as a same-direction adjacent pair. Same-direction adjacent pairs are the basic components of subsequent same-direction offset segments. An isolated slice containing only a single slice with no adjacent slices of the same sign before or after it does not constitute an adjacent pair. Because the deviation direction is unstable, such isolated slices are statistically closer to instantaneous sensor jitter than to continuous process offset. The time span of the density surge window determines the total number of slices actually generated by the process parameter snapshot. The longer the window, the more slices are generated. The recording scale of the process parameter snapshot is directly proportional to the duration of the density surge window, and the two always maintain a one-to-one time axis relationship in the data structure.
[0065] A set of unidirectional offset segments is generated by statistically analyzing adjacent consecutive unidirectional offset segments in process parameter snapshots. The process parameter snapshots are traversed, and unidirectional offset segment scans are performed on each of the four process parameters across each time slice. If a parameter maintains the same sign (positive or negative) across n consecutive time slices, the segment formed by these n consecutive slices is recorded as a unidirectional offset segment for that parameter within that window. This scan iterates through all records of the process parameter snapshots slice by slice. The unidirectional offset segment set is organized by parameter and window. Each offset segment is appended with a start timestamp, end timestamp, number of slices n, and cumulative offset magnitude (Σ|ΔP_slice|, the sum of the absolute values of all slices ΔP_slice within the segment). Taking coating speed as an example, if it maintains a positive offset for 5 consecutive slices within a window (n=5), the corresponding unidirectional offset segment record is 50 seconds long, representing a continuous offset rather than an instantaneous fluctuation. Unidirectional drifts shorter than 3 slices are not included in the formal record of the unidirectional offset segment set. In the process parameter snapshot, the deviations of the two motion parameters, coating speed and foil travel speed, are often highly synchronized because they are controlled by the same servo drive system. This linkage between parameter pairs is marked as linked parameter pairs in the same-direction offset segment set, allowing quality control personnel to determine the transmission path of process disturbances. If four parameters within the same window simultaneously exhibit overlapping same-direction offsets longer than 10 slices, the window is marked as a full-parameter drift window, and this marking is recorded along with the same-direction offset segment set. The number of consecutive slices, n, in the same-direction offset segment reflects the duration of the parameter's deviation from the set value. The larger n is, the stronger the offset persistence. Same-direction drifts shorter than 3 slices (i.e., less than 30 seconds) may be due to random noise or instantaneous sensor glitches and are not included in the formal record of the same-direction offset segment set.
[0066] Trend inflection points are determined based on the starting point of the continuous offset in a set of unidirectional offset segments. Starting from the initial slice of each offset segment in the set of unidirectional offset segments, a backtracking process is performed along the time axis. The moving average of the parameter deviation is calculated on the five consecutive slices preceding the candidate inflection point, serving as the preceding baseline value. If the deviation at the candidate inflection point shows an absolute jump relative to the preceding baseline value, and the jump exceeds three times the normal standard deviation of the parameter's fluctuation, then the candidate inflection point is confirmed as a statistically significant trend inflection point, indicating that the parameter has drifted from a steady state into a continuous offset state at the inflection point. The jump amplitude ΔP_jump = the difference between the deviation at the inflection point and its preceding baseline value. Trend inflection points are arranged by parameter and window. Each inflection point record includes the timestamp of the slice, the jump amplitude ΔP_jump, the identifier of the offset segment, and the time offset from the start of the window. An inflection point appearing before the start of the window indicates that the offset of the process parameter precedes the sudden increase in defect density, conforming to a causal temporal relationship. If the four-parameter inflection points of the full-parameter drift window in the same-direction offset segment set are highly clustered, that is, the inflection points of each of the four parameters all appear within the same 10-second slice, it indicates that the process system has experienced a global mutation event within that window. Such windows are marked with a global mutation marker in the trend inflection points. The trend inflection points of all windows in the entire volume are cross-grouped and statistically analyzed according to parameters and defect categories to form an inflection point distribution matrix. If the trend inflection point appears after the start time of the window, it indicates that the process offset lags behind the defect surge, that is, the parameter is more likely a result of the defect surge rather than a cause. This temporal relationship is the core criterion for distinguishing candidate causes from associated phenomena by trend inflection points, and it is also a key link in transmitting causal evidence downstream from the same-direction offset segment set.
[0067] The process offset sequence is obtained by accumulating the parameter deviations between adjacent trend inflection points. After arranging the trend inflection points in ascending order of time, the time interval between two adjacent inflection points, extending from the slice timestamp of the previous inflection point to the slice timestamp of the next inflection point, is considered as an offset accumulation segment. Within this offset accumulation segment, the ΔP_slice of the corresponding parameters is accumulated according to the slice number to obtain the total cumulative deviation Σ_accum = ΣΔP_slice. The sign of Σ_accum reflects the overall direction of the cumulative deviation in this segment, and the absolute value reflects the severity of the cumulative deviation. Each pair of adjacent records of trend inflection points corresponds to an offset accumulation segment in the process offset sequence. For example, if two trend inflection points appear successively in the coating speed within a certain window, all slices between the two inflection points constitute an offset accumulation segment, and its Σ_accum is the algebraic sum of the deviations within this interval, rather than the sum of the absolute values. Each offset accumulation segment in the process offset sequence corresponds to a record, containing its start and end timestamps, Σ_accum, number of slices, and start and end inflection point numbers. The ratio of the total accumulated deviation to the number of slices within the segment is the average offset slope of that segment. Offset accumulation segments with steeper slopes usually correspond to sudden disturbances such as equipment mechanical loosening or valve jamming, while those with gentler slopes are more likely to correspond to slow thermal drift. The total accumulated deviations of the two may be similar, but the types of process anomalies they point to are different. In the trend inflection point, if a parameter in a certain window has only a single inflection point, then the process offset sequence for this parameter in that window contains only one offset accumulation segment, and this segment extends from the inflection point to the end time of the window. The process offset sequences of the four parameters in all windows of the entire roll of foil are aggregated by parameter type to form a complete process drift record for that roll in that production period. The offset direction of a single inflection point parameter represents the unique drift direction of that process parameter within the window time limit, and has the clearest indication of the cause of the defect. This directional criterion also comes from the record content of the trend inflection point.
[0068] A defect cause mapping is constructed by temporally coupling the peak times of the process offset sequence with the start and end times of the density surge window. The peak occurrence time t_peak_P of the deviation of four process parameters within each window of the process offset sequence is used as the temporal reference point on the process side. This is compared with the occurrence time t_peak_D of the defect density peak within the density surge window, both using the manufacturing time as the caliber. If the time difference Δt_cause = t_peak_D - t_peak_P is positive and falls within the physical generation delay window of the corresponding defect type (i.e., the minimum delay time from process disturbance to defect appearance on the foil), then the process parameter is determined as a candidate cause parameter for defects within that window. The physical premise of this determination logic is that a real process disturbance must first occur at the production end, and then manifest as a defect after a fixed physical transmission process. There is an irreversible sequence between the two; parameter offsets with reversed timing or delays significantly exceeding the transmission time do not have the physical possibility of constituting a cause. The physical generation delay window for pinhole defects is 15 to 45 seconds, and for scratch defects, it is 5 to 20 seconds. Both types of windows are used to compare the peak times of the process offset sequence and the density surge window. The defect cause mapping is organized by defect type and window. Each entry lists the candidate cause parameter name, Δt_cause, peak-to-mean deviation ratio (the ratio of the peak value to the mean value of the deviation), and the direction of deviation. The defect cause mapping thus pairs each parameter deviation in the process offset sequence with each defect density surge in the density surge window according to their chronological order, allowing process records and defect records that were originally on two independent timelines to be compared within the same causal framework. If multiple candidate cause parameters exist within the same window, they are sorted in ascending order of the deviation of Δt_cause from the center value of the theoretical delay window, and the sorting results are recorded in the corresponding entry of the defect cause mapping.
[0069] In some embodiments, obtaining a calibrated defect classification by quantifying the cause confidence through the defect cause mapping and the defect morphology classification includes: extracting the process correlation strength of each defect using the defect cause mapping to obtain the cause correlation degree; quantifying the confidence level of each defect in the defect morphology classification using the cause correlation degree to obtain a single defect confidence value; comparing the single defect confidence value with a confidence threshold to locate low-confidence defects; and correcting using the group cause characteristics of the type to which the low-confidence defects belong to to obtain a calibrated defect classification.
[0070] The process correlation strength of each defect is extracted using the defect cause mapping to obtain the causal correlation degree. Based on the parameter name, Δt_cause value, and peak-to-average deviation ratio (peak_ratio) of each candidate cause chain in the defect cause mapping, the process correlation strength S_cause = w_t × exp(-|Δt_cause-τ0| / τ0) + w_a × (peak_ratio-1) is calculated for each cause chain, where τ0 is the center value of the theoretical physical delay window for this defect type (30 seconds for pinholes and 12 seconds for scratches), w_t and w_a are the timing matching weight and amplitude matching weight, respectively, and satisfy w_t + w_a = 1, with a default value of 0.5 for each. All inputs to this formula are directly read from the defect cause mapping. The timing matching term uses exponential decay instead of hard threshold truncation because the transmission delay itself is derived from the foil travel speed and fixed distance, which introduces measurement errors. If Δt_cause falls exactly outside the edge of the τ0 window, it is forcibly excluded, easily misjudging the true cause as irrelevant. Exponential decay makes the matching confidence decrease smoothly with time deviation, better reflecting the actual situation where transmission delay estimation has random errors. The amplitude matching term uses the peak-to-mean ratio minus one instead of directly taking the peak-to-mean ratio itself. This is to ensure that the contribution of cases where the parameter has no significant deviation is close to zero, avoiding normal small fluctuations being miscalculated as significant causal evidence. For causal correlation, each causal chain is appended with its S_cause value, defect category, window number, and full name of the process parameter. The higher the S_cause, the more likely the parameter satisfies both the timing causal condition and the amplitude matching condition in the defect surge event, and the higher its credibility as a defect cause. In the defect cause mapping, the causal chains of the full-parameter drift window are not split into multiple independent causal chains based on single parameters when calculating causal correlation. Instead, a unified global causal correlation value is assigned to the entire global event, which is the weighted average of the four parameters S_cause within the window. If a causal chain of the same parameter that appears repeatedly across windows obtains a high S_cause value in multiple sudden increases, then that parameter is upgraded to a systematic causal parameter during the production process of that volume.
[0071] The credibility of each defect in the defect morphology classification is obtained by measuring the credibility of causal correlation. For each causal chain of each defect category in the causal correlation, the S_cause value is mapped to all connected components of that category within that window, based on the unique identifier of the density burst window it involves. Each connected component inherits the maximum value of S_cause from all causal chains of the same morphology category within its window, which serves as the single-defect credibility value for that component. If a causal chain involves overlapping defects across multiple windows in the causal correlation, the S_cause value of that causal chain is maximized across multiple windows within the same connected component to ensure the unique determinacy of the single-defect credibility value. In defect morphology classification, the same connected region may be covered by multiple causal chains. The number of causal chains corresponding to the connected region can be identified from the causal correlation. If a connected region corresponds to two or more causal chains, its morphology classification is not only supported by a single process cause, but also cross-validated by multiple independent alternative causes. The single defect confidence value of such connected regions is more reliable even if it is at the threshold edge. For defects without a corresponding causal chain in the causal correlation, although the defect is classified into a certain morphology by defect morphology classification, no corresponding process cause parameter is found in any window of the defect cause mapping. The single defect confidence value of such defects is set to an empirical fixed value of 0.2, which is lower than the lower tail of the normal S_cause distribution but not zero, because defects without causal support still have about a 20% probability of being real accidental defects not covered by process records rather than false alarms. Global mutation events that occur repeatedly across windows typically have a high degree of correlation with global causes, and their single defect confidence values are naturally higher. Connected regions supported by sufficient process evidence have the strongest classification stability in subsequent calibration stages and are almost never lowered in confidence level due to insufficient evidence.
[0072] Low-confidence defects are located by comparing the single-defect confidence value with a confidence threshold. Using the confidence threshold θ_trust as a boundary, each connected component is divided into a high-confidence group (single-defect confidence value not lower than θ_trust) and a low-confidence group (single-defect confidence value lower than θ_trust), where θ_trust = 2 × (Q1 × μ) / (Q1 + μ), and Q1 is the lower quartile of the single-defect confidence value distribution, and μ is its overall mean. Harmonic weighting is used instead of an arithmetic mean because the arithmetic mean is influenced by the overall strength of evidence in the entire volume; incomplete production line records can misinterpret systemic problems as genuine low-confidence defects in individual connected components. Harmonic weighting ensures that θ_trust falls between Q1 and μ, biased towards the smaller of the two, maintaining sensitivity to long-tail weak evidence samples even when overall evidence is generally weak. The practical scenario corresponding to this design is: incomplete historical data archives of some older production lines make it difficult to match process parameter records for most connected domains of the foil roll. If the threshold is still set according to the arithmetic mean, almost all defects in the roll will be dragged into low-confidence defects, making the manual review task unbearable. Harmonic weighting can concentrate the discriminative power on a small number of samples that are truly deviating from the group in this scenario of lack of evidence. If a connected domain in a low-confidence defect is classified as a pinhole but its S_cause in the causal correlation degree comes from a scratch-type causal chain, this type of morphological-causal contradictory connected domain is marked as a cross-contradictory sample. Connected domains with a single defect confidence value lower than θ_trust, if covered by two or more causal chains in the causal correlation degree, are not classified as low-confidence defects but are reclassified into the pending confirmation group. The cross support of multiple causal chains has, to some extent, verified the authenticity of the evidence for the low-confidence defect determination of the connected domain. θ_trust thus divides the single defect confidence value distribution into two mutually exclusive subsets: a high-confidence group and low-confidence defects.
[0073] The calibration defect classification is obtained by correcting for the group causal characteristics of the low-confidence defect type. From each defect morphology classification group, defects belonging to the same morphological category as the low-confidence defect and with σ... 2The causal feature profile of a group of confirmed high-confidence connected domains with a high degree of proximity between _area and θ_peak within this category represents the process parameter deviation patterns and data distribution characteristics shared by all high-confidence connected domains in this group. The morphological classification results of low-confidence defects are compared with the causal feature profile of this group. If a connected domain is highly consistent with the group in morphology but has a significant S_cause difference in causal support compared to other group members, its morphological classification label is retained, but its confidence level is adjusted from "confirmed after calibration" to "retained after calibration" to distinguish it from the confirmed classification with sufficient process cause evidence. The adjusted result is written into the calibration defect classification. In the calibration defect classification stage, contradictory samples from low-confidence defects, along with other low-confidence defects, are reassigned to the defect morphology category corresponding to the maximum value of S_cause. This means the directional strength of the process-cause evidence overshadows the original morphology classification result. Morphology classification relies on the statistical regularities of polarization and texture features, and is prone to fuzzy transitions near the feature space boundary. In contrast, process-cause evidence comes from an independent temporal physical causal chain and is unaffected by morphological feature fuzziness. When the two conflict, the more objective and independent causal evidence is more reliable. The calibration defect classification ultimately outputs the calibrated classification labels, connected region areas (inherited from defect morphology classification), and corresponding calibration confidence levels for all connected regions in three calibrated categories: pinholes, scratches, and mixed types. The change in the number of each category before and after calibration reflects the tendency of morphology classification to misjudge when lacking process-cause evidence. Therefore, the calibration defect classification becomes the only classification result that needs to be read in the downstream tolerance comparison stage.
[0074] Step S105: Based on the calibration defect classification, the downstream tolerance is matched to obtain the defect tolerance boundary. The defect confidence level is obtained by comparing the defect tolerance boundary with the calibration defect classification grading threshold. The defect detection result is generated by performing confidence weighted grading based on the defect confidence level and the calibration defect classification.
[0075] Specifically, the defect tolerance boundary is obtained by matching downstream tolerances based on the calibration defect classification. From the three defect categories—pinholes, scratches, and mixed types—all connected components at the post-calibration confirmation level are extracted. The area distribution of these connected components is used as the true size baseline for that type of defect, and the median area of the connected components at each confirmation level is calculated. The downstream hot stamping process has a tolerance limit of 0.01 mm for pinholes. 2For composite processes, scratches are limited to a length not exceeding 300μm and a width not exceeding 15μm. For mixed defects, the stricter of the two is applied. In actual operation, production line quality inspectors use a criterion table pre-generated according to the defect tolerance boundary to directly read the margin status of each grade of the foil roll when it comes off the production line: rolls with sufficient margin can be directly released to the corresponding grade production line, while rolls with tight margin are marked for re-inspection. Therefore, the defect tolerance boundary serves as a bridge connecting the algorithm output and the production line diversion decision. Defect tolerance boundaries are grouped by defect category, with each group listing its A_tol, A_med, and R_margin. R_margin = A_tol / A_med represents the tolerance margin. An R_margin greater than 10 indicates the actual size is significantly smaller than the tolerance limit. An R_margin between 1 and 3 indicates the size is close to the tolerance limit and requires precise comparison across domains. An R_margin between 3 and 10 represents the normal margin range. An R_margin less than 1 indicates the median of the category exceeds the tolerance limit and requires overall process review. Connected regions retained after calibration are not included in the confirmation-level baseline calculation, as they may contain false alarms lowering A_med or have blurred edges due to excessively large circumscribed rectangles raising A_med. Downstream, for multi-level quality, A_tol and R_margin are registered level by level. Defect tolerance boundaries are updated roll-by-roll according to calibration defect classification. The production scheduling system retrieves the corresponding tolerance configuration from the defect tolerance boundaries based on order level. Each reclassification of calibration defects triggers a corresponding refresh of the defect tolerance boundaries.
[0076] The defect confidence level is obtained by comparing the defect tolerance boundary with the calibration defect classification grading threshold. The area A_tol of each defect category in the defect tolerance boundary is compared domain by domain with the area A_direct of each connected component in the calibration defect classification. If A_direct does not exceed A_tol, the defect passes the downstream tolerance test; otherwise, it is judged as an unacceptable defect. Even with sufficient process cause evidence, it cannot change the substantial quality threat posed by the dimensional deviation. Downstream sorting equipment on the actual production line uses the passability criterion in the defect confidence level as the rejection basis. Regardless of how clear the causal chain or how high the S_cause of a non-compliant connected component is, it will be directly judged as unusable and rejected from the qualified products. Causal evidence at this stage only affects the direction of subsequent process improvements and does not participate in the release decision of the current product. Each connected component is assigned a dimensional passability criterion, a calibration confidence level, and a C_grade. The C_grade is entirely determined by the connected component's existing dimensional passability and calibration confidence level fields, without relying on any additional intermediate data structures: a weight of 1.0 is assigned when the dimensions pass and the calibration is at the acceptance level; a weight of 0.7 is assigned to the retention level because the calibration confidence level is lower than the acceptance level but the dimensions have passed; connected components whose dimensions exceed the tolerance limit are assigned a weight of zero regardless of the strength of the causal evidence, because the defect tolerance boundary is the absolute safety line defined by downstream processes based on product functionality. When the defect tolerance boundary contains multiple levels, the defect confidence level is recorded as C_grade for each level, and the level at which the connected component first changes from passable to non-passable is marked. If the confidence score of the same connected component is low due to ambiguity near the morphological classification boundary, the tolerance boundary of that connected component is the strictest among all possible categories, avoiding the misjudgment of defects that should be rejected as acceptable due to uncertainty in category classification.
[0077] Defect detection results are generated through a confidence-weighted grading system based on defect confidence levels and calibration defect classifications. The C_grade value of each connected component in the defect confidence level is used as the confidence weight of that component in the final defect report. All connected components in the calibration defect classification are stratified according to their morphological category and C_grade. The defect density at each level is no longer directly summed by defect area; instead, it is calculated by summing the products of each connected component's area and its C_grade, divided by the total area of the entire roll of foil. This is a weighted summation of areas based on confidence weights to obtain the weighted defect density. After calibration, the confirmation level contributes 1.0 times the area, and the retention level contributes 0.7 times, ensuring that the density index itself reflects the weighted grading of the defect confidence level. The grading rule is that if the same connected component has different C_grades in multiple downstream levels, the highest level that can be considered acceptable is taken as the recommended applicable level. Defects above this level are recorded in the defect list for that level in the defect detection results, including the connected component number, morphological category, connected component area, C_grade value, and tolerance boundary A_tol value. For example, a connected component is numbered 1024, its shape type is scratch, and its area is 0.006 mm. 2 The calibration confidence level is confirmed, C_grade is 1.0, and the tolerance boundary A_tol is 0.0045mm. 2 (300μm long, 15μm wide) Because its area exceeds the tolerance limit for this grade, it is judged as an unacceptable defect and registered in the defect list for this grade. Furthermore, because its C_grade is 1.0, its 0.006mm... 2 The area is fully included in the weighted defect density for that grade. The defect detection results are output in descending order of downstream product grade, including the defect list and the weighted defect density for each grade. The weighted defect density is expressed as a percentage (‰). A shorter defect list and lower density for higher grades indicate that the overall defect size of the roll is much smaller than the tolerance limit for that grade.
[0078] To implement the above-described method embodiments, a method for detecting microscopic defects on the surface of electroplated aluminum is provided to achieve the corresponding functions and technical effects. See also... Figure 3 , Figure 3 This diagram illustrates a structural block diagram of a micro-defect detection device 300 for the surface of electroplated aluminum provided in an embodiment of this application. For ease of explanation, only the parts relevant to this embodiment are shown. The micro-defect detection device 300 for the surface of electroplated aluminum provided in this application includes:
[0079] The polarization analysis unit 301 is used to acquire polarization angle images of the electroplated aluminum surface, and to obtain polarization distortion feature maps and substrate texture maps by analyzing the specular highlight polarization distortion mode based on the polarization angle images.
[0080] The de-biasing sub-unit 302 is used to calculate the de-biasing ratio difference based on the substrate texture map to obtain a polarization difference image, use the polarization difference image to locate the de-biasing ratio abnormal jump area to form a suspected defect location map, and cross-compare the suspected defect location map with the polarization distortion feature map to generate a polarization enhancement defect map.
[0081] The texture exclusion unit 303 is used to extract deep texture features based on the polarization enhancement defect map to generate a deep texture code, compare the deep texture code with the base texture map to exclude known foil textures and determine texture abnormal areas, and analyze the isotropic pinholes and the directionality of scratches from the texture abnormal areas to form defect morphology classification.
[0082] The cause tracing unit 304 is used to obtain defect tracing records by matching the defect morphology classification with the production line process timestamp, construct a defect cause mapping by identifying density surge windows of the same type of defect from the defect tracing records, and obtain a calibration defect classification by quantifying the cause confidence through the defect cause mapping and the defect morphology classification.
[0083] The tolerance grading unit 305 is used to obtain the defect tolerance boundary by matching the downstream tolerance according to the calibration defect classification, obtain the defect confidence level by comparing the defect tolerance boundary with the calibration defect classification grading threshold, and generate the defect detection result by performing confidence weighted grading by comparing the defect confidence level with the calibration defect classification.
[0084] The aforementioned device 300 for detecting micro-defects on the surface of electroplated aluminum can implement a method for detecting micro-defects on the surface of electroplated aluminum according to the above-described method embodiments. The options in the above method embodiments are also applicable to this embodiment and will not be detailed here. The remaining contents of this application embodiment can be referred to the contents of the above method embodiments, and will not be repeated in this embodiment.
[0085] The above embodiments are not an exhaustive list based on the present invention, and there may be many other embodiments not listed. Any substitutions and improvements made without departing from the concept of the present invention are within the protection scope of the present invention.
Claims
1. A method for detecting microscopic defects on the surface of electroplated aluminum, characterized in that, include: A polarization angle image of the electroplated aluminum surface is acquired, and a polarization distortion feature map and a substrate texture map are obtained by analyzing the specular highlight polarization distortion mode based on the polarization angle image. Based on the base texture map, the depolarization ratio difference is calculated to obtain a polarization difference image. The polarization difference image is used to locate the abnormal depolarization ratio jump area to form a suspected defect location map. The suspected defect location map is cross-compared with the polarization distortion feature map to generate a polarization enhancement defect map. Based on the polarization enhancement defect map, depth texture features are extracted to generate a depth texture code. The depth texture code is compared with the base texture map to exclude known foil textures and determine texture anomaly areas. From the texture anomaly areas, the isotropic properties of pinholes and the directionality of scratches are analyzed to form defect morphology classification. Defect traceability records are obtained by matching the defect morphology classification with the production line process timestamp. Defect cause mapping is constructed by identifying density surge windows of the same type of defects from the defect traceability records. Calibrated defect classification is obtained by quantifying the cause confidence through the defect cause mapping and the defect morphology classification. The defect tolerance boundary is obtained by matching the downstream tolerance based on the calibration defect classification. The defect confidence level is obtained by comparing the defect tolerance boundary with the calibration defect classification and comparing the classification threshold. The defect detection result is generated by performing confidence weighting classification based on the defect confidence level and the calibration defect classification.
2. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 1, characterized in that, Using the polarization difference image to locate regions with abnormal depolarization ratio jumps and form a suspected defect location map includes: The depolarization ratio distribution is obtained by statistically analyzing the depolarization ratios grouped by polarization direction for the polarization difference images. Abnormal pixel points are obtained by locating abnormal jump pixels based on the aforementioned deflection ratio distribution; Spatial connectivity region merging is performed on the abnormal pixels to obtain the de-biased abnormal connectivity region; The foil pattern pseudo-jump is removed from the abnormal connected region to form a suspected defect location map.
3. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 1, characterized in that, The suspected defect location map is cross-compared with the polarization distortion feature map to generate a polarization-enhanced defect map, including: Multi-angle distortion curves are obtained by analyzing the multi-polarization angle distortion intensity at each suspected defect location from the polarization distortion feature map. The extinction angle of the defect is determined by locating the polarization direction with the lowest distortion intensity in the multi-angle distortion curve. The extinction attenuation amplitude at each location is calculated using the aforementioned defect extinction angle to obtain the extinction attenuation amount; The extinction attenuation amount and the suspected defect location map are weighted and superimposed position by position to generate a polarization-enhanced defect map.
4. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 1, characterized in that, The process of comparing the depth texture encoding with the base texture map to exclude known foil-like textures and determine texture anomalous regions includes: The foil pattern period spacing is measured from the base texture map to generate a texture period reference characterizing the known foil pattern texture; The adjacent periodic interrupt lengths of the depth texture encoding are determined using the texture periodic reference to form a periodic interrupt distribution; Based on the periodic interruption distribution, the abnormal interruption region is identified to obtain the texture interruption region; Texture anomaly regions are determined by connecting and merging the texture interruption regions.
5. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 1, characterized in that, The analysis of the texture anomaly region reveals the isotropic nature of pinholes and the directional nature of scratches, resulting in defect morphology classification, including: The area change rate distribution is obtained by calculating the area change rate of each connected domain in the texture anomaly region at multiple polarization angles. The polarization stable domain and polarization sensitive domain are separated using the area change rate distribution to generate an initial morphological classification. The morphological classification boundary is determined by statistically analyzing the mean and discrete interval of the area change rate of each morphological class in the initial morphological classification. Area change analysis is performed on transitional samples within the neighborhood of the morphological classification boundary to form a defect morphological classification.
6. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 1, characterized in that, Constructing a defect cause map from density surge windows of similar defects identified from the defect tracing records includes: Using the aforementioned defect tracing records, the number of defects in each time period is counted according to defect category to generate a time-series statistical analysis of classified defects; Based on the time-series statistical analysis of the classified defects, the density surge window is obtained during the period when the number of defects continuously exceeds the limit. Process offset timing analysis is performed during the density surge window to obtain the process offset sequence; The defect cause mapping is constructed by the temporal coupling relationship between the peak time of the process offset sequence and the start and end times of the density surge window.
7. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 1, characterized in that, The calibrated defect classification is obtained by quantifying the cause confidence through the defect cause mapping and the defect morphology classification, including: The process correlation strength of each defect is extracted using the defect cause mapping to obtain the cause correlation degree; The credibility of each defect in the defect morphology classification is obtained by quantifying the credibility of the causal correlation to obtain the credibility value of a single defect. The low-confidence defect is located by comparing the confidence value of the single defect with the confidence threshold. The calibration defect classification is obtained by correcting the group causal characteristics of the type to which the low-confidence defect belongs.
8. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 5, characterized in that, Using the area change rate distribution to separate the polarization stable region and the polarization sensitive region to generate an initial morphological classification, including: Based on the area change rate distribution, the polarization stable region and the polarization sensitive region are divided to determine the change discrimination boundary; The approximately invariant connected components are classified into the pinhole candidate set using the aforementioned change discrimination boundary. Using the aforementioned change discrimination boundary, connected regions with directional area changes are classified into a scratch candidate set; The candidate set of pinholes and the candidate set of scratches are combined to generate an initial morphological classification.
9. The method for detecting microscopic defects on the surface of electroplated aluminum according to claim 6, characterized in that, Process offset timing analysis is performed during the density surge window to obtain a process offset sequence, including: Within the density surge window, process parameters are captured by time slices to generate a process parameter snapshot; The process parameter snapshots are used to statistically analyze adjacent consecutive unidirectional offset segments to generate a set of unidirectional offset segments; Based on the set of unidirectional offset segments, the starting inflection point of the continuous offset is located to determine the trend inflection point; The process offset sequence is obtained by accumulating the parameter deviations between adjacent trend inflection points.
10. A device for detecting microscopic defects on the surface of electroplated aluminum, characterized in that, include: The polarization analysis unit is used to acquire polarization angle images of the electroplated aluminum surface, and to obtain polarization distortion feature maps and substrate texture maps by analyzing the specular highlight polarization distortion mode based on the polarization angle images. The depolarization depolarization sub-unit is used to calculate the depolarization ratio difference based on the base texture map to obtain a polarization difference image, use the polarization difference image to locate the abnormal depolarization ratio jump area to form a suspected defect location map, and cross-compare the suspected defect location map with the polarization distortion feature map to generate a polarization enhancement defect map. The texture exclusion unit is used to extract deep texture features based on the polarization enhancement defect map to generate a deep texture code, compare the deep texture code with the base texture map to exclude known foil textures and determine texture abnormal areas, and analyze the isotropic pinholes and the directionality of scratches from the texture abnormal areas to form a defect morphology classification. The cause tracing unit is used to obtain defect tracing records by matching the defect morphology classification with the production line process timestamp, construct a defect cause mapping by identifying density surge windows of the same type of defect from the defect tracing records, and obtain a calibrated defect classification by quantifying the cause confidence through the defect cause mapping and the defect morphology classification. The tolerance grading unit is used to obtain the defect tolerance boundary by matching the downstream tolerance according to the calibration defect classification, obtain the defect confidence level by comparing the defect tolerance boundary with the calibration defect classification grading threshold, and generate the defect detection result by performing confidence weighted grading based on the defect confidence level and the calibration defect classification.
