An online detection method for surface defects of aluminum veneer based on machine vision

CN122922082APending Publication Date: 2026-10-16SHANDONG HUANCAI NEW BUILDING MATERIALS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611166898.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0007]本发明的目的在于,针对现有技术在辊道输送条件下无法将非周期性高频微振动在高反光铝单板表面所引起的几何畸变与光度畸变相互解耦,致使振动反光伪影被误判为缺陷、微小三维缺陷因反光掩盖而漏检的问题,提供一种基于机器视觉的铝单板表面缺陷在线检测方法

Benefits of technology

[0022]由于反光与振动的影响已在进入网络之前被确定性地剥离,后端不必再以大容量网络拟合噪声分布,双分支轻量骨干配合交叉模态相位注意力融合即可完成检测,模型参数量与单幅推理时延随之下降,便于在常规工控机上满足在线检测的节拍要求。相位一致性惩罚项进一步要求凡被判为三维类别的预测框,其在三维振动相位特征图上的平均响应不得低于设定阈值,使分类结果与深度模态所提供的证据保持一致,减少了将二维暗斑判为凹坑一类的错误。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122922082A_ABST
    Figure CN122922082A_ABST
Patent Text Reader

Abstract

The application discloses an online detection method for surface defects of aluminum veneer based on machine vision. In view of the problems that the geometric and photometric distortion caused by the roller micro-vibration on the high-reflective plate surface is difficult to decouple, the reflective artifacts are mis-detected, and the three-dimensional micro-defects are missed, the method does not add vibration isolation and vibration measurement hardware, performs non-subsampled shearlet transform on a line array scanning image block and discards low-frequency components; the high-frequency directional subbands with opposite signs of the directional slope coefficients at the finest scale are segmented along the width direction to perform phase correlation, and the directional slope coefficients of each subband are solved to separate the conveying direction displacement and the normal jump; the normal jump is used to construct a reverse light intensity compensation gain to modify a gray field, and the gray field is resampled to an equal-interval grid according to the accumulated displacement to obtain a compensated albedo map; a three-dimensional vibration phase feature map is constructed by using the second-order difference of the normal jump and the second-order differential response of the gray field; and the defect category and position are output after the two are fused through cross-attention of a double-branch network. The method is suitable for an aluminum veneer continuous production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to aluminum panel surface defect detection technology, and in particular to an online detection method for aluminum panel surface defects based on machine vision. Background Technology

[0002] Aluminum single-panel panels are lightweight, weather-resistant, and easy to form, making them widely used in building curtain walls, rail transit vehicle interiors, and aerospace structural components for surface decoration and cladding. During cold rolling, extrusion molding, and surface coating and curing processes, aluminum single-panel panels are susceptible to surface defects such as scratches, pits, roll marks, rolling cracks, oxidation spots, water stains, and oil stains due to factors like the surface condition of the rolls, mold wear, dust adhesion, and coating leveling properties. These defects directly determine the product's appearance grade and corrosion resistance, requiring inspection and classification of each sheet, across the entire width and length, before the finished product leaves the production line. Because aluminum single-panel panels are wide, move quickly, and have a tight production cycle, area scan cameras are limited by their field of view and data bandwidth. Current online inspection generally uses a line scan camera to scan line by line along the width of the panel. A rotary encoder mounted at the end of the roller outputs pulses to trigger line exposure, which, combined with linear light source illumination and a deep learning target detection network, completes the location and classification of defects.

[0003] Aluminum single-layer panels have high surface reflectivity and a large proportion of specular reflection. To suppress the interference of reflections on imaging, existing solutions often invest heavily in the optical aspects. For example, they employ high dynamic range imaging, multi-angle stroboscopic light source fusion in bright and dark fields, or use coaxial incident illumination combined with light-shielding and light-transmitting films to uniformly distribute light. On the algorithmic side, they improve the network's ability to extract weak defect features from highly reflective backgrounds by increasing network depth, introducing attention modules, and multi-scale feature fusion structures. Such solutions can achieve good results under static or low-speed, stable conditions, but their success depends on the stability of the measured surface relative to the camera and light source during the imaging process.

[0004] Actual roller conveyor stations do not meet this premise. The thickness tolerance of the aluminum panel itself, the eccentric wear of the rollers and bearing clearance, the backlash of the transmission mechanism, and the inherent low-order bending modes of large-format thin panels collectively excite non-periodic high-frequency micro-vibrations with frequencies of approximately 5–50 Hz and amplitudes in the micrometer to millimeter range. The imaging mechanism of line-scan cameras, which uses line-by-line exposure, is extremely sensitive to motion smoothness. However, the rotary encoder only measures the macroscopic rotation angle of the rollers, which cannot reflect the relative slippage between the panel and the roller surface, nor can it detect the flexible flutter of the panel itself. Therefore, this vibration cannot be corrected using existing hardware synchronization mechanisms. More challenging is that the vibration has both geometric and photometric effects on imaging, and these two effects are coupled from the same source: displacement along the transport direction causes the actual line spacing of adjacent scan lines to be randomly stretched or compressed, resulting in local geometric distortion; although the magnitude of the jump in the direction perpendicular to the plate surface is very small, it is enough to change the relative relationship between the surface micro normal vector and the incident direction of the light source. Since the specular reflection lobes of highly reflective surfaces are extremely narrow, an angular perturbation on the order of 0.1° can cause a nonlinear jump in the intensity of reflected light, forming transient bright stripes or dark spots on the image.

[0005] To address the aforementioned phenomena, existing compensation methods generally follow two paths: one is to directly measure vibration and perform feedforward correction using external devices such as laser Doppler vibrometers; the other is to estimate the motion state using Kalman filtering algorithms in a global coordinate system and perform interpolation smoothing on the pixel rows. The former relies on additional hardware, which limits its cost and on-site installation conditions; the latter only handles pixel misalignment at the geometric level and is powerless against abrupt changes in photometric intensity, and the smoothing operation itself weakens the high-frequency edge features carried by minute scratches on the order of 0.1 mm in width. At the same time, commonly used Fourier transforms and discrete wavelet transforms lack directional selectivity, making it difficult to characterize directional textures extending along the rolling direction, and easily producing artifacts during coefficient domain reconstruction. The more fundamental difficulty lies in the fact that linear array imaging samples each physical scan line on the board surface only once. There is no redundant observation of the same physical location in the image stream. If each scan line is regarded as an unstructured one-dimensional sequence, the correlation operation performed on the signals of adjacent lines along the width direction can only give the relative displacement between the two in the width direction, and cannot give the line spacing change along the transport direction. Therefore, in order to invert the real displacement from the image itself without the aid of additional devices, it is necessary to find another information channel that can convert the motion in the transport direction into observable information. As a result, vibration reflection artifacts are treated as real defects by the back-end network, while real tiny three-dimensional defects are missed due to reflection masking or confusion with two-dimensional defect features such as water stains. In order to distinguish between the two, the network has to rely on a deeper backbone structure and a larger number of parameters to fit the noise distribution, and the inference delay increases accordingly, further squeezing the speed margin of online detection.

[0006] Therefore, the technical problem to be solved by the present invention is: how to decouple the geometric distortion and photometric distortion caused by the non-periodic high-frequency micro-vibration in the roller conveyor on the surface of the highly reflective aluminum single plate, under the condition of using only a conventional line scan camera and a linear light source, without adding vibration isolation devices or vibration measuring devices, so as to reduce false detection caused by vibration reflection artifacts and improve the detection rate of small three-dimensional defects. Summary of the Invention

[0007] The purpose of this invention is to address the problem that existing technologies, under roller conveyor conditions, cannot decouple the geometric and optical distortions caused by non-periodic high-frequency micro-vibrations on the surface of highly reflective aluminum panels, leading to the misjudgment of vibration reflection artifacts as defects and the failure to detect minute three-dimensional defects due to reflection masking. This invention provides an online defect detection method for aluminum panels based on machine vision. This method, using only a conventional linear scan camera and linear light source, without adding vibration isolation devices or vibration measuring devices, independently inverts the travel displacement along the conveying direction and the normal jump along the camera's optical axis from the image stream itself, thereby separating the two types of distortions. Simultaneously, it reconstructs the optical phase shift information carried by the vibration into an auxiliary mode characterizing the surface depth, thereby reducing false detections caused by vibration reflection artifacts and improving the detection rate of minute three-dimensional defects.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: A machine vision-based online detection method for surface defects in aluminum composite panels includes the following steps: S1. The aluminum single-plate to be inspected is scanned and imaged line by line along the width direction by a line scan camera in the roller conveyor, and transient image blocks are captured. S2. Perform a non-downsampled shear wave transform on the transient image block and discard the low-frequency approximation components. Select at least two components with non-zero directional slope coefficients and opposite signs from the high-frequency directional sub-bands at the finest scale as directional observation sub-bands. S3. Divide the one-dimensional signal of each of the two adjacent scanning lines on the observation sub-band in each direction into at least two segments along the width direction, and perform normalized cross power spectrum phase correlation on each segment to obtain the apparent lateral slip. Solve the equations by combining the directional slope coefficient of each sub-band with the lateral offset of the center of each segment relative to the optical axis, and separate the transient displacement and the relative change of imaging magnification between the two lines along the transport direction. Calculate the normal slip increment along the optical axis direction and accumulate it as the normal slip amount. S4. Construct a reverse light intensity compensation gain by multiplying the illumination translation line number equivalent to the normal jump amount by the normalized gray level gradient of the pixel. Multiply the gain element-wise with the gray level field of the transient image block to obtain a photometric compensation intermediate image. Then determine the actual sampling position of each scan line according to the cumulative value of the transient displacement. Resample the intermediate image along the transport direction to an equally spaced grid to obtain a compensation albedo image. S5. The second-order difference of the normal jump is expanded along the width direction after being saturated nonlinearly mapped, and multiplied element-wise with the absolute value of the second-order differential response of the gray field and normalized to obtain a three-dimensional vibration phase feature map and resampled to the equally spaced grid. S6. Input the compensated albedo and the three-dimensional vibration phase feature map into the first and second branches of the dual-branch convolutional neural network, respectively. Use the spatial weight matrix generated by the output features of the second branch to weight the output features of the first branch. Then, concatenate the weighted result and the output features of the second branch along the channel and send them into the detection head after convolution compression to output the defect category and location.

[0009] In the above technical solution, steps S2 and S3 utilize the directional selectivity provided by the non-subsampled shear wave transform: a non-zero directional slope coefficient is equivalent to the main passband direction of the high-frequency directional sub-band not being parallel to the width direction. For such sub-bands, the displacement of the plate surface along the transport direction will be converted into the apparent misalignment of its line signal along the width direction according to the directional slope coefficient of the sub-band. Therefore, the displacement component of the transport direction can be observed by only one-dimensional phase correlation along the width direction. By combining at least two directional observation sub-bands with opposite directional slope coefficients and segmented observation along the width direction, the lateral misalignment, amplification factor change, and transport direction deviation can be separated. The inter-row resolution is equivalent to the line exposure period of a line scan camera, thus reflecting the flexible flutter of the board material that the rotary encoder cannot perceive. Step S4 uses the separated normal jump to correct the abrupt change of the specular reflection component caused by the incident angle perturbation and the displacement of the illumination light band, and rearranges the row order using the separated transport direction displacement, so that the photometric distortion and geometric distortion are separated from the same gray field and do not interfere with each other. Step S5 uses the characteristic of the discontinuity of the normal vector at the edge of the three-dimensional defect to convert the vibration photometric abrupt change, which was originally an interference, into a sparse response characterizing the depth. Combined with the cross-modal weighting in step S6, it provides a criterion independent of the texture appearance for distinguishing between three-dimensional defects and two-dimensional defects.

[0010] As a preferred technical solution of the present invention, in step S1, each pixel row acquired is normalized according to the pre-acquired dark field reference and bright field reference, the normalized pixel row is stored in the first-in-first-out queue, and the transient image block is cropped from the first-in-first-out queue according to the set window height. A set number of overlapping areas are retained between two adjacent cropped transient image blocks. The row exposure of the line scan camera is triggered by the pulse output by the rotary encoder installed at the end of the roller shaft, and the conveying stroke corresponding to a single pulse is equal to the spatial resolution of the line scan camera along the width direction. The window height is 1024 rows, and the number of rows in the overlapping area is 256 rows. In step S3, the transient displacement and normal jump increment of each scan row located in the overlapping area use the results obtained in the previous transient image block. This time, the normalized cross power spectrum is only calculated for the newly added scan rows outside the overlapping area. Flat field normalization eliminates fixed-pattern noise introduced by pixel response inconsistency and illumination unevenness, so that the correlation between adjacent row signals is determined only by the microstructure of the plate surface; the setting of the overlapping area enables the cumulative displacement across transient image blocks to be continuously stitched, so that the slow-varying jitter components with a period longer than the window height can still be completely recovered, while reducing redundant calculations.

[0011] In a preferred embodiment of the present invention, in step S2, the directional slope coefficient is the ratio of the spatial frequency coordinate along the transmission direction to the spatial frequency coordinate along the width direction at the centroid of the two-dimensional amplitude spectrum energy of the high-frequency directional sub-band. A non-zero directional slope coefficient indicates that the main passband direction of the high-frequency directional sub-band is not parallel to the width direction. The non-subsampled shear wave transform is achieved by cascading a non-subsampled pyramid and a non-subsampled directional filter bank. The non-subsampled pyramid has three decomposition levels, with the finest scale divided into eight directions and the remaining scales divided into four directions. The directional observation sub-bands are selected from those with absolute values ​​of directional slope coefficients between 0.2 and 3.0 at the finest scale. The high-frequency direction sub-bands are observed, and their observation weights are determined according to the coefficient energy ratio of each observation sub-band. The coefficient energy ratio is the ratio of the sum of squares of the coefficients of the high-frequency direction sub-band to the sum of squares of the coefficients of all observation sub-bands in all directions. In step S3, the simultaneous solution is to perform a weighted least squares solution on all the apparent lateral displacements according to the observation weights. The slope coefficients of each direction and the lateral offset of each segment center relative to the optical axis of the linear array camera are known quantities. The lateral displacement increment along the width direction between two adjacent scanning lines, the relative change in imaging magnification, and the travel increment deviation along the transport direction are unknown quantities. The travel increment deviation is taken as the transient displacement. The non-downsampled pyramid does not contain a decimation operation, so each high-frequency directional subband has translation invariance and does not produce spectral aliasing under sub-pixel-level displacement disturbances; by limiting the range of values ​​for the directional slope coefficient, subbands whose main direction is nearly parallel to the width direction and therefore insensitive to the displacement of the transmission direction, as well as subbands whose main direction is nearly parallel to the transmission direction and therefore whose line signal is nearly constant, can be excluded, so that the simultaneous solution maintains good condition numbers.

[0012] In a preferred embodiment of the present invention, in step S3, the number of segments is 4 to 8, and each segment is divided into equal lengths along the width direction. After applying a Hanning window to the one-dimensional signal of each segment, a Discrete Fourier Transform is performed to calculate the normalized cross-power spectrum of two adjacent scan lines. An Inverse Discrete Fourier Transform is then performed on the normalized cross-power spectrum to obtain the phase correlation function. The apparent lateral slip is taken as the extreme point obtained by fitting a one-dimensional quadratic curve to the peak neighborhood of the phase correlation function. The one-dimensional quadratic curve fitting involves taking the integer peak position of the phase correlation function and one sampling point adjacent to each side, performing a parabolic fit, and correcting the integer peak position with the offset of the fitted extreme point relative to the integer peak position. The normal jump increment is the product of the relative change in imaging magnification and the difference between the object-side working distance of the line scan camera and the focal length of the imaging lens. Windowing suppresses the spectral leakage introduced by segment truncation, while parabolic fitting improves the resolution of the slip from whole pixels to sub-pixel level.

[0013] As a preferred technical solution of the present invention, based on the above windowing and sub-pixel fitting, in step S3, after obtaining the transient displacement and the normal jump increment, the following processing is performed on the two in sequence: using the mean of the peak sidelobe ratio of each phase correlation function as the confidence criterion, the results corresponding to the scan lines with the mean value lower than the set threshold are determined to be invalid, and the interpolation results of the valid scan lines before and after are used to supplement them; outliers are removed from the two supplemented sequences according to the 3-times standard deviation criterion and median filtering is performed; zero-phase digital bandpass filtering with a passband of 5~50Hz is applied to the two sequences after removing outliers, and the normal jump amount is obtained by accumulating the filtered normal jump increment line by line. The zero-phase digital bandpass filter does not introduce additional phase delay, ensuring that the transient displacement and the normal jump are both time-series corresponding to the pixel row. At the same time, the bandpass filter compresses the equivalent bandwidth of white noise from half of the row frequency to tens of hertz, reducing the random error in row-by-row estimation by more than an order of magnitude. This is a necessary step for the micrometer-scale inter-row displacement to be inverted from sub-pixel phase correlation.

[0014] As a preferred technical solution of the present invention, in step S4, the number of translation rows is the ratio of the product of the normal jump of the scanning row and the tangent of the incident angle of the linear light source to the nominal row spacing; the normalized gray-level gradient is the ratio of the spatial gray-level gradient of the pixel along the conveying direction to the gray-level value of the pixel; the reverse light intensity compensation gain is taken as an exponential function with the negative value of the product of the number of translation rows, the normalized gray-level gradient and a reflection damping coefficient as the exponent; the reflection damping coefficient is adaptively determined during the scanning process of the defect-free board surface after power-on, and its determination criterion is to minimize the variance of the average gray-level value of each scanning row in the effective detection area in the photometric compensation intermediate image relative to the total average value of the average gray-level values ​​of all rows in the transient image block, and obtain it through one-dimensional extreme value search within a set interval; the effective detection area is defined by searching for gray-level step positions along the width direction to determine the two sides of the aluminum single board, and shrinking inward by a set distance from the sides. The reflection damping coefficient varies depending on the surface treatment process, and is 0.6 to 1.2 for the sprayed surface.

[0015] In a preferred embodiment of the present invention, in steps S4 and S5, the resampling involves constructing cubic splines column by column along the transport direction using the actual sampling position as the interpolation node and taking values ​​on the equally spaced grid. The actual sampling position is determined by the cumulative value of the transient displacement and the nominal row spacing. In step S5, the output of the saturated nonlinear mapping monotonically increases with the increase of the absolute value of its independent variable and tends to the upper limit of saturation. Its value is the difference between 1 and the negative exponential function value of the ratio of the absolute value of the independent variable to the same scale constant. The scale constant is the median of the absolute values ​​of the second-order differences. The saturated nonlinear mapping avoids the scanning line corresponding to a few severe impacts from dominating the dynamic range of the entire three-dimensional vibration phase feature map.

[0016] As a preferred technical solution of the present invention, in step S6, the channel descriptor generated by the first branch output feature is used to perform multiplicative suppression on the second branch output feature, and the suppressed second branch output feature is concatenated with the weighted result along the channel; the first branch is composed of multi-level inverse residual modules stacked together, each level of the inverse residual module sequentially includes dimensionality-upgrading pointwise convolution, depthwise separable convolution for extracting spatial features, and dimensionality-reducing pointwise convolution, and outputs multi-scale feature tensors at 3 different downsampling ratios; the second branch is composed of a fully convolutional structure of no more than 4 layers, and a coordinate attention module is embedded after each layer. The coordinate attention module performs average pooling along the height and width directions of the feature map to obtain two direction-aware descriptors, and the attention weights in the two directions generated by the two direction-aware descriptors are multiplicatively weighted on the features of the layer. The channel descriptor generated by the first branch applies multiplicative suppression to the second branch, which can suppress spurious responses caused by residual noise in the depth mode; the coordinate attention module establishes long-range dependencies in two orthogonal directions, which is compatible with the distribution characteristics of the three-dimensional defects in the three-dimensional vibration phase feature map, which exhibit a slender and sparse response.

[0017] As a preferred embodiment of the present invention, based on the above-mentioned dual-branch structure, the total loss of the dual-branch convolutional neural network during the training phase is composed of a weighted sum of bounding box regression loss, classification loss, and a phase consistency penalty term. The phase consistency penalty term is calculated as follows: for each predicted box identified as a three-dimensional defect, the average response of the area covered by the predicted box on the three-dimensional vibration phase feature map is calculated. When the average response is lower than a set physical threshold, a penalty is applied based on the deficit of the average response relative to the physical threshold, and the larger of the number of predicted boxes identified as three-dimensional defects and 1 is used as the normalization denominator. The physical threshold is taken as the lower quantile of the average response within the actual three-dimensional defect annotation boxes in the training samples. Using the larger of the two as the normalization denominator ensures that the phase consistency penalty term is zero in batches without three-dimensional predicted boxes, thus avoiding undefined operations.

[0018] As a preferred embodiment of the present invention, the method further includes step S7: performing non-maximum suppression and cross-transient image block repetitive detection merging on the output of the detection head, representing the longitudinal position of each defect as the incremental pulse count of the rotary encoder relative to the head of the aluminum single board, and sending it along with the defect category and width coordinates to the programmable logic controller; the programmable logic controller uses the pulses output by the rotary encoder as the clock source of the high-speed counter, and resets the high-speed counter to zero when the photoelectric switch at the board head detects that the leading edge of the aluminum single board has reached the rejection station, and then triggers the corresponding rejection action every time the cumulative pulse count increment of the corresponding defect is reached; the rejection action is performed in stages according to defect category, driving the spray mark valve to mark the position of two-dimensional defects, and driving the sorting cylinder to push the aluminum single board away from the main line for three-dimensional defects that exceed the set size limit or density limit. Since each pulse corresponds to a constant conveying stroke, the trigger position of the rejection action is not affected by the fluctuation of the conveyor line speed.

[0019] Compared with existing technologies, this invention has the following advantages: This invention no longer relies on external devices to measure vibration, but instead retrieves vibration information from the image stream output by the linear scan camera itself. Since the exposure interval between adjacent scan lines is on the order of microseconds, the microstructure of the plate surface will not change within this interval, and adjacent lines maintain a strong correlation in the high-frequency sub-band. This invention further utilizes the directional selectivity provided by the non-subsampled shear wave transform: for high-frequency directional sub-bands where the main passband direction is not parallel to the width direction, the displacement of the plate surface along the transport direction will be converted into the apparent misalignment of its line signal along the width direction according to the directional slope coefficient of the sub-band, and thus it can be observed by only one-dimensional phase correlation along the width direction; by combining at least two directional observation sub-bands with opposite directional slope coefficients and cooperating with segmented observations along the width direction, the three motion components that were originally mixed together—lateral misalignment, magnification change, and transport direction deviation—can be separated to obtain inter-line displacement sequence and normal jump sequence synchronized with the actual vibration. This inversion is not subject to the inherent limitation that rotary encoders cannot detect flexible flutter, nor does it require the addition of vibration isolation platforms, vibration meters, or multi-frequency flash source controllers.

[0020] Based on the above inversion results, this invention first constructs an exponential inverse light intensity compensation gain matrix within the same acquisition row index domain, using the product of the normalized grayscale gradient and the illumination translation equivalent to the normal jump. This counteracts the jumps in specular reflection components caused by incident angle perturbation and illumination band displacement. Then, the row order is resampled to an equidistant grid according to the cumulative displacement in the transport direction, eliminating random stretching and compression of row spacing. The two corrections are driven by the normal jump and the transport direction displacement, respectively. They are physically non-overlapping and originate from the same inversion, separating the originally superimposed geometric distortion and photometric distortion from the same grayscale field. The bright bands and dark spots caused by vibration in the output compensated albedo are weakened, and the proportion of reflection artifacts judged as defects decreases accordingly.

[0021] The normal runout sequence obtained from the same inversion was also used to construct a three-dimensional vibration phase feature map. The surface normal vectors of flat areas and two-dimensional defects such as water stains and oil stains are continuous, and their reflected light intensity changes smoothly with the normal runout. However, the edges of pits, deep scratches, and rolling cracks exhibit discontinuous jumps in the normal vectors, resulting in sharp abrupt changes in reflected light intensity at the same amplitude. By multiplying the second-order difference of the normal runout sequence with the second-order differential response of the image and applying a saturated nonlinear mapping, this difference can be encoded into a sparse response map that is sensitive to depth but insensitive to planar texture. Based on this, a system equipped only with a monocular two-dimensional line scan camera obtains the physical basis for distinguishing between three-dimensional and two-dimensional defects, eliminating the need for a three-dimensional line laser profilometer or structured light device, and improving the detection rate of tiny three-dimensional defects with a width of less than 0.5 mm.

[0022] Since the effects of reflection and vibration are deterministically removed before entering the network, the backend no longer needs to fit the noise distribution with a large-capacity network. Detection can be completed by a lightweight dual-branch backbone combined with cross-modal phase attention fusion. The number of model parameters and the single-frame inference latency are reduced accordingly, making it easier to meet the cycle time requirements of online detection on conventional industrial control computers. The phase consistency penalty term further requires that the average response of any predicted box judged as a 3D category on the 3D vibration phase feature map must not be lower than a set threshold, ensuring that the classification results are consistent with the evidence provided by the depth modality and reducing the error of classifying 2D dark spots as pits.

[0023] In a comparative test on a continuous production line for cold rolling and spraying of aluminum alloy strip, compared with the scheme using single-stage bright and dark field compensation and conventional single-flow detection network, the average detection accuracy of the present invention increased from 81.3% to 95.6%, the detection rate of three-dimensional defects with a width of less than 0.5 mm increased from 64.7% to 93.2%, the false alarm rate decreased from 14.2% to 1.8%, the inference delay of a single 1024×4096 image decreased from 35 ms to 8 ms, the number of model parameters decreased by more than 60%, and no changes were made to the original camera and light source installation positions and electrical wiring. Attached Figure Description

[0024] Figure 1 is a flowchart of the online detection method for surface defects of aluminum single-panel according to the present invention; Figure 2 is a three-dimensional schematic diagram of the overall structure of the detection system in an embodiment of the present invention; Figure 3 is a partial three-dimensional schematic diagram of the imaging and illumination components in the detection station in an embodiment of the present invention. The front side plate of the light shield has been removed to show the internal components. Figure 4 is a block diagram showing the connection relationship of each module inside the electrical control cabinet in an embodiment of the present invention.

[0025] Reference numerals: 100, Conveyor roller; 110, Roller; 120, Servo motor; 130, Frame; 140, Guide roller; 150, Inspection gantry; 200, Linear scan industrial camera; 210, Imaging lens; 220, Camera adjustment mount; 300, Linear light source; 310, Light source bracket; 320, Constant current drive power supply; 330, Light shield; 400, Edge computing industrial computer; 410, Geometric perception engine; 420, Photometric reconstruction engine; 430, Intelligent inference. Engine; 431, Surface Texture Flow Branch; 432, Depth Topology Flow Branch; 433, Cross-Modal Phase Attention Fusion Module; 434, Phase Consistency Detection Head; 440, Image Acquisition Interface Card; 500, Programmable Logic Controller; 510, Electrical Control Cabinet; 600, Defect Removal Execution Mechanism; 610, Marking Valve; 620, Sorting Cylinder; 630, Board Head Detection Photoelectric Switch; 700, Rotary Encoder; 800, Human-Machine Interaction Terminal; 900, Aluminum Single Panel. Detailed Implementation

[0026] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments are only some embodiments of the present invention, and not all embodiments. Other equivalent modifications or variations obtained by those skilled in the art without creative effort all fall within the protection scope of the present invention. For ease of description, the symbols used herein... The unified representation of element-wise multiplication between two matrices of the same dimension is indicated by the symbol... The symbol represents a convolution operation, the superscript asterisk indicates complex conjugation, and the double vertical lines indicate concatenation along the channel dimension.

[0027] As shown in Figure 2, the implementation site of the method described in this embodiment is located at a continuous conveying station after the cold rolling, extrusion, or surface spraying and curing processes of aluminum single panels. This station is connected upstream to the discharge end of the cold rolling mill, the traction discharge section of the extruder, or the discharge end of the spraying and curing oven, and downstream to the fixed-length shearing, film coating, or stacking receiving station. Aluminum single panels 900 pass through the inspection field of view continuously or in a step-by-step manner within this interval. The main mechanical component of the station is a conveyor roller conveyor 100, which includes multiple rollers 110 arranged sequentially along the conveying direction, a servo motor 120 driving the rollers 110 to rotate synchronously, and a frame 130 supporting the above components. The roller 110 has a diameter of 127.3 mm, i.e., a roller circumference of 400 mm. The roller is coated with a polyurethane layer with a Shore hardness of approximately 90 HA to prevent scratching the decorative surface of the aluminum panel 900. The roller spacing in the standard section is 300 mm, while within 1.2 m before and after the inspection field of view, the roller spacing is reduced to 150 mm to minimize the overhang and deflection of the aluminum panel 900 due to its own weight. A servo motor 120 drives several rollers 110 via a synchronous belt reduction mechanism; the remaining rollers 110 are driven support rollers. The conveying linear speed of the aluminum panel 900 can be steplessly adjusted between 0.5 and 2 m / s. Guide rollers 140 are also provided on both sides of the frame 130. The guide rollers 140 press against the upper surface edge of the aluminum panel 900 with a constant, slight pressure to limit lateral deviation of the panel and provide limited constraint on macroscopic warping. It should be noted that the guide roller 140 is a standard configuration of roller conveyor lines. It can only suppress low-frequency large-amplitude plate shape fluctuations and has no substantial effect on the high-frequency flexible flutter targeted by this invention. This invention does not require any precision modification to the guide roller 140.

[0028] A detection gantry 150 is installed above the detection field of view of the conveyor roller 100, as shown in Figure 2. The two columns of the detection gantry 150 are fixed to the two sides of the frame 130, and its crossbeam spans the full width of the aluminum single plate 900 along the X-axis. T-slots are provided on the crossbeam for adjusting the position of the imaging and illumination components. The specific arrangement of the imaging and illumination components on the detection gantry 150 is shown in Figure 3. To clearly show the above components, the front side plate of the light shield 330 has been removed in Figure 3. As shown in Figure 3, the line scan industrial camera 200 is mounted on the crossbeam of the detection gantry 150 via the camera adjustment seat 220. The camera adjustment seat 220 has a fine adjustment capability of three degrees of freedom: pitch, yaw, and lateral translation, to ensure that the optical axis of the line scan industrial camera 200 is strictly perpendicular to the surface of the aluminum single plate 900 to be inspected. In this embodiment, the line scan industrial camera 200 is a single-line scan industrial camera with 8192 pixels and a pixel size of 7 μm. Therefore, its effective length of photosensitive surface along the X direction is 57.3 mm, and its maximum horizontal frequency is not less than 26 kHz. The data interface adopts a coaxial high-speed interface or a camera link interface. The front end of the line scan industrial camera 200 is equipped with an imaging lens 210. The focal length of the imaging lens 210 is 50 mm, and the object-side working distance is set to 765 mm, corresponding to an optical magnification of approximately 0.07. Based on this, the resulting lateral field of view is approximately 820 mm, and the lateral spatial resolution is approximately 0.1 mm / pixel. For an aluminum single plate 900 with a width of 1600 mm, two line scan industrial cameras 200 are placed side by side along the X-axis. The fields of view of the two cameras retain an overlap area of ​​approximately 20 mm in the middle of the width for image stitching and coordinate verification. For narrow plates with a width of no more than 800 mm, a single line scan industrial camera 200 can cover the area. The purpose of selecting a horizontal resolution of 0.1 mm / pixel is to ensure that even a tiny scratch with a width as low as 0.1 mm can still occupy at least one complete pixel, and to ensure that a three-dimensional micro-dimple on the order of 0.5 mm and the roller print have a span of more than 5 pixels on the imaging surface, thereby reserving sufficient space sampling margin for subsequent depth mode decoupling.

[0029] As shown in Figure 3, the lighting section consists of a linear light source 300, a light source bracket 310, a constant current drive power supply 320, and a light shield 330. The linear light source 300 is a high-brightness white light-emitting diode linear light source with an effective illumination length of 1800 mm and a color temperature of 6500 K. After being focused by a cylindrical lens, it forms a high-brightness light band with a width of about 3 mm on the board surface. The linear light source 300 is fixed to the inspection gantry 150 by the light source bracket 310. Its emission direction forms a 45° angle with the surface normal of the aluminum single plate 900. The distance from the center of the light source to the board surface is 220 mm. It is arranged only on the downstream side of the linear industrial camera 200 along the conveying direction, forming asymmetrical angled lighting. The asymmetrical arrangement, rather than a symmetrical arrangement of light and dark fields, is used because symmetrical lighting causes the anisotropic reflections of the surface microstructure to cancel each other out, thus weakening the high-frequency texture contrast that this invention relies on to invert vibration displacement. Asymmetrical lighting, on the other hand, allows the brushed texture, sprayed particles, and micro-undulations on the surface of the aluminum single panel 900 to form a clearly directional modulation in the grayscale field. The constant current drive power supply 320 provides a constant current output with a ripple of less than 1% for the linear light source 300 and supports synchronous gating with the line exposure signal of the linear industrial camera 200 to compress the single-line exposure time to 20 μs at a line frequency of 20 kHz while still maintaining sufficient light intake. As shown in Figure 2, the light shield 330 is placed around the detection gantry 150 and extends downwards to a position close to the panel surface to isolate interference from workshop overhead lights, natural light from the skylight, and arc light from adjacent workstations. Its inner wall is treated with a matte black finish.

[0030] The rotary encoder 700 is coaxially mounted on the shaft end of a driven roller 110 in the conveyor roller 100. The signal connection between it and the module inside the cabinet is shown in Figure 4. The rotary encoder 700 is an incremental encoder with 4000 pulses per revolution. Since the circumference of the roller surface of the roller 110 is exactly 400 mm, its single output pulse corresponds to a roller surface arc length of 0.1 mm. After isolation and shaping, one of these pulses is used as the line trigger signal of the linear industrial camera 200, so that the nominal line spacing and lateral resolution of the image are consistent with 0.1 mm, which corresponds to a line frequency of 20 kHz at a linear velocity of 2 m / s. The other pulse is introduced into the high-speed counter input of the programmable logic controller 500 for position tracking of the downstream actuator. It must be emphasized that the rotary encoder 700 in this invention only performs the conventional function of macroscopic travel distance tracking. It measures the rotational angular displacement of the roller 110. It cannot sense the relative slippage between the aluminum single plate 900 and the roller 110 caused by slippage, nor can it capture the high-frequency flutter of the aluminum single plate 900 as a flexible thin plate in space. This is the fundamental limitation of the existing hardware synchronization mechanism, and it is also the direct motivation for this invention to rely on algorithms to invert the real displacement from the image itself.

[0031] As shown in Figure 2, the electrical control cabinet 510 is placed on one side of the inspection gantry 150. The cabinet houses the edge computing industrial control computer 400 and the programmable logic controller 500. The connection relationships between the modules within the cabinet and between the modules and peripheral devices are shown in Figure 4. In Figure 4, solid arrows indicate the data flow within the electrical control cabinet 510, and dashed arrows indicate the signal connections between the modules and peripheral devices. The edge computing industrial control computer 400 receives the pixel row data stream output from the linear scan industrial camera 200 through the image acquisition interface card 440. It is internally configured with a graphics processing unit supporting tensor operation acceleration and at least 32 GB of system memory to carry all the decoupling and inference logic of this invention. Its internal functional structure is shown in Figure 4 in the form of functional blocks. The decision result of the edge computing industrial control computer 400 is sent to the programmable logic controller 500 via industrial Ethernet. As shown in Figure 4, one input interface of the programmable logic controller 500 is connected to the pulse signal output by the rotary encoder 700 and isolated and shaped, which serves as the clock source for its high-speed counter. The other input interface is connected to the board head position signal output by the board head detection photoelectric switch 630. The output interface of the programmable logic controller 500 is connected to the spray mark valve 610 and the sorting cylinder 620 respectively, thereby driving the defect rejection actuator 600 to perform the corresponding rejection action. The defect rejection actuator 600 is located 4.5 m downstream of the linear industrial camera 200. It includes a marking valve 610 for marking defect locations, a sorting cylinder 620 for pushing the entire defective board away from the main line, and a board head detection photoelectric switch 630 installed adjacent to the upstream side of the station. The sorting cylinder 620 spans above the conveyor roller 100, as shown in Figure 2. The board head detection photoelectric switch 630 is a through-beam photoelectric switch, used to output a rising edge signal when the leading edge of each aluminum single-panel 900 reaches the station. As shown in Figure 2, the human-machine interface terminal 800 is mounted on the door of the electrical control cabinet 510 via a support arm and is communicatively connected to the edge computing industrial control computer 400. The communication connection between the two is shown by a bidirectional dashed arrow in Figure 4. The human-machine interface terminal 800 is used to display real-time detection images, defect statistics reports, and manual intervention input for various calibration parameters. For ease of consistent description, a global coordinate system is defined here: the optical axis of the line scan industrial camera 200, which is perpendicular to the surface of the aluminum single panel 900, is defined as the Z-axis; the pixel arrangement direction of the line scan industrial camera 200, which is across the width of the aluminum single panel 900, is defined as the X-axis; and the conveying direction of the aluminum single panel 900 is defined as the Y-axis.

[0032] Under the aforementioned mechanical and electrical architecture, the aluminum panel 900 inevitably experiences non-periodic high-frequency micro-vibrations when passing through the detection field of view. The causes are complex: the inherent thickness tolerance of the aluminum panel 900 causes periodic lifting and falling as it passes adjacent rollers 110; after long-term use, rollers 110 inevitably experience eccentric wear and bearing clearance, resulting in micrometer-level random fluctuations in the roller surface's radius of rotation; the backlash in the synchronous belt drive and reduction mechanism induces speed pulsations under load disturbances; and as a large-format, thin-walled flexible component, the aluminum panel 900's natural modal frequencies fall precisely in the range of several hertz to tens of hertz, making it highly susceptible to resonance in its low-order bending modes from the aforementioned excitations. Actual measurements show that the vibration frequency is mainly distributed between 5 and 50 Hz, with displacement amplitude in the Y-axis direction ranging from several micrometers to 0.3 mm, and runout amplitude in the Z-axis direction reaching 0.5 mm or even higher. This level of vibration has a dual destructive effect on imaging. Geometrically, a Y-axis jitter with a frequency of 50 Hz and an amplitude of 0.3 mm corresponds to an instantaneous velocity disturbance peak of 94 mm / s, resulting in approximately 4.7% line spacing modulation relative to a nominal transmission speed of 2 m / s. Its peak-to-peak displacement of 0.6 mm is equivalent to 6 pixel rows, directly manifesting as local stretching and compression of the image along the Y direction. In terms of luminosity, while a 0.5 mm jump in the Z direction is negligible in depth, relative to a light source distance of 220 mm, it causes a deflection of approximately 0.13° in the incident angle of the linear light source 300 relative to the board surface. Since the half-width at half-maximum (FWHM) of the specular reflection lobes on a sprayed or rolled aluminum surface is typically only about 1.5°, this tiny deflection is sufficient to cause a jump of tens of percentage points in the specular reflection component, manifesting as transient bright bands or dark spots in the image. Simultaneously, this jump, relative to an object-side working distance of 765 mm, also results in an image magnification increase of approximately 7 × 10⁻⁶. -4 The change in normal runout causes a lateral shift of nearly 3 pixels at the edge of the image width. It is worth noting that this change in magnification caused by normal runout, while itself a type of distortion, simultaneously constitutes a considerable measurement of the normal runout amount. This invention uses this measurement to invert the Z-axis runout in step S300, thus eliminating the need for any vibration measurement device. The aforementioned geometric distortion and photometric distortion are temporally co-originating and spatially coupled, which is the physical root cause of the high false detection rate in conventional detection schemes.

[0033] This invention does not attempt to circumvent the aforementioned interference by adding an active vibration isolation platform, a multi-frequency flash source controller, or a three-dimensional line laser profilometer, but rather resolves it entirely at the software level of the edge computing industrial control computer 400. To this end, as shown in Figure 4, the edge computing industrial control computer 400 has a geometric perception engine 410, a photometric reconstruction engine 420, and an intelligent inference engine 430 sequentially deployed in series. The pixel row data stream received by the image acquisition interface card 440 is first sent to the geometric perception engine 410. The geometric perception engine 410 is responsible for retrieving the inter-row displacement sequence of transient micro-vibrations along the transport direction and the normal jump sequence along the camera optical axis from the distorted image stream itself. The photometric reconstruction engine 420 is responsible for separating the geometric deformation and photometric abrupt change from the original grayscale field based on the displacement sequence and reconstructing them into two modes with non-overlapping physical meanings, namely the compensated albedo map and the three-dimensional vibration phase feature map. The intelligent inference engine 430 completes the location, classification and physical self-consistency verification of defects under dual-modal input. It further includes a surface texture flow branch 431, a deep topology flow branch 432, a cross-modal phase attention fusion module 433 and a phase consistency detection head 434. The compensated albedo map is sent to the surface texture flow branch 431, and the three-dimensional vibration phase feature map is sent to the deep topology flow branch 432. The output features of the two branches are fused in the cross-modal phase attention fusion module 433 and then sent to the phase consistency detection head 434 to output the category and location of the defect.

[0034] Before being put into online testing, the system needs to complete a power-on calibration. This calibration is initiated by the human-machine interface terminal 800 and automatically executed by the edge computing industrial control computer 400. The calibration includes three items. The first item is response consistency correction, which involves acquiring a dark field reference under the conditions that the light shield 330 is completely closed and the linear light source 300 is turned off. Then, under the condition of placing a standard diffuse white board, a bright field reference was collected. Subsequently, the original grayscale values ​​of each line captured by the 200 linear industrial camera were processed according to...

[0035] Normalize the flat field, where For the 200 linear scan industrial camera in the first The trigger time for each row is at the [number]th [time]. The raw pixel grayscale value directly output from each pixel. and The first The grayscale reference recorded for each pixel in dark and bright field calibration varies only with the pixel number and is independent of the row number. These are the normalized grayscale values ​​used in subsequent steps. The target grayscale reference is set to 200. This correction eliminates fixed-mode noise caused by inconsistent pixel response, vignetting of the imaging lens 210, and uneven illumination along the X-direction from the linear light source 300, preventing these static errors from being mistakenly identified as dynamic distortion in subsequent gradient calculations. The second step is geometric calibration, which uses a calibration ruler with millimeter grids on the conveyor roller 100 to determine the actual millimeter-per-pixel ratio in the X-direction and the stitching offset between the fields of view of the two linear industrial cameras 200. The third step is edge positioning and effective area definition, which involves searching for the double-sided step positions of grayscale along the X-direction within each sliding window to determine the two sides of the aluminum single-panel 900, and monitoring the grayscale step between the background and the panel surface along the Y-direction to determine the scanning lines at the beginning and end of the panel. Simultaneously, the effective detection area is shrunk inwards by 10 mm from the sides to eliminate spurious responses introduced by edge burrs, roller background, and edge reflections.

[0036] Referring to Figure 1, after calibration, the edge computing industrial control computer 400 enters an infinite loop online detection process. This process includes, in sequence, image stream acquisition and sliding window capture step S100, multi-scale multi-directional high-frequency decomposition step S200, transient sub-pixel displacement sequence inversion step S300, photometric compensation and geometric resampling step S400, three-dimensional vibration phase feature map construction step S500, dual-modal collaborative reasoning step S600, and defect removal linkage step S700.

[0037] In the image stream acquisition and sliding window capture step S100, the geometry perception engine 410 maintains a first-in-first-out circular buffer queue in the video memory of the edge computing industrial control computer 400, continuously receiving pixel rows from the line scan industrial camera 200 via the image acquisition interface card 440, and applying the aforementioned flat-field normalization to each row in real time. When the number of newly added pixel rows in the queue reaches a set value, the geometry perception engine 410 captures a window with a size of... Transient image patch ,in For the horizontal pixel index of the 200 linear scan industrial camera, The scan line numbers are arranged chronologically and correspond to the physical advance direction along the Y-axis. This embodiment uses... , This means that a single window covers a plate length of 102.4 mm in the Y direction, corresponding to a time span of 51.2 ms at a linear velocity of 2 m / s. A 256-row overlap zone is set between adjacent windows, meaning only 768 new rows are advanced per cycle. The overlap zone is designed for three reasons: to prevent the displacement sequence from breaking at the first row of the window due to the lack of a previous row as a reference; to allow slowly varying flutter components with frequencies as low as 5 Hz and periods as long as 4000 rows to be fully recovered through cross-window accumulation of displacement increments from adjacent windows, thus removing the constraint that the window height must be greater than the minimum vibration period; and to ensure that long, strip-shaped scratches crossing the window boundary can be fully observed within at least one window.

[0038] In the multi-scale, multi-directional high-frequency decomposition step S200, the geometric perception engine 410 processes transient image patches. A non-downsampled shear wave transform is performed. This transform, rather than other multi-scale tools, is chosen based on the imaging characteristics of the 900mm surface of the aluminum single-layer plate: its surface is naturally covered with random microstructures such as cold-rolled wire drawing textures, sprayed particles, and abrasive residues. These microstructures are highly similar between adjacent scan lines, which are precisely the natural feature markers required for displacement inversion. However, the discrete wavelet transform only has selectivity in three directions: horizontal, vertical, and diagonal, making it difficult to characterize the continuous angular distribution of the wire drawing texture along the rolling direction. Although the contour wave transform has good directionality, its decomposition involves downsampling operations and lacks translation invariance. Under the small translation of sub-pixel perturbation, it is prone to spectral aliasing and leaves artifacts in the coefficient domain. More importantly, as described in step S300 below, this invention relies on the difference in the main directions of the passbands of each high-frequency subband to separate the transport direction displacement and lateral misalignment. The selected transform must simultaneously possess fine directional subdivision capability and strict translation invariance; neither can be lacking. The non-subsampled shear wave transform consists of a cascaded non-subsampled pyramid and a non-subsampled directional filter bank. The non-subsampled pyramid, based on the hole algorithm, only upsamples the filter by inserting zeros at each stage without decimating the image. Decomposed into a low-frequency approximate component The high-frequency detail components at each scale are further subdivided into several directional subbands by the non-downsampled directional filter bank using a shearing matrix. The relationship between these subbands and the high-frequency detail components at each scale can be expressed as follows:

[0039] In the formula The first notation of the non-downsampled pyramid Level-scale decomposition operator, It represents the scale series, and the smaller the value, the finer the scale. Indicates the non-downsampling directional filter bank at the th Partitioning operators in each direction, For direction index, For the first Level scale, first The high-frequency subband coefficient matrix in each direction, its size is... The same applies. In this embodiment, the scale level is set to 3, with the finest scale divided into 8 directions, and the second finest and coarsest scales each divided into 4 directions. The geometry perception engine 410 actively discards low-frequency approximate components. Because this component mainly carries information unrelated to vibration, such as the slow drift of ambient light, the brightness attenuation of the linear light source 300, and the uneven background color of the aluminum panel 900, retaining it actually dilutes the signal-to-noise ratio of the displacement estimation. For the eight directional sub-bands at the finest scale, the geometric perception engine 410 no longer weights and fuses them into a single matrix, but retains them one by one, and determines two scalars for each sub-band: the observation weight and the directional slope coefficient. The observation weight is taken as the proportion of the energy of the sub-band coefficient in the total energy of the observed sub-band coefficients in all directions, according to the following formula.

[0040] In the formula For the first The normalized energy weight of each observation subband is the observation weight. To use the dummy element direction index for summation, traverse the set of direction observation sub-bands. Directional slope coefficient The ratio of the spatial frequency coordinates along the Y direction to the spatial frequency coordinates along the X direction at the energy centroid of the two-dimensional amplitude spectrum of the sub-band is taken. Its nominal value is uniquely determined by the shearing parameters of the non-downsampling directional filter bank. In practice, it can also be directly statistically analyzed from the sub-band spectrum block by block to adapt to changes in the board surface texture. In this embodiment, the directional slope coefficients of the 8 directional sub-bands are approximately 0, ±0.4, ±1.0, ±2.4 and tend to infinity, respectively. The geometric perception engine 410 only takes the sub-bands whose absolute values ​​fall within the range of 0.2 to 3.0 as directional observation sub-bands: those with too small an absolute value have a passband main direction that is almost parallel to the X-axis, and as mentioned later, they are not sensitive to displacement along the Y direction; those with too large an absolute value have a line signal that is almost constant along the X direction, and the peak shape of the one-dimensional phase correlation is too flat to be located. Among the 6 sub-bands that fall within this range, this embodiment further selects the 4 with the highest energy proportion to participate in subsequent calculations. It is particularly important to note that the cold-rolled wire drawing texture extends along the rolling direction, i.e., the Y-direction. Its spatial wave vector is almost parallel to the X-axis, and its directional slope coefficient tends to be zero, yet its energy coefficient is often the highest among the various directional sub-bands. If, in the conventional approach, the directional sub-bands are weighted and fused into a single matrix according to their energy proportions, the direction least sensitive to displacement in the conveying direction will occupy the largest weight. This is precisely why this invention retains the phase correlation calculation for each directional sub-band separately without fusion. As an equivalent implementation with lower computational complexity, the directional observation sub-bands can also be divided into two groups according to the sign of the directional slope coefficient. Within each group, the directional observation sub-bands can be weighted and fused into a two-directional comprehensive high-frequency texture matrix according to their energy proportions. The equivalent directional slope coefficient obtained by the energy-weighted average within the group can then be used in subsequent solutions. This approach can reduce the number of phase correlations by half, at the cost of a slight decrease in the condition number of the solution.

[0041] In the transient subpixel displacement sequence inversion step S300, the geometry sensing engine 410 utilizes the physical fact that the single-line exposure time of the linear industrial camera 200 is only 20 μs, meaning that the microstructure of the plate itself cannot undergo any change within such a short interval, and therefore the physically adjacent subpixel displacement sequence inversion step S300 is determined by the fact that the microstructure of the plate itself cannot undergo any change within such a short interval. Line and number The rows exhibit a strong correlation in high-frequency microstructures, and all shifts between them can be attributed to the vibration at that instant. Here, it's necessary to clarify an easily overlooked observability issue: linear array imaging samples each physical scan line on the board surface only once; there is no redundant observation of the same physical location within the image stream. If each scan line is considered merely an unstructured one-dimensional random sequence, then the one-dimensional phase correlation between adjacent line signals along the X direction, according to the Fourier translation theorem, can only give the relative shift along the X direction, not the row spacing change along the Y direction. This invention enables the inversion of the displacement in the Y direction from a one-dimensional operation along the X direction, not from the one-dimensional signal itself, but from the definite directionality of the board surface texture. Let the first... Observation sub-bands in each direction Locally, it can be approximated by the spatial wave vector as follows: The narrowband two-dimensional oscillation, then its first... The phase of the line signal at the frequency corresponding to the wave vector is In the formula and The first The physical positions of the plate surface in the X and Y directions at the moment of line imaging. Based on this, the first... Line and number A one-dimensional phase correlation is performed on the corresponding segments of the row, and the resulting peak position is considered to satisfy the lateral displacement.

[0042] In the formula For the first The observation sub-band in each direction is in the... Apparent lateral displacement measured on each segment, in pixels; This is the directional slope coefficient of the sub-band; This represents the lateral displacement increment of the plate surface along the X direction between two adjacent rows; This represents the relative change in magnification between two adjacent rows. For the first The lateral offset of the center of each segment relative to the 200 optical axis of the line scan industrial camera, in pixels; This represents the actual travel distance along the Y direction on the board surface between two adjacent rows, expressed in pixels, where 1 corresponds to the nominal row spacing determined by the rotary encoder 700. , This represents the deviation of the actual travel distance from the nominal value, i.e., the transient displacement along the conveying direction to be inverted. As can be seen from this formula, as long as... Non-zero, the travel deviation along the Y direction is as follows The apparent displacement along the X-direction is incorporated into the measurement, thus becoming a one-dimensional phase-correlated observable quantity. This is the fundamental reason why this invention uses a non-downsampled shear wave transform with fine directional subdivision capabilities and retains subbands in each direction without energy-weighted fusion. Simultaneously, it can be seen that a single subband or single segment provides an observable quantity that simultaneously contains... , and Since there are three unknowns, it is necessary to construct an overdetermined system of equations using multiple observation sub-bands with different directional slope coefficients and multiple segments with different lateral positions in order to separate the three: two sub-bands with opposite signs of directional slope coefficients. The response signs are opposite, while the segments located on opposite sides of the optical axis are... The response signs are opposite, and together they ensure that the equation system has good condition numbers. If the texture of the plate surface in a certain local region is exactly isotropic and lacks usable directionality, the solution of the corresponding scan line will be judged as invalid by the confidence criterion described later, and will be supplemented by the interpolation results of the valid lines before and after it.

[0043] Specifically, to suppress spectral leakage caused by segment truncation, the geometric perception engine 410 first divides the observation subbands in each direction... Each row is divided into equal parts along the X direction. Each segment (in this embodiment, we take...) (4, 2048 pixels per segment), apply a Hanning window to each segment, and then perform a one-dimensional discrete Fourier transform on the corresponding segments of adjacent rows to obtain the results. and And calculate the normalized cross-power spectrum.

[0044] In the formula This is the discrete spatial frequency index along the X direction, and its value range is... , and The first Line and number The one-dimensional discrete Fourier transform coefficients of the high-frequency signal after segmentation and windowing. For the normalized cross-power spectrum, To prevent extremely small positive numbers with a denominator of zero, take .right The phase correlation function is obtained by performing an inverse discrete Fourier transform. ,in For frequency index The spatial displacement independent variable of conjugate, in pixels, represents the first... row relative to the first The hypothetical fault along the X direction. This function exhibits a significant Dirac pulse peak at the actual fault location. Since the phase correlation function is a one-dimensional sequence, its peak neighborhood can only be fitted by a one-dimensional quadratic curve, let the integer peak position be... By fitting a parabola to its three neighboring points and finding the extreme points, the sub-pixel level apparent lateral displacement of that segment can be obtained.

[0045] In the formula For the first The observation sub-band in each direction is in the... The sub-pixel-level apparent lateral displacement measured on each segment, in pixels, and its relationship with the motion components between adjacent rows constitute the aforementioned observation model. When the signal-to-noise ratio is low, Gaussian curve fitting can be used instead, as it has less stringent requirements for peak symmetry. The apparent lateral displacement corresponding to all observation sub-bands and all segments on the same row is substituted into the observation model, using the observation weights of each observation sub-band. Peak-to-sidelobe ratio of the phase-correlated peak in this segment The product is the weight, and the solution is obtained by weighted least squares.

[0046] In the formula For the set of directional observation sub-bands, The number of segments, and The values ​​are the observation weights and the peak-to-sidelobe ratio of the phase correlation peak in that segment, respectively, with the residuals of the observation model represented in square brackets. The solution that minimizes the above equation represents the lateral slip increment, the change in relative magnification, and the transient displacement along the transport direction for that scan line. Since the residuals are linear with respect to the three unknowns, this solution can be directly given by the ternary normal equation without iteration. Traversing all rows within the sliding window yields the non-periodic vibration geometric displacement sequence within that time window. ,in And agreed The results at the end of the overlapping area are used to connect adjacent windows. Considering that the frequency of the inverted vibration component does not exceed 50 Hz while the line frequency is as high as 20 kHz, in order to further reduce the amount of computation, this embodiment performs the above solution once every 4 lines, and then uses cubic spline interpolation to supplement the remaining lines. Its equivalent sampling rate is still 5 kHz, which is much higher than the 100 Hz required for twice the highest vibration frequency. Therefore, the amount of phase-related computation is reduced to one-quarter without losing any frequency components. At the same time, the relative amplification change obtained in the same solution is converted into normal jump increment by the following formula and accumulated line by line to obtain the normal jump sequence.

[0047] In the formula This represents the normal jump increment between two adjacent rows along the camera's optical axis. For the working distance of the object, The focal length of the imaging lens 210, For the first The normal runout of the plate surface relative to its nominal position at the moment of line imaging, operator This refers to a zero-phase digital bandpass filter with a passband of 5-50 Hz. Its function is to filter out the random walk drift introduced by line-by-line accumulation and the macroscopic fluctuations of the plate shape, retaining only the high-frequency flutter component targeted by this invention. In this embodiment... Take 765 mm, Taking 50 mm, a normal runout of 0.5 mm corresponds to approximately 7 × 10⁻⁶ mm. -4 The relative magnification change results in an apparent lateral shift of approximately 2.9 pixels at a distance of 4096 pixels from the optical axis, far exceeding the subpixel resolution of phase-correlated data. In terms of accuracy, the subpixel error of single-segment phase-correlated data is approximately 0.05 pixels, while the interline displacement increment corresponding to a Y-axis jitter with a frequency of 50 Hz and an amplitude of 0.3 mm is approximately 4.7 μm, or 0.047 pixels, which are comparable in magnitude. However, the inverted displacement sequence is confined to a narrow band of 5–50 Hz, while the line frequency is as high as 20 kHz. The bandpass filter compresses the equivalent bandwidth of the white noise by more than two orders of magnitude, and the estimated equivalent random error decreases by more than one order of magnitude. The root mean square error of the measured interline displacement increment is approximately 0.005 pixels, or 0.5 μm, which is sufficient to support the reconstruction of jitter on the order of 0.3 mm amplitude. This is precisely why zero-phase filtering must be used: any additional phase delay will cause the displacement sequence to be mismatched with the pixel row in time, thereby causing subsequent photometric compensation to fail.

[0048] To ensure the reliability of the two sequences, the geometric perception engine 410 applies three levels of post-processing: First, the mean of the peak-to-sidelobe ratio of each segment's phase correlation peak is weighted according to the observation weights and used as the confidence criterion. When the mean of a certain row is lower than a set threshold, it is determined that the row falls into a textureless specular highlight saturation area or a material shortage area, and its result is not accepted. Instead, it is supplemented by cubic spline interpolation of the previous and next valid rows. Then, residual outliers are removed using a 3-standard deviation criterion, and a 5-point median filter is applied. Finally, the sequence is processed by a zero-phase digital bandpass filter with a passband of 5~50 Hz to filter out the slow drift caused by the 700 frequency division error of the rotary encoder and the phase-related quantization noise. Since there is an overlap of 256 rows between adjacent windows, the results of each row in the overlapping area have been obtained in the previous window. This window only needs to perform calculations on the 768 newly added rows, and the results of the overlapping area are directly reused.

[0049] In the photometric compensation and geometric resampling step S400, the photometric reconstruction engine 420 receives the displacement sequence. With normal jump sequence And perform dual corrections for both photometric and geometric properties. It is important to note the order of these two corrections: both sequences are given using the acquisition row index of the 200 linear industrial camera as the independent variable. Only within the same acquisition row index domain, the order of the two corrections is specified. The grayscale value of a row and its corresponding normal jump and travel deviation This ensures a strict one-to-one correspondence. If geometric resampling is performed first, the correspondence between rows is rewritten by the interpolation operator. Applying compensation gain with the original row index as the independent variable afterwards will inevitably cause spatial misalignment between the gain and the grayscale value, and the compensation will introduce new distortion. Therefore, in this embodiment, photometric compensation is first performed in the acquisition row index domain, and then geometric resampling is performed on the result of photometric compensation. The order of the two steps cannot be reversed.

[0050] The high reflectivity of the aluminum single-panel 900 can be described by a hybrid model of Lambertian and micro-surface specular reflection. The ideal light intensity received by the 200 photosensitive element of the linear industrial camera is...

[0051] In the formula For ideal received light intensity under vibration-free conditions, and These are the diffuse reflection coefficient and the specular reflection coefficient, respectively. This represents the microscopic surface normal vector at the corresponding location. Let be the incident vector of the linear light source 300. This is the line-of-sight vector of the 200 linear industrial camera. Let the angle vector be the half-angle vector between the incident vector and the line-of-sight vector. , , The terms are, in order, the micro-surface element normal distribution term, the geometric occlusion term, and the Fresnel term. All of these vectors are unit vectors, and the dot in the middle represents the vector dot product. When the board surface experiences a normal jump at a certain instant... At that time, the intersection line of the obliquely incident illumination band and the plate surface shifts approximately along the Y direction. The product of the incident angle and the tangent causes an equivalent translation of the illuminance received along the Y direction on the imaging line; on the other hand... and The relative spatial angle produces a perturbation, the magnitude of which is approximately Compared to the distance of 220 mm from the center of the light source to the board surface, the normal distribution term is highly sensitive to the half-angle vector height; a deflection of the order of 0.13° can cause a jump of tens of percentage points in the specular reflection term. Both mechanisms described above represent a first-order perturbation in the illumination and reflection responses along the Y direction. Therefore, their first-order effects can be uniformly expressed as the product of the normalized grayscale gradient of the pixel along the Y direction and the equivalent translation, the proportion of which is absorbed by the calibration coefficient. It is important to emphasize here that the travel deviation of the board surface along the Y direction... It does not change the illumination geometry at the imaging line; it only changes the imaged material points. Therefore, it is a purely geometric effect and should be corrected by row-order resampling rather than photometric gain, as described later. Conversely, normal jump is the direct source of photometric jumps, which is why this invention drives photometric compensation with normal jump rather than transport direction displacement. Based on this, the photometric reconstruction engine 420 performs a first-order Taylor expansion of the original grayscale field along the Y direction and constructs a pixel-level inverse light intensity compensation gain matrix accordingly.

[0052] In the formula For the first The first pixel, the Compensation gain at the row position; This is the normalized grayscale gradient of the pixel. For the first The number of rows of illumination band shifted along the Y direction, equivalent to the normal runout of the row; The calibration coefficient, or reflection damping coefficient, is used to characterize the reflection damping properties of a material. The definitions of the first two are...

[0053] In the formula The spatial gray-level gradient along the Y direction in the index domain of the normalized original image is obtained by the 3×3 Sobel operator to balance noise resistance and positioning accuracy. To prevent extremely small positive numbers with a denominator of zero, this embodiment uses 1; The incident angle of the linear light source is 300°. In this embodiment, it is taken as 45°, so its tangent value is 1. The nominal line spacing is taken as the row length corresponding to 0.1 mm, which is one pixel. The normalized gradient is used instead of the original gradient to make the exponential term dimensionless. Taking 1 corresponds to strict first-order compensation, while The deviation from 1 precisely measures the proportion of the spatial grayscale gradient truly contributed by the specular reflection component. Therefore, this coefficient has a clear physical meaning and can be adaptively calibrated according to the criteria described later. The reason for calculating this gradient within the acquisition row index domain is that the Taylor expansion describes precisely the first-order change of the grayscale value with respect to the normal jump at the exposure moment, and its independent variable must be equal to... Within the same index domain, the effect of approximately 5% line spacing modulation on the first-order correction is negligible. Using exponential form instead of direct subtraction ensures that the gain remains positive to avoid negative grayscale, and naturally degenerates to [a specific value] under small perturbation conditions. The linear correction balances physical rationality and numerical stability. When the linear light source 300 is repositioned upstream of the linear industrial camera 200, Take the opposite sign. Multiply the compensation gain matrix element-wise with the normalized original grayscale field to obtain the photometric compensation intermediate image.

[0054] In the formula Still located within the index field of the collection row, the abrupt change of its specular reflection component caused by the incident angle perturbation has been canceled out, but the spacing between rows is still non-equidistant.

[0055] Hyperparameters The adaptive calibration is determined by the initial few scans of the defect-free board surface after power-on. The criterion is to minimize the variance of the row mean along the Y direction of each row in the photometrically compensated image.

[0056] In the formula For the hyperparameter to take the value At that time, the intermediate image of photometric compensation The arithmetic mean of the gray levels of all pixels within the effective detection area, i.e. , This is the set of valid cell columns within the window, determined by the edge positioning. It is the overall average of the row averages of all rows within this window, i.e. The physical meaning of this criterion is that, when the defect-free panel is fully compensated, the average brightness of each row should tend to be consistent, and the remaining inter-row brightness fluctuations are the uncompensated vibrational photometric distortions. This one-dimensional extreme value search can be converged through more than 10 iterations in the range of 0.2 to 2.0 using the golden section method. Actual measurements show that the brightness of a 900mm aluminum single-panel with a conventional sprayed surface... The value falls between 0.6 and 1.2; in this embodiment, it is 0.85. Uncoated mirror-finish rolled aluminum sheets have a higher proportion of mirror surface. A value of 1.2 or higher is recommended; for aluminum panels with a brushed surface, the diffuse reflection ratio is increased (900). It can be reduced to around 0.5.

[0057] After completing photometric compensation, the photometric reconstruction engine 420 performs geometric resampling. It first accumulates the cumulative displacement relative to the first row of the window by summing the inter-row displacement increments. And it is connected with the cumulative displacement at the end of the overlapping area of ​​the previous window to ensure continuity across windows, thus obtaining the first The actual physical sampling location of the row ,in The nominal line spacing is 0.1 mm, determined by 700 pulses from the rotary encoder. ( The ideal grid with equal spacing defined is used as the resampling target, and each column of pixels is resampled using... For interpolation nodes, with Construct cubic splines for node values ​​and The value is taken at the specified location to obtain the compensated albedo.

[0058] In the formula This represents a cubic spline interpolation operator constructed using given nodes and node values. The image shows the equidistant row coordinates after resampling. This image has simultaneously removed two types of distortions: row spacing stretching and compression, and reflection flicker, presenting a pure two-dimensional image with uniform lighting and continuous texture. Planar defects such as water stains, oxidation color differences, and slight oil stains are more clearly visible on it, while transient bright bands and dark spots that are originally very easy to misjudge are weakened.

[0059] In step S500, which constructs the three-dimensional vibration phase feature map, the photometric reconstruction engine 420 no longer treats vibration as an interference that needs to be completely eliminated. Instead, it extracts the depth information contained within it. The physical basis for this is that when the normal jump causes the incident angle to deflect, the surface normal vector of flat areas and pure two-dimensional defect areas changes continuously, and the rate of change of reflected light intensity with the normal jump is relatively gentle and continuous. However, for three-dimensional defects with topological depth, such as fine scratches, tiny roll marks, or rolling cracks with a width of less than 0.5 mm, the normal vector at its microscopic edge exhibits discontinuous jumps, resulting in sharp high-frequency abrupt gradients in reflected light intensity under the same amplitude. It should be noted that this feature must be extracted from the original grayscale field without photometric compensation. If a photometrically compensated intermediate map or compensated albedo map is used instead, the vibration photometric abrupt change to be utilized has already been canceled out by the previous step. Accordingly, the photometric reconstruction engine 420 first performs a second-order difference on the normal jump sequence to characterize the instantaneous acceleration response of the normal motion of the plate surface.

[0060] In the formula For the normal jump sequence in the th The second-order difference values ​​at each row are padded using one-sided differences at the first and last rows of the window. It's important to note that the object of the second-order difference is the normal runout after row-by-row accumulation and filtering, i.e., the absolute normal offset of the board surface relative to its nominal position. Therefore, its second-order difference is physically the product of the acceleration of the normal motion and the square of the row period, and numerically equivalent to the row-by-row normal runout increment sequence. First-order difference is performed; if the second-order difference is mistakenly applied to the row-by-row incremental sequence itself, the resulting third-order difference, which is actually the position and thus the jerk, does not conform to the claimed meaning of acceleration. Then, the second-order Laplacian operator response of the original image is taken to characterize the local curvature abrupt change in the grayscale field. The two are multiplied, and after nonlinear activation and normalization, a three-dimensional vibration phase feature map is obtained.

[0061] In the formula The second-order Laplacian response of the normalized original image is a two-dimensional matrix with the same dimension as the image. Only the serial number A changing one-dimensional sequence of length is Before participating in element-wise multiplication, it must be copied and expanded along the X-axis to be the same as the previous one. For matrices of the same dimension, where all pixels in the same row share the same activation value, the two matrices are expanded and then multiplied element-wise. The nonlinear activation function is in saturation form. , Let it be its scalar independent variable. To match the scale constant of the normal motion acceleration, this embodiment uses the median of the absolute values ​​of the second-order differences in the normal jitter sequence. This serves to saturate the response during individual severe impacts, preventing the dynamic range of the entire feature map from being dominated by a few extreme rows. The resulting feature map is then linearly stretched and truncated to the 0-1 interval according to the 99th percentile within the window. To ensure strict spatial alignment with the compensated albedo, allowing for pixel-by-pixel correspondence between the dual-branch inputs, the three-dimensional vibration phase feature map is also constructed using... For nodes, according to the aforementioned cubic spline operator Resampling to the same equally spaced grid The image shows a distinct bright gradient peak at the three-dimensional defect, with almost no response in flat areas and purely two-dimensional defect areas, exhibiting a highly sparse distribution overall. Its physical meaning is equivalent to a pseudo-depth map illuminated by vibration excitation, thus enabling a system equipped only with a conventional two-dimensional linear industrial camera 200 to perceive surface depth dimensions without adding any hardware. As a more accurate alternative, the modulus maxima of the finest-scale high-frequency subband of the non-subsampled shear wave transform can be used instead of the Laplace response. Since this modulus maxima naturally carries directional information, it has a stronger response capability to fine, elongated scratches extending along the rolling direction.

[0062] In the dual-modal collaborative inference step S600, the intelligent inference engine 430 receives two inputs with non-overlapping physical meanings and pixel-wise alignment: a compensated albedo map and a three-dimensional vibration phase feature map. Considering the size of a single window is 8192×1024, the intelligent inference engine 430 divides it into two pairs of 4096×1024 dual-modal map pairs along the X direction and feeds them into the network one pair at a time. The network adopts a dual independent channel structure in the backbone stage. The representational texture flow branch 431 is responsible for processing the compensated albedo map, which is composed of several levels of inverse residual modules stacked together. Each module first uses a 1×1 convolution to increase the dimensionality, then uses a 3×3 depthwise separable convolution to extract spatial features, and finally uses a 1×1 convolution to reduce the dimensionality and perform residual connections. The activation function adopts a hard-switching function to avoid the overhead of exponential operations. The number of channels is progressively expanded from 16 to 80, and the feature map resolution is successively downsampled to 1 / 8, 1 / 16, and 1 / 32 of the input, outputting a multi-scale feature tensor. In the formula For the number of channels, and These represent the height and width of the feature map at this scale, respectively. The design goal of this branch is to extract conventional 2D features such as edge contours, grayscale differences, and texture anomalies with the lowest possible computational overhead. The deep topological flow branch 432 is responsible for processing the 3D vibration phase feature map. Given the high sparsity of this map, using a backbone of the same depth would result in significant computational waste and gradient dilution. Therefore, this branch uses only a 4-layer fully convolutional structure with kernel sizes of 5, 3, 3, and 3, respectively, and embeds a coordinate attention mechanism after each layer. This mechanism performs average pooling along the height and width directions of the feature map, respectively, to obtain two one-dimensional descriptors with directional awareness.

[0063] In the formula This indicates that the input feature tensor of this layer is at the th... The two-dimensional component on each channel has its first independent variable as the height coordinate and its second independent variable as the width coordinate. and These are the coordinate indices for the height and width directions, respectively. and For the dummy index used in the summation, traverse all positions in the width and height directions respectively; For the first Each channel is located at the height coordinates. The average response along the width direction, For the first Each channel in the width coordinate The average response along the height direction is calculated. The two are then concatenated, reduced in dimensionality by a shared 1×1 convolution, batch normalized, and subjected to nonlinear transformation before being split and their respective dimensions increased. This results in attention weights in two directions, which are multiplied by the original features. The reason coordinate attention, rather than channel attention, is chosen in the depth topological flow branch 432 is that 3D defects in pseudo-depth maps often appear as elongated response bands extending hundreds of pixels along the rolling direction but only a few pixels wide laterally. Channel attention loses this strong directional and positional prior due to global pooling, while coordinate attention can establish long-range dependencies along two orthogonal directions, accurately capturing and amplifying the elongated responses caused by depth discontinuities, and outputting feature tensors. .

[0064] The two feature streams are fused in the cross-modal phase attention fusion module 433. To avoid feature contamination inherent in simple channel stitching, this module forces the two types of physical information to cross-check each other: to characterize the depth phase shift. After convolution and activation, a spatial weight matrix is ​​generated and multiplicative weighting is performed. This forces the network to focus its attention on regions that exhibit both texture anomalies and abrupt depth changes, thereby amplifying the response to deep scratches and pits; simultaneously, it uses the overall contour to represent... Generate channel descriptors to suppress Isolated artifacts caused by reflections from extreme environments or noise in individual pixels are mathematically expressed as follows:

[0065] In the formula For the fused feature tensor, It is a sigmoid activation function. and To act on respectively and Learnable convolutional kernels, The 1×1 convolution is used to compress the number of channels after stitching. The fusion is performed independently at three scales. The fused features are then passed bidirectionally from bottom to top and from top to bottom through a path aggregation network, which allows for full interaction between the high-resolution localization information in the shallow layer and the strong semantic information in the deep layer. The improvement in localization accuracy is most significant for tiny pits that occupy only a few pixels.

[0066] The fused features are finally fed into the phase consistency detection head 434. The phase consistency detection head 434 structurally adopts a 3-scale anchor-frame prediction head, predicting bounding box offsets, target confidence, and class probabilities at scales of 1 / 8, 1 / 16, and 1 / 32 of the input, respectively. The anchor frame size is determined by clustering the labeled boxes in the training set, and because the 900 defects in aluminum single-panel boards generally have a large aspect ratio, the aspect ratio range of the anchor frame is extended to over 1:10. The improvement of the phase consistency detection head 434 lies in the composition of the loss function; the total loss is defined as...

[0067] In the formula To achieve a complete intersection and union bounding box regression loss, To mitigate focus classification loss caused by positive-negative sample imbalance, This is a phase consistency penalty term. This is used as the weighting factor. The mechanism of this penalty term is that for each prediction box identified as a 3D pit, deep scratch, or rolling crack... The average gradient response of the corresponding region on the three-dimensional vibration phase feature map is statistically analyzed.

[0068] In the formula For the first The average phase response of each predicted box This represents the total number of pixels covered by the predicted bounding box. If the response is lower than the physical threshold determined based on the statistics of the labeled samples... Then, a penalty proportional to the amount of the deficit will be imposed, that is...

[0069] In the formula For the network to the first The category labels output by each prediction box. This is a set of categories for three-dimensional defects. This is an indicator function, which takes the value 1 if the condition within the parentheses is true, and 0 otherwise. This represents the number of predicted bounding boxes identified as 3D defects within this batch. The denominator here is... Instead of taking directly This is to avoid undefined operations with zero as the denominator when the network does not output any 3D class prediction boxes in a certain batch; in this case, the summation term itself is always zero, so the phase consistency penalty term is zero overall and does not backpropagate gradients to the backbone, and the training process is unaffected. Physical threshold The 10th percentile of the average response within all real 3D defect boxes in the training set is taken; in this embodiment, it is approximately 0.31. The weighting coefficient... The value is set to 2.0~5.0, and in this embodiment, it is set to 3.0. This constraint forces the network's classification decision to be corroborated by the physical evidence provided by the pseudo-depth modality during the training phase, suppressing black-box assumptions that misclassify two-dimensional dark spots, water stains, or oxidation color differences as pits, and making the classification results have traceable physical basis.

[0070] The training of the network used by the Intelligent Inference Engine 430 is completed offline. The sample set consists of approximately 12,000 original images collected from the same production line under different shifts, different linear speeds, and different vibration conditions. After being processed by the aforementioned decoupling process, the images are paired up and labeled with seven categories: scratches, dents, roll marks, rolling cracks, oxidation spots, water stains, and oil stains. They are also categorized into two sets, a three-dimensional class and a two-dimensional class, based on whether they have topological depth, for use by the phase consistency penalty term. To enhance the generalization ability for different vibration conditions, during the data augmentation stage, synthetic transport direction displacement sequences and normal jitter sequences with frequencies between 5 and 50 Hz, random phases, and amplitudes following a Rayleigh distribution are artificially injected into the original images acquired under stable conditions. Corresponding geometric and photometric distortions are then generated in the forward direction according to the aforementioned physical reflection model, thereby expanding the coverage of vibration samples without increasing on-site acquisition costs. Conventional flipping, brightness jittering, and mosaic stitching augmentations are also applied simultaneously, but flipping is limited to the X-direction to avoid disrupting the inherent directional relationship of the brushed texture relative to the linear light source 300. Training employs an adaptive moment estimation optimizer with decoupled weight decay. The initial learning rate is 0.001, decayed by cosine annealing, with a batch size of 16 and 200 iterations. The shallow weights of the appearance texture flow branch 431 are initialized using transfer from pre-training results on a general image dataset. The deep topology flow branch 432, due to its special input modality, is randomly initialized with an initial learning rate three times the normal value. After the trained model is quantized with half precision and fused with operators, it is serialized by the tensor operation acceleration engine and deployed on the edge computing industrial control computer 400.

[0071] In the defect removal linkage step S700, the intelligent inference engine 430 first performs non-maximum suppression on the prediction results, setting the intersection-union threshold to 0.45 and the confidence threshold to 0.85. Since there is a 256-row overlap between adjacent windows, defects located within this overlap will be repeatedly detected. Therefore, after converting to absolute coordinates, the edge computing industrial control computer 400 merges and removes duplicates of detection results with a center distance less than twice the frame width and of the same category, retaining those with higher confidence. The vertical reference for coordinate conversion is not time, but the pulse count of the rotary encoder 700: the edge computing industrial control computer 400 has already identified the scan line where the aluminum single-panel 900 board head is located during the board edge positioning stage, and accordingly represents the vertical position of each defect as its pulse count increment relative to the board head of this aluminum single-panel 900. ,in and These are the absolute scan line numbers of the defect center and the board head, respectively, and each scan line corresponds to a pulse of the rotary encoder 700; the lateral position is determined by the splicing offset obtained from the power-on calibration, which unifies the detection results of the two line scan industrial cameras 200 to the same wide coordinate system.

[0072] The reason for using pulse counting instead of time as the data transmission reference is that there are speed pulsations from the servo drive and relative slippage of the material on the roller surface on the conveyor roller 100, resulting in linear velocity... It is not a constant. If the absolute trigger delay is calculated based on instantaneous linear velocity... Then in 4.5 m With a delay of 2.25 s at a speed of 2 m / s, any speed fluctuations during this period will be fully integrated as position errors, causing the actions of the spray valve 610 and the sorting cylinder 620 to deviate from the target. Therefore, in this embodiment, the position following based on absolute stroke is performed by the programmable logic controller 500: such as... Figure 4 As shown, the programmable logic controller 500 uses the pulses from the rotary encoder 700 connected via its input interface as the clock source for a high-speed counter. Internally, it maintains a position following queue. Each time the edge computing industrial computer 400 detects a defect, it immediately records its category, confidence level, width coordinates, and longitudinal pulse increment. Push it into the queue; when the board head detection photoelectric switch 630 detects that the leading edge of the aluminum single board 900 has reached the station of the defect rejection actuator 600, the programmable logic controller 500 resets the high-speed counter to zero, and thereafter, every accumulated... Each pulse triggers a corresponding action. Since each pulse corresponds to a constant stroke of 0.1 mm, the trigger position is completely independent of instantaneous fluctuations in linear velocity. Simultaneously, thanks to the sheet-by-sheet zeroing of the board head detection photoelectric switch 630, the slippage error accumulated during the 4.5 m transmission between the line scan industrial camera 200 and the defect removal actuator 600 is completely eliminated. The residual error is solely contributed by the slippage along the intra-board distance from the board head to the defect, which, at a typical slippage rate on the order of a few thousandths, does not exceed a few millimeters, meeting the ±10 mm positioning tolerance for marking and sorting. As an equivalent simplified implementation under low-speed, constant, and slip-free conditions, it can also be implemented using... The method of calculating time delay is not suitable for production lines with speed fluctuations, as the positioning error accumulates with transmission distance and speed fluctuations.

[0073] Upon triggering, the programmable logic controller 500 performs graded processing based on the defect category through its output interface: for removable two-dimensional defects such as water stains and minor oil stains, it only drives the marking valve 610 to mark the corresponding width position and records it in the rework order; for unrepairable three-dimensional defects such as deep scratches, dents, and rolling cracks, if their size or density exceeds the process limit, it drives the sorting cylinder 620 to push the entire aluminum panel 900 away from the main line. Simultaneously, the defect record and its corresponding compensation reflective image screenshot and three-dimensional vibration phase characteristic image screenshot are generated. Figure 1 It is written into the manufacturing execution system database and refreshed in real time on the human-machine interface terminal 800 for use in quality traceability and process parameter regression analysis.

[0074] In terms of real-time performance, at a maximum linear velocity of 2 m / s, a single sliding window advances a net 768 lines, corresponding to a time budget of 38.4 ms. Actual measurements on an edge computing industrial PC 400 with a standard industrial-grade graphics processing unit show that the non-subsampled shear wave transform decomposition takes approximately 7 ms, 192 groups of 3072 one-dimensional piecewise phase correlation operations take approximately 4 ms after batch parallelization, weighted least squares solution and sequence interpolation take approximately 1 ms, photometric compensation and geometric resampling of two feature maps take approximately 5 ms, three-dimensional vibration phase feature map construction takes approximately 2 ms, the intelligent inference engine's inference of 430 pairs of 2 pairs of 4096×1024 bimodal maps takes approximately 8 ms, and post-processing and communication take approximately 1 ms, totaling approximately 28 ms. This leaves approximately 27% margin, ensuring stable performance to meet the real-time requirements of online detection. The total throughput of the raw image stream from the two line scan industrial cameras 200 under this operating condition is approximately 2.6 Gbit / s, which is sufficient to be handled by the direct memory access channel between the image acquisition interface card 440 and the edge computing industrial control computer 400.

[0075] It should be noted that some implementation details of the method described in this invention can be replaced with equivalent ones according to specific application scenarios without departing from its technical concept. The scale level and direction subdivision of the non-subsampled shear wave transform can be adjusted between 2 and 4 levels and 4 to 16 directions according to the complexity of the board texture. When computational resources are extremely limited, it can also degenerate into a non-subsampled contour wave transform or a controllable pyramid decomposition, but the selected transform must retain sufficient directional selectivity and translation invariance. In addition to the phase correlation method, the inversion of subpixel displacement can also use normalized cross-correlation combined with parabolic interpolation, or sparse optical flow tracking of the corner response on the high-frequency subband. When the camera can be changed on site, a dual-line array or multi-line array sensor can also be selected to make the same physical scan line imaged twice within the known line spacing, so that the actual travel amount can be directly obtained from the cross-correlation of the two signals in the line sequence direction. At this time, it no longer depends on the directionality of the texture, but the configuration of the camera and image acquisition interface card 440 needs to be modified accordingly. The cubic spline interpolation used for geometric resampling can be replaced with Langios interpolation or bicubic interpolation. Their ability to preserve the high-frequency edges of fine scratches is slightly different but has no impact on the overall process. The appearance texture flow branch 431 The backbone can be replaced with other lightweight structures such as channel shuffling networks or ghost convolutional networks. The phase consistency detection head 434 can also be changed to an anchorless paradigm, requiring only a corresponding adjustment to the definition of regression loss. Highly regularized operations such as hole filtering, Laplace response, and flat field correction can be implemented in a pipelined manner within a field-programmable gate array or digital signal processor, thereby further reducing the processing latency of the edge computing industrial control computer 400. When the linear scan industrial camera 200 is a color model, photometric compensation can be performed only on the luminance channel while synchronous geometric resampling is performed on the chrominance channel to avoid color shift introduced by compensation. When the conveyor roller 100 is changed to a stepping or bidirectional reciprocating conveyor, only the lower limit of the bandpass filter of the displacement sequence needs to be widened accordingly, and the high-speed counter of the programmable logic controller 500 needs to be changed to a bidirectional counting mode that can be added and subtracted, and the entire subsequent process can be reused. Furthermore, the physical mechanism upon which this invention is based is not limited to aluminum single-layer 900. For continuous strip materials such as stainless steel strip, galvanized sheet, and copper foil, which also have high reflectivity and are subjected to high-frequency flutter in roller conveyor, it is only necessary to recalibrate the material's reflection damping hyperparameter. With physical threshold With a few small-sample fine-tuning of the network used in the Intelligent Inference Engine 430, it can be directly ported to applications.

[0076] Digital twin simulation and field comparison tests conducted on a medium-sized continuous production line for cold rolling and spraying of aluminum alloy strip show that, under identical configurations of conveyor rollers 100, linear industrial cameras 200, and linear light sources 300, the control scheme using single-pass brightness and darkness compensation combined with a conventional single-flow target detection network achieves an average detection accuracy of 81.3%, but a detection rate of only 64.7% for three-dimensional micro-scratches and dents less than 0.5 mm in width. A significant number of targets are obscured by high ambient reflectivity or confused with water stains, resulting in a false alarm rate of 14.2%. Furthermore, to extract complex noise features, a heavy backbone network with hundreds of layers must be deployed, leading to an inference latency of 35 ms for a single 1024×4096 image. After adopting the method described in this embodiment, the average detection accuracy increases to 95.6%, the detection rate of three-dimensional micro-defects increases to 93.2%, the false alarm rate decreases to 1.8%, the number of model parameters decreases by more than 60%, and the single-image inference latency decreases to 8 ms. The entire process requires no additional active vibration isolation platform or multi-frequency flash source controller, nor does it require any modification to the existing mounting positions and electrical wiring of the linear industrial camera 200 and linear light source 300 on the inspection gantry 150. This achievement stems from the fact that the pre-processed deterministic physical decoupling mathematically separates planar texture from three-dimensional phase shift, eliminating the need for the back-end network to fit the redundant distribution of reflections and vibration noise with a large number of parameters. This improves both recognition accuracy and the computational efficiency of the computer system.

[0077] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of the invention. All equivalent changes and modifications made in accordance with the claims and description of the present invention should still fall within the scope of the present invention.

Claims

1. A machine vision-based online detection method for surface defects in aluminum composite panels, characterized in that, Includes the following steps: S1. The aluminum single-plate to be inspected is scanned and imaged line by line along the width direction by a line scan camera in the roller conveyor, and transient image blocks are captured. S2. Perform a non-downsampled shear wave transform on the transient image block and discard the low-frequency approximation components. Select at least two components with non-zero directional slope coefficients and opposite signs from the high-frequency directional sub-bands at the finest scale as directional observation sub-bands. S3. Divide the one-dimensional signal of each of the two adjacent scanning lines on the observation sub-band in each direction into at least two segments along the width direction, and perform normalized cross power spectrum phase correlation on each segment to obtain the apparent lateral slip. Solve the equations by combining the directional slope coefficient of each sub-band with the lateral offset of the center of each segment relative to the optical axis, and separate the transient displacement and the relative change of imaging magnification between the two lines along the transport direction. Calculate the normal slip increment along the optical axis direction and accumulate it as the normal slip amount. S4. Construct a reverse light intensity compensation gain by multiplying the illumination translation line number equivalent to the normal jump amount by the normalized gray level gradient of the pixel. Multiply the gain element-wise with the gray level field of the transient image block to obtain a photometric compensation intermediate image. Then determine the actual sampling position of each scan line according to the cumulative value of the transient displacement. Resample the intermediate image along the transport direction to an equally spaced grid to obtain a compensation albedo image. S5. The second-order difference of the normal jump is expanded along the width direction after being saturated nonlinearly mapped, and multiplied element-wise with the absolute value of the second-order differential response of the gray field and normalized to obtain a three-dimensional vibration phase feature map and resampled to the equally spaced grid. S6. Input the compensated albedo and the three-dimensional vibration phase feature map into the first and second branches of the dual-branch convolutional neural network, respectively. Use the spatial weight matrix generated by the output features of the second branch to weight the output features of the first branch. Then, concatenate the weighted result and the output features of the second branch along the channel and send them into the detection head after convolution compression to output the defect category and location.

2. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 1, characterized in that: In step S1, each row of pixels acquired is normalized according to the pre-acquired dark field reference and bright field reference. The normalized row of pixels is stored in a first-in-first-out queue. The transient image block is cropped from the first-in-first-out queue according to the set window height. A set number of overlapping areas are retained between two adjacent cropped transient image blocks. The row exposure of the line scan camera is triggered by the pulse output by the rotary encoder installed at the end of the roller shaft. The conveying stroke corresponding to a single pulse is equal to the spatial resolution of the line scan camera along the width direction. The window height is 1024 rows, and the number of rows in the overlapping area is 256 rows. In step S3, the transient displacement and normal jump increment of each scan line located in the overlapping region are based on the results obtained in the previous transient image block. This time, the normalized cross power spectrum is calculated only for the newly added scan lines outside the overlapping region.

3. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 1, characterized in that: In step S2, the directional slope coefficient is the ratio of the spatial frequency coordinate along the transmission direction to the spatial frequency coordinate along the width direction at the centroid of the two-dimensional amplitude spectrum energy of the high-frequency directional sub-band. A non-zero directional slope coefficient means that the passband principal direction of the high-frequency directional sub-band is not parallel to the width direction. The non-subsampled shear wave transform is achieved by cascading a non-subsampled pyramid and a non-subsampled directional filter bank. The non-subsampled pyramid has three decomposition levels, with the finest scale divided into eight directions and the remaining scales divided into four directions. The directional observation sub-bands are selected from the high-frequency directional sub-bands where the absolute value of the directional slope coefficient at the finest scale is between 0.2 and 3.0, and are further analyzed according to... The observation weight is determined by the coefficient energy ratio of the directional observation sub-band, and the coefficient energy ratio is the ratio of the sum of squares of the coefficients of the high-frequency directional sub-band to the sum of squares of the coefficients of all directional observation sub-bands; in step S3, the simultaneous solution is to perform a weighted least squares solution on all the apparent lateral misalignment quantities according to the observation weight, wherein the slope coefficient of each direction and the lateral offset of each segment center relative to the optical axis of the linear array camera are known quantities, and the lateral misalignment increment between two adjacent scanning lines along the width direction, the relative change of the imaging magnification, and the travel increment deviation along the transport direction are unknown quantities, and the travel increment deviation is taken as the transient displacement.

4. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 1, characterized in that: In step S3, the number of segments is 4 to 8, and each segment is divided into equal lengths along the width direction. After applying a Hanning window to the one-dimensional signal of each segment, a discrete Fourier transform is performed to calculate the normalized cross power spectrum of two adjacent scan lines. An inverse discrete Fourier transform is then performed on the normalized cross power spectrum to obtain the phase correlation function. The apparent lateral slip is taken as the extreme point obtained by fitting a one-dimensional quadratic curve to the peak neighborhood of the phase correlation function. The one-dimensional quadratic curve fitting is performed by taking the integer peak position of the phase correlation function and one sampling point on each side to perform a parabolic fitting, and correcting the integer peak position with the offset of the fitted extreme point relative to the integer peak position. The normal jump increment is taken as the product of the relative change in imaging magnification and the difference between the object-side working distance of the linear array camera and the focal length of the imaging lens.

5. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 4, characterized in that: In step S3, after obtaining the transient displacement and the normal jump increment, the following processing is performed on them in sequence: using the mean of the peak sidelobe ratio of each phase correlation function as the confidence criterion, the transient displacement and normal jump increment corresponding to the scan line with the mean value lower than the set threshold are determined to be invalid, and the interpolation results of the valid scan lines before and after it are used to supplement them. Outliers were removed from the supplemented transient displacement and normal runout increments according to the criterion of 3 times the standard deviation, and median filtering was applied. The transient displacement and normal runout increment after removing outliers are subjected to a zero-phase digital bandpass filter with a passband of 5~50Hz, and the normal runout amount is obtained by accumulating the filtered normal runout increments line by line.

6. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 1, characterized in that: In step S4, the number of translation rows is the ratio of the product of the normal jump of the scan row and the tangent of the incident angle of the linear light source to the nominal row spacing; the normalized gray-level gradient is the ratio of the spatial gray-level gradient of the pixel along the conveying direction to the gray-level value of the pixel; the reverse light intensity compensation gain is an exponential function with the negative value of the product of the number of translation rows, the normalized gray-level gradient, and a reflection damping coefficient as the exponent; the reflection damping coefficient is adaptively determined during the scanning process of the defect-free board surface after power-on, and its determination criterion is to minimize the variance of the average gray-level value of each scan row in the effective detection area in the photometric compensation intermediate image relative to the total average value of the average gray-level values ​​of all rows in the transient image block, and obtain it through a one-dimensional extreme value search within a set interval; the effective detection area is defined by searching for gray-level step positions along the width direction to determine the two sides of the aluminum single board, and shrinking inward by a set distance from the sides.

7. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 1, characterized in that: In steps S4 and S5, the resampling involves constructing cubic splines column by column along the conveying direction using the actual sampling position as the interpolation node and taking values ​​on the equally spaced grid. The actual sampling position is determined by the cumulative value of the transient displacement and the nominal row spacing. In step S5, the output of the saturated nonlinear mapping monotonically increases and tends to the upper limit of saturation as the absolute value of its independent variable increases. Its value is the difference between 1 and the negative exponential function value of the ratio of the absolute value of the independent variable to the same scale constant. The scale constant is the median of the absolute value of the second difference.

8. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 1, characterized in that: In step S6, the channel descriptor generated from the output features of the first branch is used to perform multiplicative suppression on the output features of the second branch, and the suppressed output features of the second branch are concatenated with the weighted result along the channel. The first branch is composed of stacked multi-level inverse residual modules. Each level of the inverse residual module contains sequentially increasing-dimensional pointwise convolution, depthwise separable convolution for extracting spatial features, and decreasing-dimensional pointwise convolution, and outputs multi-scale feature tensors at three different downsampling rates. The second branch is composed of a fully convolutional structure of no more than four layers, and a coordinate attention module is embedded after each layer. The coordinate attention module performs average pooling along the height and width directions of the feature map to obtain two orientation-aware descriptors, and the attention weights in the two directions generated by the two orientation-aware descriptors are multiplicatively weighted on the features of the layer.

9. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 8, characterized in that: The total loss of the dual-branch convolutional neural network during the training phase consists of a weighted sum of bounding box regression loss, classification loss, and phase consistency penalty term. The phase consistency penalty term is calculated as follows: for each prediction box that is determined to be a three-dimensional defect, the average response of the area covered by the prediction box on the three-dimensional vibration phase feature map is calculated. When the average response is lower than the set physical threshold, a penalty is applied according to the deficit of the average response relative to the physical threshold, and the larger of the number of prediction boxes that are determined to be three-dimensional defects and 1 is used as the normalization denominator. The physical threshold is taken as the low quantile of the average response within the actual three-dimensional defect annotation box in the training samples.

10. The online detection method for surface defects of aluminum single-panel based on machine vision according to claim 1, characterized in that: It also includes step S7, which performs non-maximum suppression and cross-transient image block duplicate detection merging on the output of the detection head, represents the longitudinal position of each defect as its rotary encoder pulse count increment relative to the head of this aluminum single board, and sends it to the programmable logic controller along with the defect category and width coordinates. The programmable logic controller uses the pulses output by the rotary encoder as the clock source for the high-speed counter. When the photoelectric switch at the board head detects that the leading edge of the aluminum single board has reached the rejection station, the high-speed counter is cleared to zero. Subsequently, the corresponding rejection action is triggered every time the cumulative pulse count increment of the corresponding defect is reached. The rejection action is performed in stages according to defect category. For two-dimensional defects, the spray mark valve is used to mark the position. For three-dimensional defects that exceed the set size limit or density limit, the sorting cylinder is used to push the aluminum panel away from the main line.