TGV via defect visual inspection and analysis system
Patent Information
- Application Number
- CN202611069465.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]由于玻璃基板材料具备高透光率和高镜面反射率,固定光源投射的光线会在玻璃表面形成大面积的镜面反光晕团,同时光线穿透通孔内部形成强烈的透射光斑,在静态光照条件下采集的单一图像中,反光晕团与透射光斑产生的像素灰度突变直接淹没了孔壁微裂纹和孔底残胶产生的微弱灰度变化,导致常规边缘检测算法无法在单一静态图像中区分反光纹理与真实缺陷特征,产生特征混淆
1.本发明通过在单个曝光周期内按时序依次点亮不同角度的结构光源并同步采集图像序列,提取各像素点在不同光照角度下的灰度方差与梯度响应张量并级联输入特征解耦网络,利用空间注意力机制分离反光抑制特征图与背景抑制特征图并对二者进行像素级相与操作,改变了依赖单一静态图像进行特征提取的常规方式,该方案利用真实缺陷边缘在不同光照角度下保持方向性响应而反光与透射背景呈现随机跳变的物理差异,在特征层面剥离了反光晕团与透射光斑的像素干扰,提取出仅包含真实缺陷边缘的连通域,克服了静态光照条件下微裂纹与残胶特征被反光纹理淹没的问题。
Smart Images

Figure CN122928762A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a visual inspection and analysis system for through-hole defects based on TGV, belonging to the field of visual inspection technology. Background Technology
[0002] Existing visual inspection systems for glass through-hole defects typically use a single illumination source at a fixed angle in conjunction with an industrial camera to acquire two-dimensional images of the glass substrate. In the image processing stage, the system applies conventional edge detection operators or basic threshold segmentation algorithms to each acquired image to extract pixel abrupt changes at the edge of the through-hole and identify microcracks or residual adhesive defects. This conventional approach relies on static illumination conditions to establish a fixed contrast between light and dark on the surface of the glass substrate and inside the through-hole.
[0003] Because glass substrate materials have high light transmittance and high specular reflectivity, light projected from a fixed light source will form a large area of specular reflection halo on the glass surface. At the same time, light passing through the through hole will form a strong transmitted light spot. In a single image acquired under static lighting conditions, the pixel grayscale changes caused by the reflection halo and transmitted light spot directly overwhelm the slight grayscale changes caused by the microcracks in the hole wall and the residual adhesive at the bottom of the hole. This causes conventional edge detection algorithms to be unable to distinguish between reflective textures and real defect features in a single static image, resulting in feature confusion. Summary of the Invention
[0004] The purpose of this invention is to provide a visual inspection and analysis system for through-hole defects based on TGV, which can effectively solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The TGV-based visual inspection and analysis system for through-hole defects includes a programmable multi-angle ring strobe light source, an adaptive backlight assembly, and an image processing host. The image processing host is connected to the programmable multi-angle ring strobe light source and the adaptive backlight assembly. The image processing host controls the programmable multi-angle ring strobe light source to sequentially illuminate structured light sources at different angles within a single exposure cycle and simultaneously acquire image sequences. The image processing host extracts the gray-level variance and gradient response tensor of each pixel in the image sequence under different illumination angles, and concatenates the gray-level variance and the gradient response tensor into a pre-constructed lightweight feature decoupling network. The lightweight feature decoupling network separates the reflection suppression feature map and the background suppression feature map through a spatial attention mechanism; The image processing host performs pixel-level AND operations on the reflection suppression feature map and the background suppression feature map to extract the defect edge connected domain of the TGV via edge.
[0006] Preferably, the programmable multi-angle ring strobe light source includes multiple independent light-emitting arrays distributed in a ring, and the image processing host stores a timing trigger control table corresponding to the multiple independent light-emitting arrays; Within the single exposure cycle, the image processing host sequentially sends trigger pulses to the plurality of independent light-emitting arrays according to the timing trigger control table. After receiving the trigger pulses, the plurality of independent light-emitting arrays project structured light stripes at a set tilt angle. The image processing host controls the industrial camera to complete single-frame image capture at a preset delay time after each trigger pulse is sent, and combines the captured multiple single-angle images into the image sequence.
[0007] Preferably, for the same pixel coordinate point in the image sequence, the image processing host extracts the grayscale values of the pixel coordinate point in all frames of the image sequence to construct a grayscale sequence vector; The image processing host calculates the mean and discrete difference of the gray-level sequence vector, and uses the square of the discrete difference as the gray-level variance. For the reflective area of the glass substrate, the gray value of the pixel coordinate point changes drastically under different illumination angles, resulting in a high numerical distribution of the gray value variance. For the background area inside the through hole, the gray value of the pixel coordinate point remains stable under different illumination angles, so that the gray variance exhibits a low numerical distribution.
[0008] Preferably, the image processing host performs convolution operations on each frame of the image sequence using the horizontal gradient operator and the vertical gradient operator respectively, to obtain the horizontal gradient matrix and the vertical gradient matrix of each frame of the image. The image processing host concatenates the horizontal and vertical gradient values of the same pixel coordinate point in all frame images to construct a two-dimensional vector containing multi-angle illumination information, and combines the two-dimensional vectors corresponding to all pixel coordinate points in the image sequence into the gradient response tensor. The gradient response tensor is used to characterize the directional response intensity of the defect edge under different structured light projection angles.
[0009] Preferably, the lightweight feature decoupling network includes cascaded variance feature extraction branches and tensor feature extraction branches, and the outputs of both the variance feature extraction branches and the tensor feature extraction branches are connected to the spatial attention mechanism. The spatial attention mechanism performs channel concatenation between the variance feature map output by the variance feature extraction branch and the tensor feature map output by the tensor feature extraction branch, and generates a spatial weight matrix through a convolutional layer with shared weights. The weight values in the spatial weight matrix are positively correlated with the suppression probability of the reflective area and the background area. The lightweight feature decoupling network weights the input features according to the spatial weight matrix and outputs the reflective suppression feature map and the background suppression feature map.
[0010] Preferably, the image processing host performs a logical multiplication operation on the values of corresponding pixel positions in the reflection suppression feature map and the background suppression feature map to generate a fused feature map; In the fused feature map, only pixels that simultaneously satisfy the conditions of suppressed reflective features and suppressed background features retain positive values, while the remaining pixels are set to zero. The image processing host performs connected component labeling on the fused feature map, calculates the ratio of the perimeter of the edge contour to the area of each connected component, removes speckle noise regions whose ratio of the perimeter of the edge contour to the area is lower than a preset morphological threshold, and identifies the connected components that meet the preset morphological threshold as the defective edge connected components.
[0011] Preferably, the adaptive backlight assembly is disposed directly below the TGV through-hole glass substrate and includes a zone-driven diffuse light source matrix. While sending trigger pulses to the multiple independent light-emitting arrays according to the timing trigger control table, the image processing host reads the average brightness value of the area inside the through hole in the historical image acquired by the industrial camera in the previous exposure cycle. When the average brightness value is lower than the set light transmission threshold, the image processing host increases the driving current of the diffuse light source matrix partition corresponding to the location inside the through hole, so as to improve the brightness contrast between the background inside the through hole and the hole wall defects.
[0012] Preferably, the lightweight feature decoupling network introduces a residual connection structure during the generation of the reflection suppression feature map; The residual connection structure directly superimposes the high-frequency gray-level jump features at the input end of the variance feature extraction branch onto the feature map at the output end of the spatial attention mechanism across layers. Through the residual connection structure, the reflection suppression feature map eliminates large-area specular highlight halos while retaining the high-frequency local gray-scale abrupt changes caused by microcracks, preventing the microcrack features from being smoothed along with the spatial attention mechanism during the weighted suppression process.
[0013] Preferably, the image processing host performs skeletonization extraction on the connected components of the defect edges to obtain defect skeleton line segments; The image processing host calculates the curvature change sequence of each pixel on the defect skeleton line segment and extracts the gray-scale mean of the defect edge connected region in the reflection suppression feature map. When the variance of the curvature change sequence is greater than a set tortuosity threshold and the mean gray value is lower than a set gray value threshold, the image processing host classifies the defect edge connected region as a microcrack defect. When the variance of the curvature change sequence is less than the set curvature threshold and the mean gray value is greater than the set gray value threshold, it is classified as a residual adhesive defect.
[0014] Preferably, after completing the defect classification, the image processing host extracts the coordinates of the outer rectangle of the connected domain of the defect edge classified as a microcrack defect or a residual adhesive defect. The image processing host maps the coordinates of the circumscribed rectangle to the coordinate system of the original panoramic image captured by the industrial camera, and calculates the physical offset of the defect on the TGV through-hole glass substrate. The image processing host generates motion control commands based on the physical offset, and sends the motion control commands to the precision displacement platform that carries the TGV through-hole glass substrate, driving the precision displacement platform to move the corresponding defective through-hole to a preset re-inspection station for secondary high-magnification observation.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention sequentially illuminates structured light sources at different angles within a single exposure cycle and simultaneously acquires image sequences. It extracts the grayscale variance and gradient response tensor of each pixel under different illumination angles and cascades them into a feature decoupling network. It uses a spatial attention mechanism to separate the reflection suppression feature map and the background suppression feature map and performs a pixel-level AND operation on them. This changes the conventional method of feature extraction that relies on a single static image. This scheme utilizes the physical difference that the real defect edge maintains a directional response under different illumination angles while the reflected and transmitted backgrounds exhibit random jumps. At the feature level, it removes the pixel interference of reflective halos and transmitted light spots and extracts connected components that only contain the real defect edges. This overcomes the problem that microcracks and residual adhesive features are submerged by reflective textures under static illumination conditions.
[0016] 2. This invention introduces a residual connection structure into the feature decoupling network, superimposing the high-frequency gray-level jump features from the input of the variance feature extraction branch across layers to the output of the spatial attention mechanism. This eliminates large-area specular highlight halos while retaining the high-frequency local gray-level abrupt changes caused by microcracks, preventing the microcrack features from being smoothed along with the weighted suppression process. Simultaneously, the driving current of the corresponding partition of the diffuse light source matrix below is adjusted according to the average brightness value of the through-hole internal region in the previous historical image. Combined with the projection timing of structured light stripes at different angles, the brightness contrast between the background inside the through-hole and the defects on the hole wall is improved, providing a connected domain with stable physical boundaries for subsequent defect classification calculations based on the variance of the curvature change sequence and the gray-level mean. Attached Figure Description
[0017] Figure 1 This is a flowchart of the overall detection method of the visual inspection and analysis system for glass through-hole defects of the present invention; Figure 2 This is a flowchart of the timing acquisition and control process for the multi-angle ring stroboscopic light source of the present invention; Figure 3 This is a flowchart of the gradient response tensor construction process of the present invention; Figure 4 This is a flowchart of the lightweight feature decoupling network processing of the present invention; Figure 5 This is a flowchart of the adaptive backlight assembly adjustment process of the present invention; Figure 6 This is a flowchart of the defect classification and re-inspection scheduling process of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] Please refer to Figure 1 and reference Figure 3 This embodiment provides a visual inspection and analysis system for TGV through-hole defects, including a programmable multi-angle ring strobe light source, an adaptive backlight assembly, and an image processing host. The image processing host establishes a communication connection with the programmable multi-angle ring strobe light source and the adaptive backlight assembly via an industrial bus. Simultaneously, the image processing host establishes a data transmission connection with an industrial camera via an image acquisition card. The optical axis of the industrial camera lens is perpendicular to the plane of the TGV through-hole glass substrate to be inspected. The programmable multi-angle ring strobe light source is coaxially mounted at the front end of the industrial camera lens, and the adaptive backlight assembly is mounted on the side of the TGV through-hole glass substrate facing away from the industrial camera. Within a single exposure cycle, the image processing host sequentially illuminates structured light sources at different angles in the programmable multi-angle ring strobe light source according to a preset timing logic. Simultaneously, it sends a synchronization trigger signal to the industrial camera, controlling the industrial camera to acquire the corresponding single-frame image during the illumination period of each structured light source. The acquired multiple frames of single-angle illumination images are then combined into an image sequence.
[0020] The image processing host performs preprocessing operations on the acquired image sequence, including lens distortion correction, inter-frame image registration, and grayscale normalization. Lens distortion correction uses pre-calibrated lens distortion parameters to correct distortion in each frame, eliminating pixel coordinate offsets caused by radial and tangential lens distortion, ensuring accurate mapping between pixel coordinates and the physical coordinates of the glass substrate in all frames. Inter-frame image registration uses the first frame in the image sequence as a reference frame, extracting and matching feature points in the remaining frames, calculating the inter-frame affine transformation matrix, and performing spatial transformation on the remaining frames based on the affine transformation matrix. This ensures that the same pixel coordinate in all frames corresponds to the same physical location on the glass substrate, eliminating inter-frame pixel offsets caused by minor displacement jitter during time-series acquisition. Gray-level normalization linearly stretches the gray-level values of each frame, mapping the gray-level value range of all frames to a standard gray-level range of 0-255. This eliminates inter-frame gray-level deviations caused by differences in luminous intensity from light sources at different angles, ensuring the accuracy of subsequent calculations of gray-level variance and gradient response tensors.
[0021] For a preprocessed image sequence, the image processing host iterates through all frames in the sequence to find the same pixel coordinates, extracts the grayscale value of that pixel coordinates across all frames, and constructs a grayscale sequence vector for the corresponding pixel coordinates. For any pixel coordinate in the image sequence... The corresponding grayscale sequence vector is constructed in the following way: Where N is the total number of frames in the image sequence, which is consistent with the number of independently controlled structured light sources in a programmable multi-angle ring stroboscopic light source. The pixel coordinates of the i-th frame in the image sequence The gray value at the specified location, with the superscript T indicating the vector transpose.
[0022] After constructing the grayscale sequence vector, the image processing host calculates the mean and variance of the grayscale sequence vector. The mean of the grayscale sequence vector is calculated using the following formula: in, pixel coordinates The mean of the corresponding grayscale sequence vector. Based on the calculated mean, the image processing host further calculates the grayscale variance corresponding to the pixel coordinates, using the following formula: in, pixel coordinates The grayscale variance is calculated as follows: For the non-defective flat area of the glass substrate, its surface has a smooth mirror structure. Under illumination from a structured light source at different angles, the direction of the reflected light changes with the angle of the light source. When the direction of the reflected light is parallel to the optical axis of the industrial camera lens, the grayscale value of the corresponding pixel position reaches its peak. When the direction of the reflected light deviates from the optical axis of the lens, the grayscale value of the corresponding pixel position drops rapidly. Therefore, under different lighting angles, the grayscale value of the flat mirror area exhibits a drastic jump, and the corresponding grayscale variance value is in the high value range. For the internal area of the TGV via, the light projected by the structured light source passes through the glass substrate and enters the via, forming diffuse reflection inside the via. The intensity of the diffusely reflected light changes less with the angle of the light source. Therefore, the pixel grayscale value in the internal area of the via remains relatively stable under different lighting angles, and the corresponding grayscale variance value is in the low value range. For the defective areas of the TGV via walls, whether microcracks or residual adhesive, the surface roughness is much higher than that of the flat glass substrate surface, forming a diffuse reflection structure. Under illumination from different angles of light sources, the intensity variation of the reflected light is between that of the specular reflection area and the diffuse reflection area inside the via. The corresponding grayscale variance value is in the middle range, forming a numerical distribution that can be distinguished from the specular reflection area and the via background area, providing a quantitative basis for subsequent feature separation.
[0023] Simultaneously with the grayscale variance calculation, the image processing host performs convolution operations on each frame of the image sequence using both horizontal and vertical gradient operators, obtaining the horizontal and vertical gradient matrices for each frame. For the i-th frame of the image sequence, its pixel matrix is... The formula for calculating the gradient convolution operation in the horizontal direction is as follows: in, The pixel coordinates of the i-th frame image The horizontal gradient value at that point, This is a two-dimensional convolution operator. This is the gradient operator in the horizontal direction. The corresponding formula for calculating the gradient convolution operation in the vertical direction is as follows: in, The pixel coordinates of the i-th frame image Vertical gradient value at that point This is the gradient operator in the vertical direction.
[0024] After performing gradient convolution operations on all frames, the image processing host concatenates the horizontal and vertical gradient values of the same pixel coordinate point across all frames to construct a two-dimensional vector containing multi-angle illumination information corresponding to that pixel coordinate point. This two-dimensional vector is then combined with the corresponding two-dimensional vectors of all pixel coordinate points in the image sequence to form a gradient response tensor. For any pixel coordinate... The formula for constructing the corresponding gradient response tensor is as follows: in, pixel coordinates The gradient response tensor is used to characterize the directional response intensity of a defect edge under different structured light projection angles. Each column of the tensor corresponds to the horizontal and vertical gradient values of a frame in the image sequence. For a real defect edge, it has a fixed spatial orientation, meaning the normal direction of the edge is fixed. When the projection direction of the structured light source is parallel to the normal direction of the defect edge, the contrast between light and dark at the defect edge reaches its maximum, corresponding to a peak gradient response amplitude. When the projection direction of the structured light source is perpendicular to the normal direction of the defect edge, the contrast between light and dark at the defect edge is minimum, corresponding to a minimum gradient response amplitude. Therefore, the gradient response of a real defect edge exhibits a regular change related to the edge normal under different illumination angles, possessing stable directional characteristics that do not change with the illumination angle. For the edge of a specular reflective area, which is a false edge formed by light reflection, the position and shape of the reflective area change with the illumination angle. Therefore, its gradient response exhibits irregular random fluctuations under different illumination angles and lacks stable directional characteristics. For the background region inside the through-hole, its grayscale value remains stable without obvious grayscale jumps. Therefore, the amplitude of its gradient response remains at a low level and lacks obvious directional characteristics. By aggregating gradient information under different illumination angles using the gradient response tensor, the stable directional characteristics of real defect edges can be effectively distinguished from the irregular characteristics of false reflective edges and background regions, providing a reliable feature basis for subsequent feature decoupling.
[0025] The image processing host combines the calculated gray-level variances corresponding to all pixel coordinates into a gray-level variance feature map, and combines the gradient response tensors corresponding to all pixel coordinates into a gradient tensor feature map. The gray-level variance feature map and the gradient tensor feature map are concatenated along the channel dimension and input into a pre-constructed lightweight feature decoupling network. The lightweight feature decoupling network includes a cascaded variance feature extraction branch and a tensor feature extraction branch. The outputs of both the variance feature extraction branch and the tensor feature extraction branch are connected to a spatial attention mechanism module. The variance feature extraction branch performs multi-scale convolutional feature extraction on the input gray-level variance feature map, outputting a variance feature map containing information on the distribution of reflective and background regions. The tensor feature extraction branch performs multi-scale convolutional feature extraction on the input gradient tensor feature map, outputting a tensor feature map containing information on the directional response of defect edges.
[0026] The spatial attention mechanism module concatenates the input variance feature map and tensor feature map along the channel dimension to generate a concatenated fused feature map. The calculation formula for channel concatenation is as follows: in, This is the feature map after channel stitching. The variance feature map output by the variance feature extraction branch. The tensor feature map output by the tensor feature extraction branch. This is a concatenation operation along the channel dimension. The spatial attention mechanism module inputs the concatenated feature map into a convolutional layer with shared weights. A convolutional layer with shared weights means that the weight parameters of the convolutional kernel are shared across all spatial locations of the feature map. The concatenated feature map is convolved pixel-by-pixel using the same set of parameters. This convolution operation generates a spatial weight parameter matrix, which is then normalized using an activation function to generate the final spatial weight matrix. The formula for generating the spatial weight matrix is as follows: in, This is the spatial weight matrix. It is the Sigmoid activation function. This is a two-dimensional convolution operation. These are the weight parameters for the shared weight convolutional layer. The weight values in the spatial weight matrix are positively correlated with the suppression probability of the reflective and background regions at the corresponding pixel locations. The higher the weight value, the higher the probability that the corresponding pixel location belongs to the reflective or background region, and the stronger the corresponding suppression intensity.
[0027] Based on the generated spatial weight matrix, the lightweight feature decoupling network performs pixel-level weighting on the input variance feature map and tensor feature map, respectively, outputting a reflection suppression feature map and a background suppression feature map. The formula for generating the reflection suppression feature map is as follows: in, This is a feature map of reflection suppression. This is a pixel-level Hadamard product operation, where 1 represents the weight matrix. A matrix of all ones with the same dimensions. Through this weighted processing, pixels in the reflective regions with high weights in the variance feature map are suppressed, while only the feature information of the non-reflective regions with low weights is retained, thus suppressing the specular reflection feature. The formula for generating the background suppression feature map is as follows: in, This is the background suppression feature map. Through this weighted processing, the background pixels with high weights in the tensor feature map are preserved, while the feature information of non-background regions with low weights is suppressed, thus achieving the separation and suppression of background features inside the via.
[0028] The image processing host acquires the reflection suppression feature map and background suppression feature map output by the lightweight feature decoupling network, and performs a pixel-level AND operation on the two feature maps to generate a fused feature map. The pixel-level AND operation is implemented through pixel-level Hadamard product operations, and the calculation formula is as follows: in, This is used to create a fused feature map. In the fused feature map, only pixels that simultaneously suppress reflective features and background features retain positive values, while the values of other pixels are set to zero. This ensures that only the defect edge feature information of the TGV via edge is retained in the fused feature map. The image processing host performs binarization on the fused feature map, labels the connected components in the binarized image, extracts all labeled connected components, calculates the ratio of the perimeter to the area of each connected component's edge contour, removes speckle noise regions where the ratio of the perimeter to the area is lower than a preset morphological threshold, and identifies the connected components that meet the preset morphological threshold as defect edge connected components of the TGV via edge.
[0029] Table 1. Correspondence between illumination timing and image acquisition within a single exposure cycle. Table 1 shows the correspondence between illumination timing and image acquisition within a single exposure cycle. This correspondence is stored in the image processing host's storage unit and serves as the core basis for timing trigger control. In the table, the timing sequence number corresponds to the lighting order of the light source within a single exposure cycle; the light-emitting array tilt angle is the angle between the light projection direction of the corresponding structural light source and the normal to the glass substrate plane; the trigger pulse transmission time is the time offset relative to the start point of a single exposure cycle; the image capture delay time is the delay time relative to the corresponding trigger pulse transmission time; and the corresponding image frame number is the sequence number of the captured image in the image sequence. Through this timing correspondence, the image processing host can achieve strict synchronization between the sequential lighting of structural light sources at different angles and image acquisition, ensuring that each frame in the image sequence corresponds to a unique illumination angle, providing accurate multi-angle illumination data for subsequent calculations of grayscale variance and gradient response tensors.
[0030] In this embodiment, an image sequence containing information on different lighting angles is constructed by multi-angle temporal illumination and synchronous image acquisition within a single exposure cycle. Based on the image sequence, the gray-level variance and gradient response tensor of each pixel are extracted. The gray-level variance is used to distinguish between specular reflection areas and stable background areas. The gradient response tensor is used to characterize the directional response features of the defect edges. The spatial attention mechanism of a lightweight feature decoupling network is used to separate the reflection suppression feature map and the background suppression feature map. Then, the connected components containing only the defect edges are extracted through pixel-level AND operations. This achieves the separation of TGV via defect features from specular reflection and via background interference features, avoiding the problem of defect features being submerged by reflective textures under static lighting conditions.
[0031] In a preferred embodiment, reference Figure 2 and Figure 5The programmable multi-angle ring stroboscopic light source comprises multiple independently distributed light-emitting arrays in a ring. Each independently distributed light-emitting array includes an independent driving circuit and optical lens assembly. All independently distributed light-emitting arrays are uniformly distributed along the ring structure. The projection angle of the light from each independently distributed light-emitting array can be independently adjusted to form structured light projection paths at different angles. The image processing host's storage unit stores a timing trigger control table corresponding to the multiple independently distributed light-emitting arrays. The timing trigger control table contains the trigger timing, driving current parameters, projection angle parameters, and image acquisition delay parameters for each independently distributed light-emitting array. The timing trigger control table also contains the illumination duration parameter for each independently distributed light-emitting array. The illumination duration of each independently distributed light-emitting array is consistent with the single-frame exposure duration of the industrial camera, ensuring that during the exposure of a single frame image, only the independently distributed light-emitting array at the corresponding angle is in the illuminated state, while the other independently distributed light-emitting arrays are in the off state. This avoids the aliasing of light from different angles and ensures that each frame image contains only illumination information from a single angle. When sending trigger pulses, the image processing host adopts a hard triggering method, which generates high-precision timing pulse signals through programmable logic devices. The timing accuracy of the trigger pulses is controlled at the microsecond level, ensuring that the lighting sequence of different independent light-emitting arrays is strictly synchronized with the exposure sequence of the industrial camera, thus avoiding underexposure or overexposure of the image due to timing deviations.
[0032] Within a single exposure cycle, the image processing host sequentially sends trigger pulses to the driving circuits of multiple independent light-emitting arrays according to the timing parameters in the timing trigger control table. Upon receiving the corresponding trigger pulse, each driving circuit of an independent light-emitting array illuminates the array according to preset driving current parameters, projecting structured light stripes onto the TGV through-hole glass substrate at a set tilt angle through the optical lens assembly. After each trigger pulse is sent to an independent light-emitting array, the image processing host sends a frame capture trigger signal to the industrial camera according to the preset delay time in the timing trigger control table, controlling the industrial camera to capture a single frame image. This single frame image contains only the image information of the glass substrate under structured light illumination at the corresponding angle. The image processing host arranges and combines all the single-angle images captured within a single exposure cycle according to the trigger timing sequence, generating an image sequence containing multi-angle illumination information. During the timing trigger control process, the total duration of a single exposure cycle is less than the maximum exposure interval of the industrial camera, ensuring that the acquisition of all single-angle images is completed within the same exposure cycle, avoiding pixel coordinate offsets between different frames caused by glass substrate displacement.
[0033] The adaptive backlight assembly is positioned directly beneath the TGV through-hole glass substrate, coaxially with the optical axis of the industrial camera lens. The adaptive backlight assembly includes a zone-driven diffuse light source matrix, which consists of multiple independently controlled diffuse light source zones. Each diffuse light source zone is equipped with an independent constant current drive circuit, allowing independent adjustment of the drive current to regulate the backlight brightness of the corresponding zone. Simultaneously, the image processing host sends trigger pulses to multiple independent light-emitting arrays according to a timing trigger control table. It also reads historical images captured by the industrial camera in the previous exposure cycle, locates the through-hole region in the historical images, extracts the grayscale values of all pixels within the located through-hole area, and calculates the average brightness value of the through-hole area. When locating the through-hole region in the historical images, the image processing host employs an edge-detection-based circular contour extraction algorithm. This algorithm performs edge detection on the historical images, extracts circular contours from the images, and filters the extracted circular contours based on the preset size parameters of the TGV through-holes. Contours that do not meet the size requirements are discarded, and the areas within the circular contours that meet the size requirements are identified as the through-hole areas. When there are multiple through-hole regions in the same frame of historical image, the image processing host calculates the average brightness value of the internal region of each through-hole, maps it to the corresponding diffuse light source matrix partition, and independently adjusts the driving current of each partition to achieve independent backlight brightness control of multiple through-hole regions, ensuring that the brightness of all internal regions of through-holes is within the preset dynamic range.
[0034] The image processing host compares the calculated average brightness value of the internal region of the via with a set transmission threshold. When the average brightness value is lower than the set transmission threshold, the image processing host maps the coordinate range of the internal region of the via in the image coordinate system to the physical partition coordinate system of the diffuse light source matrix, determines the diffuse light source matrix partition corresponding to the position of the internal region of the via, generates a drive current adjustment command, and sends it to the constant current drive circuit of the corresponding partition to increase the drive current of the corresponding partition, improve the backlight brightness of the corresponding partition, and enhance the brightness contrast between the background inside the via and the defects in the via wall. When the average brightness value is higher than the set transmission threshold, the image processing host generates a corresponding drive current adjustment command to decrease the drive current of the corresponding diffuse light source partition, reduce the backlight brightness of the corresponding partition, avoid overexposed transmitted light spots inside the via, and ensure that the grayscale value of the internal region of the via is within the detectable dynamic range.
[0035] Table 2 Mapping Relationship between Diffuse Light Source Matrix Partitions and Through-Hole Regions Table 2 shows the mapping relationship between the diffuse light source matrix partitions and the via regions. This table is stored in the image processing host's storage unit and is used to establish the correspondence between the physical partitions of the diffuse light source matrix and the via regions on the glass substrate. In the table, the partition number is the unique identifier of each independent partition in the diffuse light source matrix, the partition coordinate range is the mapping range of the corresponding diffuse light source partition in the image coordinate system, the corresponding via region coordinates are the coordinate range of the via internal region adjusted by that diffuse light source partition in the image coordinate system, the brightness adjustment priority is the backlight adjustment priority of the corresponding partition, and the drive current adjustment step size is the change in drive current during each adjustment. Through this mapping table, the image processing host can quickly locate the corresponding diffuse light source partition based on the position of the via region, achieving zoned adaptive backlight brightness adjustment. This ensures that the brightness of each via internal region is within a preset dynamic range, improving the brightness contrast between the background inside the via and the defects on the via wall.
[0036] In this embodiment, a timing-triggered control table is used to achieve strict synchronization between the sequential lighting of the multi-angle independent light-emitting array and image acquisition, ensuring the accuracy of the multi-angle illumination information of the image sequence. At the same time, through a partition-driven diffuse light source matrix, the driving current of the corresponding partition is adaptively adjusted based on the brightness value inside the aperture of the historical image of the previous exposure cycle, realizing closed-loop adjustment of the backlight brightness, stabilizing the brightness of the area inside the aperture, and providing a high-quality image data foundation for subsequent feature extraction and defect identification.
[0037] In another preferred embodiment, reference Figure 4The lightweight feature decoupling network comprises cascaded variance feature extraction and tensor feature extraction branches. The input to the variance feature extraction branch receives a grayscale variance feature map, while the input to the tensor feature extraction branch receives a gradient tensor feature map. The outputs of both branches are connected to the input of the spatial attention mechanism module. The variance feature extraction branch includes two sets of cascaded depthwise separable convolutional layers. Each set consists of a depthwise convolutional layer, a pointwise convolutional layer, and an activation layer. The kernel size of the depthwise separable convolutional layers is 3×3, with a stride of 1 and uniform padding. The activation layer uses the ReLU activation function. Depthwise separable convolution breaks down the conventional 2D convolution operation into two steps: depthwise convolution and pointwise convolution. Depthwise convolution performs independent convolution operations on each channel of the input feature map, with each kernel corresponding to only one input channel, achieving spatial feature extraction. Pointwise convolution uses a 1×1 kernel to transform and fuse the feature map output by depthwise convolution, achieving channel-dimensional feature extraction. Compared to conventional convolution, depthwise separable convolution significantly reduces the number of parameters and computational cost while maintaining feature extraction capabilities. The number of parameters can be reduced to 1 / 8 to 1 / 9 of that of conventional convolution, enabling a lightweight design of feature-decoupled networks. This allows the network to perform real-time inference operations on embedded image processing platforms, meeting the real-time requirements of industrial inspection scenarios. The first set of depthwise separable convolutional layers performs shallow feature extraction on the input gray-level variance feature map and outputs a shallow feature map containing gray-level variance distribution information. The second set of depthwise separable convolutional layers performs deep feature extraction on the shallow feature map and outputs a deep variance feature map containing the distribution information of reflective and background areas, which is the output feature map of the variance feature extraction branch.
[0038] The tensor feature extraction branch consists of two cascaded depthwise separable convolutional layers. The kernel size, stride, padding, and activation function of these layers are consistent with those of the depthwise separable convolutional layers in the variance feature extraction branch, ensuring that the feature extraction dimensions of the two branches match. The first set of depthwise separable convolutional layers performs shallow feature extraction on the input gradient tensor feature map, outputting a shallow feature map containing gradient directionality information. The second set of depthwise separable convolutional layers performs deep feature extraction on the shallow feature map, outputting a deep tensor feature map containing defect edge directionality response information; this is the output feature map of the tensor feature extraction branch.
[0039] The spatial attention mechanism module receives the variance feature map output from the variance feature extraction branch and the tensor feature map output from the tensor feature extraction branch as inputs. First, it concatenates the two feature maps along the channel dimension, generating a concatenated feature map with the sum of the channel numbers of the two feature maps. The core of the spatial attention mechanism is to use learned weight parameters to differentially weight features at different pixel positions in the feature map, strengthening useful feature information for defect detection and suppressing interfering feature information that is useless for defect detection. Unlike the channel attention mechanism, the spatial attention mechanism focuses on the spatial dimension of the feature map, assigning independent weights to the features at each pixel position. This allows for precise location of pixels in the feature map belonging to reflective areas, background areas, and defect areas, achieving pixel-level feature suppression and enhancement, and more accurately separating defect features from interfering features. The spatial attention mechanism module inputs the stitched feature map into a 1×1 convolutional layer with shared weights, outputting a single channel. Through convolution, the multi-channel stitched feature map is mapped to a single-channel spatial weight parameter matrix. Then, a sigmoid activation function normalizes the values in the spatial weight parameter matrix to the range of 0 to 1, generating the final spatial weight matrix. Each weight value in the spatial weight matrix corresponds to a feature at the same pixel location in the input feature map. The closer the weight value is to 1, the higher the probability that the corresponding pixel location belongs to a reflective or background area; the closer the weight value is to 0, the higher the probability that the corresponding pixel location belongs to a defect edge area.
[0040] The spatial attention mechanism module performs pixel-level weighting on the input variance feature map and tensor feature map based on the generated spatial weight matrix. For the variance feature map, the module uses inverse weighting, subtracting the spatial weight matrix from the all-one matrix to obtain the inverse weight matrix. A pixel-level Hadamard product is then performed between the variance feature map and the inverse weight matrix to obtain a reflection suppression feature map. In this map, features corresponding to high-weighted reflective regions are significantly suppressed, while only low-weighted non-reflective regions retain their features. For the tensor feature map, the module uses forward weighting, performing a pixel-level Hadamard product between the tensor feature map and the spatial weight matrix to obtain a background suppression feature map. In this map, features corresponding to high-weighted background regions are preserved, while low-weighted non-background regions are suppressed.
[0041] The lightweight feature decoupling network introduces a residual connection structure during the generation of the reflection suppression feature map. The input of the residual connection structure is connected to the input of the variance feature extraction branch, and the output of the residual connection structure is connected to the output of the spatial attention mechanism module, where it is pixel-level superimposed with the reflection suppression feature map output by the spatial attention mechanism module. The residual connection structure includes a set of high-pass filtering layers and two sets of 1×1 convolutional layers. The high-pass filtering layer performs high-pass filtering on the input gray-level variance feature map, extracting high-frequency gray-level abrupt change features. These high-frequency gray-level abrupt change features include both edge abrupt change features of large-area specular reflection halos and local high-frequency gray-level abrupt change features caused by micro-cracks on the walls of TGV vias. The high-pass filtering layer uses a 3×3 Laplacian operator as the filtering kernel to perform convolution operations on the input gray-level variance feature map, extracting high-frequency components in the gray-level variance feature map, i.e., features of regions where gray-level values change drastically. The edges of large-area specular reflection halos exhibit wide-ranging gray-level abrupt changes, corresponding to a large spatial distribution range of high-frequency components. In contrast, gray-level abrupt changes caused by micro-cracks are localized and narrow-range, with a smaller spatial distribution range of high-frequency components and a larger gradient. The spatial attention mechanism, when suppressing reflective areas, suppresses the high-frequency components at the edges of large-area reflections, and also suppresses the local high-frequency components of micro-cracks. Through a residual connection structure, the original high-frequency components from the input are directly superimposed across layers to the output, compensating for the suppressed high-frequency components of micro-cracks. This eliminates large-area reflection halos while preserving the feature information of micro-cracks, preventing the smooth loss of micro-crack features. Two sets of 1×1 convolutional layers adjust the number of channels in the extracted high-frequency gray-level abrupt change features to match the number of channels in the reflection suppression feature map, ensuring dimensionality matching in the superposition operation.
[0042] The formula for generating the reflection suppression feature map after adding the residual connection structure is as follows: in, This is the final reflection suppression feature map after adding the residual connection structure. This is the initial reflection suppression feature map output by the spatial attention mechanism module. The high-frequency grayscale transition feature map is extracted and adjusted for the number of channels in the residual connection structure. Through the residual connection structure, the initial reflection suppression feature map eliminates large-area specular highlight halos while directly superimposing the high-frequency grayscale transition features at the input end to the output end across layers. This preserves the high-frequency local grayscale abrupt change features caused by microcracks, avoids the smoothing of microcrack features during the weighted suppression process of the spatial attention mechanism, and ensures that the feature information of microcrack defects is not lost during feature decoupling.
[0043] Table 3 Lightweight Feature Decoupling Network Layer Structure and Parameter Configuration Table 3 shows the layer structure and parameter configuration of the lightweight feature decoupling network. This table clearly defines the modules to which each layer belongs, the number of input and output channels, the kernel size, stride, and activation function. The table lists depthwise separable convolutional layers separately as depthwise convolutional layers and pointwise convolutional layers, ensuring sufficient disclosure of details in the feature extraction process. The number of input channels in the channel concatenation layer is the sum of the number of channels in the output feature maps of the variance feature extraction branch and the tensor feature extraction branch. The shared-weight convolutional layer has only one output channel, used to generate a single-channel spatial weight matrix. The number of output channels in the convolutional layers of the residual connection structure is consistent with the number of output channels in the variance feature extraction branch, ensuring dimensionality matching in feature superposition operations. Through this layer structure configuration, the lightweight feature decoupling network uses depthwise separable convolutions instead of conventional convolutions, significantly reducing the number of parameters and computational cost, achieving a lightweight design. Simultaneously, through dual-branch feature extraction and spatial attention mechanisms, it achieves decoupling and separation of reflective and background features.
[0044] In this embodiment, a lightweight extraction of gray-level variance features and gradient tensor features is achieved through a dual-branch depthwise separable convolutional structure. A spatial attention mechanism is used to achieve weight allocation and feature suppression between reflective and background regions. At the same time, by introducing a residual connection structure, the high-frequency gray-level jump features at the input end are superimposed across layers to the output end of the reflectivity suppression feature map. While eliminating large-area specular highlight halos, the high-frequency local gray-level abrupt change features caused by micro-cracks are preserved. This avoids the micro-crack features being smoothed along with the weighted suppression process, ensuring that the feature information of micro-defects is not lost during feature processing.
[0045] In yet another preferred embodiment, reference is made to Figure 6 The image processing host acquires the reflection suppression feature map and background suppression feature map output by the lightweight feature decoupling network. It then performs a pixel-level AND operation on the two feature maps to generate a fused feature map. The pixel-level AND operation uses pixel-level logical multiplication. For the same pixel coordinate in both feature maps, only if both values are positive is the value at the corresponding pixel position in the fused feature map retained as the product of the two values; otherwise, the value at the corresponding pixel position in the fused feature map is set to zero. Through this operation, the fused feature map retains only pixels that simultaneously satisfy the conditions of reflection and background suppression; that is, it retains only the defect edge feature information of the TGV aperture edge, while the feature information of other reflection and background areas is discarded.
[0046] The image processing host performs binarization on the fused feature map, converting it into a binary image using a preset grayscale threshold. Pixels with grayscale values greater than the preset threshold are set to 1, while pixels with grayscale values less than or equal to the threshold are set to 0. The host then uses an eight-neighbor connected component labeling algorithm to label the connected components of the binarized image. This algorithm iterates through all pixels in the binary image. When a pixel with a grayscale value of 1 is encountered, its eight neighboring pixels are checked. If a labeled pixel exists in the neighborhood, it is labeled with the same connected component number as its neighbor. If no labeled pixel exists in the neighborhood, a new connected component number is assigned to the pixel. If multiple labeled pixels with different numbers exist in the neighborhood, these numbers are merged into a single connected component number. After traversal, all pixels with the same number form a connected component. All connected components are labeled, and a unique connected component number is assigned to each interconnected pixel region. The set of pixel coordinates for all labeled connected components is extracted. For each labeled connected component, the image processing host extracts the edge contour pixels, calculates the total pixel length of the edge contour (i.e., the contour perimeter), and calculates the total number of pixels contained in the connected component (i.e., the connected component area). The ratio of the edge contour perimeter to the area is then calculated. The image processing host compares the calculated ratio with a preset morphological threshold. If the ratio is lower than the preset morphological threshold, the connected component is determined to be a speckle noise region and removed from the connected component set. If the ratio is greater than or equal to the preset morphological threshold, the connected component is determined to be a qualified defective edge connected component and retained in the final defective connected component set.
[0047] For the preserved defect edge connected components, the image processing host extracts skeletonized skeletons by peeling away the outer pixels of the defect edge connected components layer by layer using a thinning algorithm until a single-pixel-wide defect skeleton segment is obtained. The thinning algorithm employs an iterative layer-by-layer peeling method, with each iteration divided into two sub-iterations. The first sub-iteration peels away the boundary pixels that meet the criteria, and the second sub-iteration continues peeling away the remaining boundary pixels that meet the criteria. This iterative process continues until no pixels can be peeled away, ultimately yielding a single-pixel-wide skeleton segment. This thinning algorithm ensures the connectivity of the skeleton segment, and the position of the skeleton segment remains consistent with the central axis of the original connected component, completely preserving the topological structure and shape features of the original connected component. There are no skeleton breaks or offsets, ensuring the accuracy of subsequent curvature calculations. The defect skeleton segment retains the topological structure and shape features of the defect edge connected component. The image processing host then parametrically processes the extracted defect skeleton segment, constructing a parametric function of the coordinates of each pixel on the skeleton segment with respect to the path length, using the starting point of the skeleton segment as the origin and the path length along the skeleton segment as the parameter. For each pixel p on the defect skeleton line segment, the image processing host calculates the curvature at that pixel. The formula for calculating the curvature is as follows: in, Let p be the curvature at pixel point p on the defect skeleton line segment. , Let p be a parameterized function of the coordinates of pixel p with respect to the path length p. , The first derivative of the parameterized function. , It is the second derivative of the parameterized function.
[0048] The image processing host arranges the curvature values of all pixels on the defect skeleton line segment in order of path length, constructing a curvature change sequence, and calculates the mean and variance of this curvature change sequence. The formula for calculating the variance of the curvature change sequence is as follows: in, Let be the variance of the curvature variation sequence, and L be the total pixel length of the defect skeleton line segment. This represents the mean of the curvature change sequence. Simultaneously, the image processing host maps the pixel coordinates of the connected components at the defect edge to the reflection suppression feature map, extracts the grayscale values at the corresponding pixel locations, and calculates the mean grayscale value of the connected components at the defect edge.
[0049] The image processing host compares the variance of the calculated curvature change sequence with a set tortuosity threshold and the mean gray value of the connected regions at the defect edges with a set gray value threshold. Based on the comparison results, the connected regions at the defect edges are classified. When the variance of the curvature change sequence is greater than the set tortuosity threshold and the mean gray value is lower than the set gray value threshold, the image processing host classifies the connected regions at the defect edges as microcracks. When the variance of the curvature change sequence is less than the set tortuosity threshold and the mean gray value is greater than the set gray value threshold, the image processing host classifies the connected regions at the defect edges as adhesive residue defects. The skeleton segments of microcrack defects exhibit irregular tortuosity, corresponding to a larger variance in the curvature change sequence. Simultaneously, the light transmittance in the microcrack region is higher, corresponding to a lower mean gray value. The edge contours of adhesive residue defects are relatively smooth, corresponding to a smaller variance in the curvature change sequence. Simultaneously, the light transmittance in the adhesive region is lower, corresponding to a higher mean gray value. By comparing thresholds in these two dimensions, accurate differentiation between the two defect types can be achieved. When classifying defects, the image processing host also combines the position information of the connected regions at the defect edges, compares the coordinates of the connected regions at the defect edges with the circular outline coordinates of the through hole, calculates the distance between the connected regions at the defect edges and the through hole outline, and only classifies the connected region when the distance between the connected regions at the defect edges and the through hole outline is less than a preset distance threshold, thereby eliminating false defect connected regions that are far from the through hole outline and further improving the accuracy of defect classification.
[0050] After classifying defects, the image processing host extracts all pixel coordinates of the connected regions of the defect edges classified as microcracks or residual adhesive defects. It calculates the minimum bounding rectangle of this connected region and extracts the coordinates of its top-left and bottom-right corners, as well as the center coordinates. The image processing host establishes a mapping relationship between the coordinate system of the original panoramic image acquired by the industrial camera and the physical motion coordinate system of the precision displacement platform. It maps the center coordinates of the defect's bounding rectangle to the original panoramic image coordinate system, calculates the pixel offset of the defect center relative to the center of the original panoramic image coordinate system, and then converts the pixel offset into the physical offset of the defect on the TGV through-hole glass substrate using a pixel-to-physical-size mapping coefficient. The formula for calculating the physical offset is as follows: in, , These are the physical offsets in the X and Y directions, respectively. , Let be the coordinates of the center of the circumscribed rectangle of the defect in the original panoramic image coordinate system. , ρ represents the center coordinates of the original panoramic image coordinate system, and ρ is the mapping ratio coefficient between image pixels and physical size, that is, the physical size corresponding to a single pixel.
[0051] The image processing host generates corresponding motion control commands based on the calculated physical offsets in the X and Y directions. These commands are then sent to the precision displacement platform carrying the TGV through-hole glass substrate via a motion control bus. Upon receiving the motion control commands, the precision displacement platform, based on the X and Y displacement parameters in the commands, drives the platform to perform corresponding translational movements, moving the corresponding defective through-hole to a preset re-inspection station. This re-inspection station is equipped with a high-magnification lens and a high-resolution industrial camera, allowing for secondary high-magnification observation of the defective through-hole to acquire high-resolution detailed images of the defect, providing data support for further analysis and judgment. The magnification of the high-magnification lens at the re-inspection station is adjustable; the image processing host can adjust the magnification according to the size of the defect to ensure that the details of the defect are fully presented in the high-resolution image. After the secondary high-magnification observation, the image processing host associates and stores the high-resolution defect detail image with the previously acquired panoramic image, defect classification information, and location information, generating a complete defect inspection report, providing comprehensive data support for subsequent glass substrate quality judgment.
[0052] Table 4 Defect Classification Thresholds and Corresponding Features Table 4 presents the defect classification thresholds and corresponding features, stored in the image processing host's storage unit as the basis for defect classification. In the table, the curvature change sequence variance threshold serves as a quantitative standard for distinguishing the degree of tortuosity in defect morphology; the grayscale mean threshold serves as a quantitative standard for distinguishing the light transmittance of defect areas; morphological parameter constraints are the morphological screening conditions for defect connected regions; and the corresponding features represent the correspondence between the physical characteristics and image features of different types of defects. Using this table, the image processing host can accurately classify and screen defect edge connected regions based on the quantified parameter thresholds, eliminating noisy areas, distinguishing between microcrack defects and residual adhesive defects, and ensuring the accuracy of defect classification.
[0053] In this embodiment, defect feature fusion and interference feature removal are achieved through pixel-level AND operations. Speckle noise regions are eliminated through connected component labeling and morphological parameter screening. Defect morphology is quantitatively characterized through skeleton extraction and curvature calculation. Microcrack defects and residual adhesive defects are accurately classified based on the variance of curvature change sequence and grayscale mean. At the same time, through coordinate mapping and physical offset calculation, a precision displacement platform is driven to move the defective through hole to the re-inspection station for secondary high-magnification observation. This achieves automatic defect identification, classification, and re-inspection positioning, providing a complete technical solution for the comprehensive detection and analysis of TGV through hole defects.
Claims
1. A TGV-based visual inspection and analysis system for through-hole defects, characterized in that, It includes a programmable multi-angle ring strobe light source, an adaptive backlight assembly, and an image processing host, wherein the image processing host is connected to the programmable multi-angle ring strobe light source and the adaptive backlight assembly; The image processing host controls the programmable multi-angle ring strobe light source to sequentially illuminate structured light sources at different angles within a single exposure cycle and simultaneously acquire image sequences. The image processing host extracts the gray-level variance and gradient response tensor of each pixel in the image sequence under different illumination angles, and concatenates the gray-level variance and the gradient response tensor into a pre-constructed lightweight feature decoupling network. The lightweight feature decoupling network separates the reflection suppression feature map and the background suppression feature map through a spatial attention mechanism; The image processing host performs pixel-level AND operations on the reflection suppression feature map and the background suppression feature map to extract the defect edge connected domain of the TGV via edge.
2. The system according to claim 1, characterized in that, The programmable multi-angle ring strobe light source includes multiple independent light-emitting arrays distributed in a ring, and the image processing host stores a timing trigger control table corresponding to the multiple independent light-emitting arrays; Within the single exposure cycle, the image processing host sequentially sends trigger pulses to the plurality of independent light-emitting arrays according to the timing trigger control table. After receiving the trigger pulses, the plurality of independent light-emitting arrays project structured light stripes at a set tilt angle. The image processing host controls the industrial camera to complete single-frame image capture at a preset delay time after each trigger pulse is sent, and combines the captured multiple single-angle images into the image sequence.
3. The system according to claim 1, characterized in that, For the same pixel coordinate point in the image sequence, the image processing host extracts the grayscale value of the pixel coordinate point in all frames of the image sequence to construct a grayscale sequence vector; The image processing host calculates the mean and discrete difference of the gray-level sequence vector, and uses the square of the discrete difference as the gray-level variance. For the reflective area of the glass substrate, the gray value of the pixel coordinate point changes drastically under different illumination angles, resulting in a high numerical distribution of the gray value variance. For the background area inside the through hole, the grayscale value of the pixel coordinate point remains stable under different illumination angles.
4. The system according to claim 1, characterized in that, The image processing host performs convolution operations on each frame of the image sequence using the horizontal gradient operator and the vertical gradient operator respectively, to obtain the horizontal gradient matrix and the vertical gradient matrix of each frame. The image processing host concatenates the horizontal and vertical gradient values of the same pixel coordinate point in all frame images to construct a two-dimensional vector containing multi-angle illumination information, and combines the two-dimensional vectors corresponding to all pixel coordinate points in the image sequence into the gradient response tensor. The gradient response tensor is used to characterize the directional response intensity of the defect edge under different structured light projection angles.
5. The system according to claim 1, characterized in that, The lightweight feature decoupling network includes a cascaded variance feature extraction branch and a tensor feature extraction branch, and the outputs of the variance feature extraction branch and the tensor feature extraction branch are both connected to the spatial attention mechanism. The spatial attention mechanism performs channel concatenation between the variance feature map output by the variance feature extraction branch and the tensor feature map output by the tensor feature extraction branch, and generates a spatial weight matrix through a convolutional layer with shared weights. The weight values in the spatial weight matrix are positively correlated with the suppression probability of the reflective area and the background area. The lightweight feature decoupling network weights the input features according to the spatial weight matrix and outputs the reflective suppression feature map and the background suppression feature map.
6. The system according to claim 1, characterized in that, The image processing host performs a logical multiplication operation on the values of corresponding pixel positions in the reflection suppression feature map and the background suppression feature map to generate a fused feature map; In the fused feature map, only pixels that simultaneously satisfy the conditions of suppressed reflective features and suppressed background features retain positive values, while the remaining pixels are set to zero. The image processing host performs connected component labeling on the fused feature map, calculates the ratio of the perimeter of the edge contour to the area of each connected component, removes speckle noise regions whose ratio of the perimeter of the edge contour to the area is lower than a preset morphological threshold, and identifies the connected components that meet the preset morphological threshold as the defective edge connected components.
7. The system according to claim 2, characterized in that, The adaptive backlight assembly is disposed directly below the TGV through-hole glass substrate and includes a zone-driven diffuse light source matrix. While sending trigger pulses to the multiple independent light-emitting arrays according to the timing trigger control table, the image processing host reads the average brightness value of the area inside the through hole in the historical image acquired by the industrial camera in the previous exposure cycle. When the average brightness value is lower than the set light transmission threshold, the image processing host increases the driving current of the diffuse light source matrix partition corresponding to the position of the internal region of the through hole.
8. The system according to claim 5, characterized in that, The lightweight feature decoupling network introduces a residual connection structure during the generation of the reflection suppression feature map; The residual connection structure directly superimposes the high-frequency grayscale jump features at the input end of the variance feature extraction branch onto the feature map at the output end of the spatial attention mechanism across layers. Through the residual connection structure, the reflection suppression feature map eliminates large-area specular highlight halos while retaining the high-frequency local gray-scale abrupt changes caused by micro-cracks.
9. The system according to claim 8, characterized in that, The image processing host performs skeletonization extraction on the connected components of the defect edge to obtain defect skeleton line segments; The image processing host calculates the curvature change sequence of each pixel on the defect skeleton line segment and extracts the gray-scale mean of the defect edge connected region in the reflection suppression feature map; When the variance of the curvature change sequence is greater than a set tortuosity threshold and the mean gray value is lower than a set gray value threshold, the image processing host classifies the defect edge connected region as a microcrack defect. When the variance of the curvature change sequence is less than the set curvature threshold and the mean gray value is greater than the set gray value threshold, it is classified as a residual adhesive defect.
10. The system according to claim 7, characterized in that, After completing the defect classification, the image processing host extracts the coordinates of the bounding rectangle of the edge connected domain of the defect that is classified as a microcrack defect or a residual adhesive defect. The image processing host maps the coordinates of the circumscribed rectangle to the coordinate system of the original panoramic image captured by the industrial camera, and calculates the physical offset of the defect on the TGV through-hole glass substrate. The image processing host generates motion control commands based on the physical offset, and sends the motion control commands to the precision displacement platform that carries the TGV through-hole glass substrate, driving the precision displacement platform to move the corresponding defective through-hole to a preset re-inspection station for secondary high-magnification observation.