An intelligent detection system for image defects of a thick-wall part of a vehicle lamp

By using a laser excitation and photoacoustic acquisition module and a 3D graph convolutional network, the problem of deep overlap in the detection of internal defects in thick-walled automotive headlight components was solved, achieving efficient and accurate defect identification and classification.

CN122171547APending Publication Date: 2026-06-09QINGDAO GUIGE PHOTOELECTRIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO GUIGE PHOTOELECTRIC TECH CO LTD
Filing Date
2026-03-31
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies cannot effectively detect internal defects in thick-walled transparent components of automotive headlights, especially bubbles and black spots with a depth greater than 8mm. Furthermore, they cannot separate the superimposed projections of different depth layers, resulting in low detection efficiency and misjudgments.

Method used

A laser excitation and photoacoustic acquisition module is used to excite photoacoustic shock waves through a time-coded laser pulse sequence in the depth direction. Combined with multi-layer original correlation intensity matrix reconstruction and three-dimensional photoacoustic density field, a three-dimensional graph convolutional network and a multi-head self-attention mechanism are used to extract and classify defect features.

Benefits of technology

It enables efficient detection of internal defects in thick-walled parts, solves the problem of misjudgment caused by deep overlap, improves detection accuracy and efficiency, and meets the high-speed detection needs of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122171547A_ABST
    Figure CN122171547A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image analysis, and discloses a kind of vehicle lamp thick wall piece image defect intelligent detection system;Including emitting depth direction time coding laser pulse sequence to vehicle lamp thick wall piece, so that different depth defects are excited in turn to generate photoacoustic shock wave, and the photoacoustic shock wave is collected in space-time combination, and multiple layer original correlation intensity matrix is generated;Tomographic reconstruction is executed to multiple layer original correlation intensity matrix, and the complete three-dimensional photoacoustic density field of thick wall piece is generated;Three-dimensional photoacoustic density field is carried out voxel grid division and executes three-dimensional connected domain marking, and all independent defect bodies are obtained;The geometric feature and topological feature of the voxel set of each independent defect body are calculated, and the defect feature vector set is used as input, and the defect type and three-dimensional center coordinates are output through the pre-trained defect mapping model;According to defect type and three-dimensional center coordinates, mechanical hand is controlled to execute sorting or marking;Vehicle lamp thick wall piece image defect intelligent detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, and more specifically, to an intelligent detection system for image defects in thick-walled automotive headlight components. Background Technology

[0002] Thick-walled transparent components for automotive headlights (typically 8-35mm thick) are highly susceptible to internal and surface defects during injection molding, such as bubbles, black spots, flow lines, silver streaks, cold runner spots, and shrinkage marks. Current defect detection technologies for thick-walled automotive headlight components still face significant and insurmountable bottlenecks.

[0003] Traditional industrial camera + area array light source solutions can only detect surface defects and are completely powerless against bubbles and black spots with a depth of more than 8mm inside thick-walled parts. Moreover, although existing X-ray or industrial CT solutions can see internal defects, the equipment cost is as high as several million yuan and the imaging speed is slow, which cannot meet the high-speed cycle requirements of automotive lighting production lines.

[0004] Most critically, all existing technologies cannot solve the problem of "the projection superposition of the same defect at different thickness levels." That is, a bubble at a depth of 15mm and a black dot at a depth of 3mm will completely overlap in the image, forming an inseparable artifact. Existing technologies can only output "suspected defects" and cannot give the true three-dimensional location and true category of the defect. As a result, quality inspectors still need to manually review the data, resulting in low inspection efficiency and falling far short of the requirements for unmanned operation.

[0005] Therefore, an intelligent image defect detection system for thick-walled automotive headlight components is designed. Summary of the Invention

[0006] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: an intelligent detection system for image defects in thick-walled automotive headlight components, comprising: The laser excitation and photoacoustic acquisition module is used to emit a laser pulse sequence that is time-coded in the depth direction to the thick-walled part of the vehicle headlight, so that defects of different depths are excited in sequence to generate photoacoustic shock waves, and the photoacoustic shock waves are spatiotemporally acquired to generate a multi-layer original correlation intensity matrix. The photoacoustic tomography reconstruction and defect feature extraction module performs tomography reconstruction on the multi-layer original correlation intensity matrix to generate a complete three-dimensional photoacoustic density field for the thick-walled component; it performs voxel meshing on the three-dimensional photoacoustic density field and performs three-dimensional connected domain labeling to obtain all independent defect bodies; it calculates the geometric and topological features of the voxel set for each independent defect body to generate a defect feature vector. The defect classification decision module takes a set of defect feature vectors as input and outputs the defect type and three-dimensional center coordinates through a pre-trained defect mapping model. The execution control module is used to control the robot to perform sorting or marking based on the defect type and the three-dimensional center coordinates.

[0007] Preferably, the depth-direction time encoding is performed by a programmable electro-optic delay line, including: the delay line pre-allocates a corresponding initial time delay for each pulse in the laser pulse sequence according to a preset depth scanning range and step interval, so that it sequentially excites defects at different depths; Between every two adjacent pulses, a reference pulse is inserted. This reference pulse propagates along the same optical path and is reflected at a fixed reference point on the surface of the thick-walled part. The actual flight time of the reference pulse is detected in real time. Calculate the deviation between the theoretical and actual flight time of the reference pulse from transmission to return, and correct the initial delay of subsequent pulses based on the deviation.

[0008] Preferably, the step of correcting the initial delay of subsequent pulses based on the deviation value includes: For the next pulse to be launched at a target depth of d, the new time delay is the initial time delay plus a correction term. Where Δt represents the deviation value and D_ref represents the reference depth.

[0009] Preferably, the spatiotemporal joint acquisition of the photoacoustic shock wave to generate a multi-layer original correlation intensity matrix includes: By using a multi-element ultrasonic detector array distributed around the thick-walled component, the photoacoustic shock wave signal generated by laser pulse sequence is simultaneously acquired to obtain multi-channel time-domain data. Based on the time delay allocated to each laser pulse and its corresponding depth coordinates, the multi-channel time domain data is divided into subsets corresponding to different depth layers according to time windows; For each depth layer, the photoacoustic shock wave signals of each detector in the subset of data of that layer are time-shifted and aligned according to the theoretical propagation time from each lateral coordinate in that depth layer to each detector. Then, the amplitudes of the aligned signals of each detector are weighted and summed, and the magnitude of the summation result is taken as the estimated value of the photoacoustic source intensity of that depth layer. Arrange the photoacoustic source intensity estimates obtained from all depth layers according to spatial coordinates to generate a multi-layer original correlation intensity matrix with horizontal coordinates as rows and columns, depth coordinates as layers, and corresponding photoacoustic source intensity estimates as matrix elements.

[0010] Preferably, the tomographic reconstruction of the multilayer original correlation strength matrix includes: Based on the preset time delay and its corresponding depth coordinates, the multi-layer original correlation strength matrix is ​​decoupled according to the depth coordinates and used as a two-dimensional image sequence. First, perform a Hilbert transform on the intensity sequence at each spatial location along the depth direction to extract the instantaneous envelope and obtain a sparsed envelope matrix that characterizes the photoacoustic energy distribution. Secondly, based on the correspondence between time delay and depth coordinates, each layer of the envelope matrix directly corresponds to a physical depth coordinate, and the inverse Radon transform based on regularization constraints is performed layer by layer along the depth direction to reconstruct the lateral photoacoustic absorption distribution of each depth layer through analytical calculation. Finally, the transverse photoacoustic absorption distributions at each depth level are stacked in depth order to form a three-dimensional data volume, generating a complete three-dimensional photoacoustic density field for the thick-walled component.

[0011] Preferably, the step of voxel meshing the three-dimensional photoacoustic density field and performing three-dimensional connected component labeling includes: The three-dimensional photoacoustic density field is divided into a uniform three-dimensional voxel grid according to a preset voxel size, and each voxel contains the photoacoustic density value at that location. Threshold segmentation is performed on voxels, and voxels whose photoacoustic density values ​​exceed a preset threshold are marked as defective voxels; Perform three-dimensional connected component labeling on the labeled defect voxels, merge spatially adjacent defect voxels into the same connected component as an initial defect voxel, and count all initial defect voxels as the initial defect voxel set. In the initial set of defect bodies, for adjacent initial defect bodies whose projected area overlap rate in the depth direction exceeds a preset threshold, a forced separation process based on principal component analysis is performed to separate defect bodies that are adhered along the depth direction but are actually independent, thus obtaining all independent defect bodies.

[0012] Preferably, the step of calculating the geometric and topological features of the voxel set for each independent defect body to generate a defect feature vector includes: For each individual defect body, obtain the set of spatial coordinates of all voxels it contains; Calculate the smallest circumscribed ellipsoid of the set of voxel coordinates, extract the ratio of the lengths of the three principal axes of the ellipsoid, and denot it as the ellipsoid three-axis ratio, which serves as a geometric feature describing its overall shape; The spherical distribution statistics of the normal vectors of the boundary voxels of independent defect bodies are performed to obtain their spherical harmonic coefficients, which are used as topological features to describe their surface roughness and texture. The information entropy of the distribution probability of all voxels of a statistically independent defective body in the depth direction is used as a distribution feature to describe the degree of its dispersion in the depth direction. The ellipsoidal triaxial ratio, spherical harmonic coefficient, and information entropy are combined to form the defect feature vector of the independent defect body. The defect feature vectors of all independent defect bodies are statistically analyzed to form a defect feature vector set.

[0013] Preferably, the defect mapping model is based on a three-dimensional graph convolutional network and a multi-head self-attention mechanism. The three-dimensional graph convolutional network uses each independent defect body as a node. When the Euclidean distance between two independent defect bodies is less than a preset distance threshold, an edge is established between them to perform neighborhood feature aggregation on the input defect feature vector set. The multi-head self-attention mechanism performs global context modeling on the node feature sequence and outputs the defect type and three-dimensional center coordinates of each defect body.

[0014] Preferably, the neighborhood feature aggregation of the input defect feature vector includes: for the defect feature vector of the input node, collecting the defect feature vectors of all its neighboring nodes, performing an aggregation operation with the defect feature vector of the node itself, transforming the aggregated result through a fully connected layer to obtain the updated defect feature vector of the node, and arranging them in a certain order to form a node feature sequence.

[0015] Preferably, the pre-training of the defect mapping model includes: using a sample set of defect feature vectors labeled with defect types and three-dimensional center coordinates, with the goal of minimizing the sum of the classification loss function and the coordinate regression loss function, and performing end-to-end optimization of the parameters of the three-dimensional graph convolutional network and the multi-head self-attention mechanism through the backpropagation algorithm.

[0016] The technical effects and advantages of the intelligent image defect detection system for thick-walled automotive headlight components of this invention are as follows: By using a laser excitation and photoacoustic acquisition module, the problem that traditional optical inspection cannot penetrate the interior of thick-walled transparent parts and is powerless against defects with a depth of more than 8mm has been solved. This enables effective detection of defects of any depth inside thick-walled parts, breaking through the depth limitations of traditional optical inspection.

[0017] The depth direction time encoding and real-time reference pulse correction achieved by the programmable electro-optic delay line solve the problems of focusing depth drift and poor detection repeatability caused by temperature changes, eliminate the influence of temperature-induced refractive index changes on focusing accuracy, and ensure long-term stability and accuracy of depth positioning.

[0018] By synchronously acquiring photoacoustic signals using a multi-element ultrasonic detector array and coherently superimposing them with the time difference of arrival and amplitude spatial distribution, the time-domain signals are transformed into a three-dimensional intensity matrix decoupled by depth layers, providing raw data separated by depth for subsequent reconstruction.

[0019] By using Hilbert transform, the energy envelope is extracted to suppress sidelobe interference; and by analytical calculation, a high-resolution transverse photoacoustic absorption distribution is reconstructed, solving the problems of oscillation interference and insufficient transverse resolution in the original signal.

[0020] After threshold segmentation and connected component labeling, PCA analysis is performed on adjacent connected components with high overlap rates in the depth direction projection area. Based on the main direction characteristics, it is determined whether they are true adhesions, and forced separation is performed along the transverse plane to ensure that each independent defect body corresponds to a real physical defect. This solves the problem of misjudgment of defect adhesion caused by depth direction projection overlap.

[0021] By extracting multi-dimensional features, the problem of not being able to quantify defect morphology, surface texture and depth distribution is solved. By using a defect mapping model that combines a 3D graph convolutional network with a multi-head self-attention mechanism, the problems of low accuracy in isolated feature classification and inability to utilize spatial correlation between defects are solved. This allows the prediction of defect type and 3D center coordinates to take into account both local context and overall distribution. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the intelligent image defect detection system for thick-walled automotive headlight components of the present invention; Figure 2 This is a flowchart illustrating the defect mapping model in this invention. Detailed Implementation

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

[0024] Please see Figure 1 and Figure 2 In this embodiment of the invention, an intelligent image defect detection system for thick-walled automotive headlight components includes: The laser excitation and photoacoustic acquisition module is used to emit a laser pulse sequence that is time-coded in the depth direction to the thick-walled component of the vehicle headlight, so that defects of different depths are excited in sequence to generate photoacoustic shock waves, and the photoacoustic shock waves are spatiotemporally acquired to generate a multi-layer original correlation intensity matrix; the laser here can be a femtosecond laser.

[0025] The photoacoustic tomography reconstruction and defect feature extraction module performs tomography reconstruction on the multi-layer original correlation intensity matrix to generate a complete three-dimensional photoacoustic density field for the thick-walled component; it performs voxel meshing on the three-dimensional photoacoustic density field and performs three-dimensional connected domain labeling to obtain all independent defect bodies; it calculates the geometric and topological features of the voxel set for each independent defect body to generate a defect feature vector. The defect classification decision module takes a set of defect feature vectors as input and outputs the defect type and three-dimensional center coordinates through a pre-trained defect mapping model. The execution control module is used to control the robot to perform sorting or marking based on the defect type and the three-dimensional center coordinates.

[0026] The depth direction time encoding is executed by a programmable electro-optic delay line, which includes: the delay line pre-allocating a corresponding initial time delay for each pulse in the laser pulse sequence based on a preset depth scanning range (which is the total depth to be detected in the thick-walled component of the headlight, set by measuring the total detection range from the upper surface of the lens to the bottom surface, such as 0-30mm) and a step interval (which refers to how long the pulse excitation is performed every interval within the total detection range, which determines the fineness of the scan). This allows the laser pulse to be focused sequentially on different physical depths inside the thick-walled component, thereby exciting defects at different depths sequentially. It should be noted that an electro-optic delay line refers to controlling the time it takes for a laser to pass through by changing the refractive index of a material through the application of voltage. Programmable means that the delay is precisely controlled by software through digital chips such as FPGA (Field Programmable Gate Array). Programmable electro-optic delay lines are used to schedule the start time of each pulse according to the delay of each pulse, and precisely control when each laser pulse starts and to which depth it is focused.

[0027] The delay amount is the start-up delay time allocated to each laser pulse, which is the total time required for the laser to travel from emission, reach the designated depth, and then generate sound waves that are received by the surface detector. Generally, the delay amount = (2 × target depth × material refractive index) ÷ speed of light. For example, when the first pulse is emitted, the delay line allocates a delay amount of T1, which makes it focus exactly at depth D1 (e.g., 0.1 mm). Then, the delay line allocates a slightly larger delay amount T2 to the second pulse, which makes the laser focus at depth D2 (e.g., 0.2 mm), and so on. The Nth pulse is allocated a delay amount TN and focused at depth Dn (e.g., 30.0 mm). Throughout the process, the delay line allocates a different delay amount to each pulse according to the step interval, allowing it to scan different physical depths of the thick-walled part one after another accurately.

[0028] By designing the time delay, the pulse sequence is emitted sequentially, with each pulse carrying a unique timestamp (i.e., time delay). Since the ultrasonic waves excited by each pulse at different depths are completely staggered in time, the sensor can clearly distinguish which wave comes from D1 and which wave comes from D2 during subsequent acquisition. In this way, the spatial depth is perfectly separated by the time difference, fundamentally solving the fatal problem of "superposition of projections of defects at different depths" in the background technology.

[0029] Furthermore, the propagation speed of femtosecond lasers in transparent, thick-walled parts is affected by temperature (thermo-optic effect). When the ambient temperature of the production line changes or the temperature of the thick-walled part itself changes due to residual heat from injection molding, the refractive index of the material will change. This means that the same time delay corresponds to different physical depths. Without correction, a depth of 10mm that was accurately detected yesterday may only be focused to a depth of 9.5mm today due to increased temperature and a higher refractive index, causing the detection position to drift. Therefore, this solution is designed as follows: Between every two adjacent pulses, a reference pulse for calibration is inserted. This reference pulse propagates along the same optical path and is reflected at a fixed reference point (such as a coating or a specific reflective surface) on the surface of the thick-walled part. The actual flight time of the reference pulse is detected in real time. The refractive index drift caused by temperature changes is calculated, which is the deviation between the theoretical flight time of the reference pulse from emission to return and the actual flight time. If the actual time is longer than the theoretical time, it means that the refractive index has increased (the speed of light has slowed down), resulting in a shallower actual focusing depth. This drift is fed back as an error signal to the programmable radio delay line, which corrects the initial time delay of subsequent pulses based on the deviation value, ensuring the long-term stability and accuracy of the laser focusing depth. It should be noted that the reference pulse is an auxiliary laser pulse with a known optical path used for calibration; it is not used to excite defects to generate photoacoustic signals.

[0030] The step of correcting the initial delay of subsequent pulses based on the deviation value includes: For the next pulse to be launched at a target depth of d, the new time delay is the initial time delay plus a correction term. This ensures the focusing accuracy of each depth layer; where Δt represents the deviation value and D_ref represents the reference depth (such as the depth of the fixed reflective surface inside a thick-walled component).

[0031] Specifically, theoretical flight time , The nominal refractive index is... Represents the speed of light, with a deviation value Δt= - , For the actual flight time, calculated using the formula... It can be seen that the change in refractive index Δn = n− = 'n' represents the actual refractive index, which is based on the nominal refractive index for the next pulse to be emitted at a target physical depth of 'd'. The calculated delay is: After the refractive index changes to n, the actual time delay required to accurately focus at the same physical depth d should be: , Δn= Substituting, we get: .

[0032] Since a single detector can only record the change in signal intensity over time, it cannot locate the sound source. Spatiotemporal joint acquisition utilizes the positional differences of multiple detectors in three-dimensional space. The same photoacoustic signal arrives at different detectors at different times (time difference), and the intensity may also vary due to different propagation distances and angles. By jointly analyzing this temporal and spatial information, the three-dimensional coordinates of the sound source (defect) can be uniquely determined.

[0033] The spatiotemporal joint acquisition of photoacoustic shock waves generates a multi-layered original correlation intensity matrix, including: A multi-element ultrasonic detector array distributed around a thick-walled component is used to synchronously acquire photoacoustic shock wave signals excited by a laser pulse sequence, obtaining multi-channel time-domain data. Specifically, assuming four ultrasonic detectors are arranged around the thick-walled component, each detector continuously records the voltage signal. A complete scan contains multiple laser pulses, and continuous recording begins from the first pulse emission, resulting in four signal curves that change over time, which constitute the four-channel time-domain data.

[0034] Based on the time delay allocated to each laser pulse and its corresponding depth coordinates, the multi-channel time-domain data is divided into subsets corresponding to different depth layers according to time windows. Specifically, the time delay of each laser pulse determines the focusing depth and also the approximate time range for the photoacoustic signal excited at that depth to reach the detector. To separate the signals from different depth layers, a time window is defined based on the emission time and sound wave propagation time of each pulse, specifically capturing the signal segment corresponding to that layer. For example, suppose three depth layers are scanned: Layer 1 (depth d1=1 mm), sound velocity vs=1500 m / s, it takes about 0.67 μs for the sound wave to travel from a depth of 1 mm to the surface.

[0035] Layer 2 (depth d2=2 mm) has a propagation time of approximately 1.33 μs.

[0036] Layer 3 (depth d3=3 mm), propagation time approximately 2.00 μs.

[0037] The laser pulse emission times (instantaneous delay) are as follows: Pulse 1 (layer 1) is emitted at t=0; Pulse 2 (layer 2) is emitted at t=5 μs; Pulse 3 (layer 3) is emitted at t=10 μs; Set a time window for each depth layer, with the window start time slightly earlier than the earliest arrival time and the end time slightly later than the latest arrival time, such as: Layer 1 time window: [0.5 μs, 2.5 μs]; Layer 2 time window: [5.5 μs, 7.5 μs]; Layer 3 time window: [10.5 μs, 12.5 μs]; By extracting the signal segments corresponding to each detector from the multi-channel time-domain data according to the time window mentioned above, a subset of data for each depth layer is obtained. For example, the subset of data for layer 1 contains waveforms of four detectors within 0.5–2.5 μs; the subset of data for layer 2 contains waveforms of four detectors within 5.5–7.5 μs, and so on.

[0038] For each depth layer, the photoacoustic shock wave signals from each detector in the subset of data for that layer are time-shifted and aligned according to the theoretical propagation time from each lateral coordinate (X,Y) within that depth layer to each detector. Then, the aligned signal amplitudes from each detector are weighted and summed (weighting coefficients are pre-set based on propagation distance or detector response). The magnitude of the summation is taken as the estimated photoacoustic source intensity for that depth layer. It should be noted that time-shifting alignment means calculating the theoretical propagation time required for the signal emitted by a hypothetical sound source (X,Y,Z) to reach each detector. Then, the actual signal recorded by each detector is shifted forward (or backward) by this theoretical time on the time axis. This ensures that if a sound source actually exists at that location, the shifted signals from all detectors are time-aligned. This is to compensate for the propagation delay of the sound wave from the sound source to different detectors, "pulling" the signals scattered on the time axis back to the same moment of sound source emission. Only after alignment can the energy of the real sound source (with defects) be in phase and enhanced, while noise is randomly superimposed and canceled out, resulting in a smaller superposition.

[0039] Arrange the photoacoustic source intensity estimates obtained from all depth layers according to spatial coordinates to generate a multi-layer original correlation intensity matrix with the horizontal coordinate (X, Y) as rows and columns, the depth coordinate (Z) as layers, and the corresponding photoacoustic source intensity estimates as matrix elements.

[0040] The tomographic reconstruction of the multilayer original correlation strength matrix includes: Based on the pre-defined time delay and its corresponding depth coordinates, the multi-layer original correlation intensity matrix is ​​decoupled according to the depth coordinates, resulting in a two-dimensional image sequence. It should be noted that the multi-layer original correlation intensity matrix is ​​a three-dimensional array, in which there is no aliasing (i.e., decoupling) between each layer (depth layer) in the depth direction. Therefore, this three-dimensional matrix can be regarded as a series of two-dimensional images arranged in depth order, with each image representing the lateral photoacoustic source intensity distribution of that depth layer.

[0041] First, along the depth direction (referring to the thickness direction perpendicular to the surface of the thick-walled component and pointing towards the interior of the material, i.e., the layer order from layer 1 to layer N in the matrix), the intensity sequence for each spatial location (here referring to a fixed lateral coordinate point) is calculated. For such a fixed lateral coordinate point, it has an intensity value at different depth layers; these values ​​arranged in depth order constitute a one-dimensional intensity sequence. For example, a fixed lateral coordinate (X=5, Y=3) has an intensity value of 0.12 at depth Z=1, 0.08 at depth Z=2, 0.15 at depth Z=3, and so on, resulting in the sequence [0.12, 0.08, 0.15, ...]. The intensity sequence at that spatial location along the depth direction is subjected to a Hilbert transform to extract the instantaneous envelope, resulting in a sparsed envelope matrix representing the photoacoustic energy distribution. It should be noted that each element in the original correlated intensity matrix is ​​already an estimate of the photoacoustic source intensity at that location, but it may contain oscillations or sidelobes caused by acoustic interference. By performing a Hilbert transform on the intensity sequence at each spatial location along the depth direction, the oscillating signal is converted into a smooth energy envelope, thereby highlighting the main lobe energy of defects and suppressing sidelobe interference. This process makes the data more sparse in the depth direction, facilitating subsequent processing.

[0042] Secondly, based on the correspondence between time delay and depth coordinates (as mentioned earlier, each time delay corresponds to a preset depth layer when setting the programmable electro-optic delay line), each layer of the envelope matrix directly corresponds to a physical depth coordinate, and a filtering inverse Radon transform based on regularization constraints is performed layer by layer along the depth direction. The transverse photoacoustic absorption distribution of each depth layer is reconstructed through analytical calculation. It should be noted that the envelope matrix is ​​regarded as a series of projection data in the depth direction. The transverse photoacoustic absorption distribution of each depth layer is reconstructed through the inverse Radon transform. Since the depth direction is decoupled, the transformation can be performed layer by layer. The regularization constraint is used to suppress noise, and the absorption coefficient distribution of each layer is calculated analytically at once as the transverse photoacoustic absorption distribution.

[0043] Finally, the transverse photoacoustic absorption distributions at each depth level are stacked in depth order to form a three-dimensional data volume, generating a complete three-dimensional photoacoustic density field for the thick-walled component.

[0044] The process of voxel meshing the three-dimensional photoacoustic density field and performing three-dimensional connected component labeling includes: The three-dimensional photoacoustic density field is divided into a uniform three-dimensional voxel grid according to a preset voxel size. Each voxel contains the photoacoustic density value at that location (referring to the photoacoustic absorption intensity reconstructed at that voxel location). It should be noted that the voxel size is usually set based on the minimum detectable size of the defect. For example, if it is necessary to detect bubbles with a diameter greater than 0.1 mm, the voxel size can be set to 0.05 mm or 0.1 mm to ensure that each defect covers at least several voxels. The spatial range covered by the three-dimensional photoacoustic density field (width in the X direction, width in the Y direction, and thickness in the Z direction) is divided by the voxel size in each direction to obtain the number of grids in the three directions, thus dividing the continuous space into a uniform grid. Each grid cell is a voxel, and its position is indicated by a grid index.

[0045] The photoacoustic density (PAD) value reflects the strength of laser absorption at that location by the material. Normal transparent materials absorb femtosecond lasers very weakly, with PAD values ​​close to background noise levels. However, defective regions (such as bubbles, impurities, and cracks) exhibit abrupt changes in material properties, leading to significantly enhanced laser absorption and a stronger photoacoustic signal, resulting in higher PAD values. Therefore, a threshold segmentation is performed on voxels, marking voxels with PAD values ​​exceeding a preset threshold as defective voxels. It should be noted that the preset threshold is based on statistical data from a large number of qualified and defective products, setting an intensity value that effectively distinguishes background noise from actual defects.

[0046] Three-dimensional connected component labeling is performed on the labeled defect voxels. Spatially adjacent defect voxels are merged into the same connected component as an initial defect body. All initial defect bodies are counted as the initial defect body set. It should be noted that the neighborhood relationship defined by spatial adjacency adopts 26 neighborhood (that is, a voxel is connected to a maximum of 26 neighboring voxels in the X, Y, and Z directions).

[0047] Although depth scan encoding has separated signals at different depths in time, when labeling 3D connected components, if two defects happen to be stacked vertically in the lateral position, they may be misjudged as a single vertically elongated defect body in 3D space. Therefore, in the initial defect body set, for adjacent initial defect bodies whose depth direction projection area (referring to the projection area on the plane perpendicular to the depth direction) overlap rate exceeds a preset threshold, a forced separation process based on principal component analysis is performed to separate defect bodies that are stuck together along the depth direction but are actually independent, thus obtaining all independent defect bodies.

[0048] Example: Two different initial defect bodies. Defect A is located at a depth of Z = 2~3 mm, and its lateral coverage area is (X = 1~3, Y = 2~4). Defect B is located at a depth of Z=5~6mm, and its lateral coverage area is (X=2~4, Y=3~5). Projecting both onto the XY plane, the projected areas may partially overlap. Therefore, calculate the proportion of the overlapping area to the respective projected area (or the proportion to the smaller area). If the proportion exceeds a preset threshold (e.g., 30%), it is considered that the two defects are adhered in the depth direction, and it is necessary to further determine whether they are the same defect or two independent defect bodies.

[0049] Next, the forced separation process based on principal component analysis includes: for adjacent initial defect bodies to be determined, obtaining the three-dimensional coordinates (X, Y, Z) of all voxels contained therein, constructing a 3×N matrix with these coordinates, calculating its covariance matrix, performing eigenvalue decomposition on the covariance matrix to obtain three eigenvalues ​​λ1≥λ2≥λ3 and their corresponding eigenvectors. If λ1≫λ2≈λ3, it indicates that the voxel set is obviously elongated, and the principal direction is the direction of the eigenvector corresponding to the largest eigenvalue. The thinnest point or intensity trough is found along the plane perpendicular to the principal direction (usually a horizontal plane). If the principal direction is close to perpendicular to the depth direction (i.e., the defect extends laterally), it may be a real elongated defect (such as a crack). A cutting surface is set at this position to divide the voxel set into two independent defect bodies. If the principal direction is close to parallel to the depth direction (i.e., the defect is elongated vertically), and the projected area overlap rate is high, it is likely that two independent defects of different depths have been incorrectly connected. They are redistributed to obtain two independent defect bodies.

[0050] The step of calculating the geometric and topological features of the voxel set for each independent defect body to generate a defect feature vector includes: For each individual defect body, obtain the set of spatial coordinates of all voxels it contains; Calculate the smallest circumscribed ellipsoid of the set of voxel coordinates, and extract the ratio of the lengths of the three principal axes of the ellipsoid (the dimensions extending in the three principal directions of the object), denoted as the ellipsoid's three-axis ratio, as a geometric feature describing its overall shape (this is because this ratio can be used to describe the overall shape of the defect; for example, a≈b≈c indicates that the defect is close to spherical and may be a bubble; a≫b≈c indicates that the defect is elongated and may be a crack; a≈b≫c indicates that the defect is flat and disc-shaped and may be a flaky impurity or layering). It should be noted that the smallest circumscribed ellipsoid is the smallest volume ellipsoid that can completely enclose all voxels of a defect.

[0051] The normal vectors of the boundary voxels of independent defect bodies (i.e., voxels on the surface of the defect body, i.e., voxels with at least one face, edge, or corner adjacent to non-defect voxels) are statistically distributed on a spherical surface (each normal vector is projected onto the corresponding sphere as a point; here, all points are counted and fitted to a continuous distribution function). The spherical harmonic coefficients (which are the expansion coefficients of the continuous distribution function under the spherical harmonic basis) are obtained as topological features describing the surface roughness and texture. It should be noted that the normal vector distribution is concentrated on smooth surfaces, while it is scattered and disordered on rough surfaces. Therefore, the spherical harmonic coefficients can quantify the smoothness or roughness of the surface and the directionality of the texture.

[0052] The information entropy of the distribution probability of all voxels of a statistically independent defective body in the depth direction is used as a distribution feature to describe the degree of its dispersion in the depth direction. The ellipsoidal triaxial ratio, spherical harmonic coefficient, and information entropy are combined to form the defect feature vector of the independent defect body. The defect feature vectors of all independent defect bodies are statistically analyzed to form a defect feature vector set.

[0053] The defect mapping model is based on a three-dimensional graph convolutional network and a multi-head self-attention mechanism. The three-dimensional graph convolutional network uses each independent defect body as a node. When the Euclidean distance between two independent defect bodies is less than a preset distance threshold, an edge is established between them. Neighborhood feature aggregation is performed on the input defect feature vector set.

[0054] The multi-head self-attention mechanism performs global context modeling on the node feature sequence and outputs the defect type and three-dimensional center coordinates of each defect body. It should be noted that the defect mapping model is a combination of 3D graph convolutional networks and multi-head self-attention mechanism. This is because some defect types may be related to the overall distribution (e.g., multiple similar defects are regularly distributed in space). The scope of 3D graph convolutional networks is local neighborhood (spatial neighboring defect bodies), which is mainly used to aggregate local spatial context and capture short-range correlations between defects. Meanwhile, the multi-head self-attention mechanism allows each defect body to pay attention to all other defect bodies in the scene.

[0055] The spatial distribution of defects often exhibits correlation (e.g., microbubbles near cracks, impurity aggregation areas, etc.), and the features of a single defect may be insufficient to determine its true category (e.g., an isolated small point may be noise, but multiple small points clustered around it may constitute a defect cluster). By aggregating neighborhood features, each node can obtain information about the defects around it, thereby making a more accurate judgment. Therefore, this scheme is designed as follows: The process of performing neighborhood feature aggregation on the input defect feature vector includes, for the defect feature vector of the input node, collecting the defect feature vectors of all its neighboring nodes (nodes connected by edges), performing aggregation operation on them with the node's own defect feature vector, the aggregation operation including at least one of average aggregation (taking the average of the two), maximum aggregation (taking the maximum value of the defect feature vectors of neighboring nodes), ..., transforming the aggregation result through a fully connected layer to obtain the updated defect feature vector of the node, and arranging them in a certain order to form a node feature sequence.

[0056] The pre-training of the defect mapping model includes: using a sample set of defect feature vectors labeled with defect types and three-dimensional center coordinates, with the goal of minimizing the sum of the classification loss function and the coordinate regression loss function, and performing end-to-end optimization of the parameters of the three-dimensional graph convolutional network and the multi-head self-attention mechanism through the backpropagation algorithm.

[0057] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. An intelligent image defect detection system for thick-walled automotive headlight components, characterized in that, include: The laser excitation and photoacoustic acquisition module is used to emit a laser pulse sequence that is time-coded in the depth direction to the thick-walled part of the vehicle headlight, so that defects of different depths are excited in sequence to generate photoacoustic shock waves, and the photoacoustic shock waves are spatiotemporally acquired to generate a multi-layer original correlation intensity matrix. The photoacoustic tomography reconstruction and defect feature extraction module performs tomography reconstruction on the multi-layer original correlation intensity matrix to generate a complete three-dimensional photoacoustic density field for the thick-walled component; it performs voxel meshing on the three-dimensional photoacoustic density field and performs three-dimensional connected domain labeling to obtain all independent defect bodies; it calculates the geometric and topological features of the voxel set for each independent defect body to generate a defect feature vector. The defect classification decision module takes a set of defect feature vectors as input and outputs the defect type and three-dimensional center coordinates through a pre-trained defect mapping model. The execution control module is used to control the robot to perform sorting or marking based on the defect type and the three-dimensional center coordinates.

2. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 1, characterized in that, The depth-direction time encoding is executed by a programmable electro-optic delay line, which includes: the delay line pre-allocating a corresponding initial time delay for each pulse in the laser pulse sequence according to a preset depth scanning range and step interval, so that it sequentially excites defects at different depths; Between every two adjacent pulses, a reference pulse is inserted. This reference pulse propagates along the same optical path and is reflected at a fixed reference point on the surface of the thick-walled part. The actual flight time of the reference pulse is detected in real time. Calculate the deviation between the theoretical and actual flight time of the reference pulse from transmission to return, and correct the initial delay of subsequent pulses based on the deviation.

3. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 2, characterized in that, The step of correcting the initial delay of subsequent pulses based on the deviation value includes: For the next pulse to be launched at a target depth of d, the new time delay is the initial time delay plus a correction term. Where Δt represents the deviation value and D_ref represents the reference depth.

4. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 3, characterized in that, The spatiotemporal joint acquisition of photoacoustic shock waves generates a multi-layered original correlation intensity matrix, including: By using a multi-element ultrasonic detector array distributed around the thick-walled component, the photoacoustic shock wave signal generated by laser pulse sequence is simultaneously acquired to obtain multi-channel time-domain data. Based on the time delay allocated to each laser pulse and its corresponding depth coordinates, the multi-channel time domain data is divided into subsets corresponding to different depth layers according to time windows; For each depth layer, the photoacoustic shock wave signals of each detector in the subset of data of that layer are time-shifted and aligned according to the theoretical propagation time from each lateral coordinate in that depth layer to each detector. Then, the amplitudes of the aligned signals of each detector are weighted and summed, and the magnitude of the summation result is taken as the estimated value of the photoacoustic source intensity of that depth layer. Arrange the photoacoustic source intensity estimates obtained from all depth layers according to spatial coordinates to generate a multi-layer original correlation intensity matrix with horizontal coordinates as rows and columns, depth coordinates as layers, and corresponding photoacoustic source intensity estimates as matrix elements.

5. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 4, characterized in that, The tomographic reconstruction of the multilayer original correlation strength matrix includes: Based on the preset time delay and its corresponding depth coordinates, the multi-layer original correlation strength matrix is ​​decoupled according to the depth coordinates and used as a two-dimensional image sequence. First, perform a Hilbert transform on the intensity sequence at each spatial location along the depth direction to extract the instantaneous envelope and obtain a sparsed envelope matrix that characterizes the photoacoustic energy distribution. Secondly, based on the correspondence between time delay and depth coordinates, each layer of the envelope matrix directly corresponds to a physical depth coordinate, and the inverse Radon transform based on regularization constraints is performed layer by layer along the depth direction to reconstruct the lateral photoacoustic absorption distribution of each depth layer through analytical calculation. Finally, the transverse photoacoustic absorption distributions at each depth level are stacked in depth order to form a three-dimensional data volume, generating a complete three-dimensional photoacoustic density field for the thick-walled component.

6. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 5, characterized in that, The process of voxel meshing the three-dimensional photoacoustic density field and performing three-dimensional connected component labeling includes: The three-dimensional photoacoustic density field is divided into a uniform three-dimensional voxel grid according to a preset voxel size, and each voxel contains the photoacoustic density value at that location. Threshold segmentation is performed on voxels, and voxels whose photoacoustic density values ​​exceed a preset threshold are marked as defective voxels; Perform three-dimensional connected component labeling on the labeled defect voxels, merge spatially adjacent defect voxels into the same connected component as an initial defect voxel, and count all initial defect voxels as the initial defect voxel set. In the initial set of defect bodies, for adjacent initial defect bodies whose projected area overlap rate in the depth direction exceeds a preset threshold, a forced separation process based on principal component analysis is performed to separate defect bodies that are adhered along the depth direction but are actually independent, thus obtaining all independent defect bodies.

7. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 6, characterized in that, The step of calculating the geometric and topological features of the voxel set for each independent defect body to generate a defect feature vector includes: For each individual defect body, obtain the set of spatial coordinates of all voxels it contains; Calculate the smallest circumscribed ellipsoid of the set of voxel coordinates, extract the ratio of the lengths of the three principal axes of the ellipsoid, and denot it as the ellipsoid three-axis ratio, which serves as a geometric feature describing its overall shape; The spherical distribution statistics of the normal vectors of the boundary voxels of independent defect bodies are performed to obtain their spherical harmonic coefficients, which are used as topological features to describe their surface roughness and texture. The information entropy of the distribution probability of all voxels of a statistically independent defective body in the depth direction is used as a distribution feature to describe the degree of its dispersion in the depth direction. The ellipsoidal triaxial ratio, spherical harmonic coefficient, and information entropy are combined to form the defect feature vector of the independent defect body. The defect feature vectors of all independent defect bodies are statistically analyzed to form a defect feature vector set.

8. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 7, characterized in that, The defect mapping model is based on a three-dimensional graph convolutional network and a multi-head self-attention mechanism. The three-dimensional graph convolutional network uses each independent defect body as a node. When the Euclidean distance between two independent defect bodies is less than a preset distance threshold, an edge is established between them. Neighborhood feature aggregation is performed on the input defect feature vector set. The multi-head self-attention mechanism performs global context modeling on the node feature sequence and outputs the defect type and three-dimensional center coordinates of each defect body.

9. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 8, characterized in that, The process of performing neighborhood feature aggregation on the input defect feature vector includes: for the defect feature vector of the input node, collecting the defect feature vectors of all its neighboring nodes, performing aggregation operation on them with the defect feature vector of the node itself, transforming the aggregated result through a fully connected layer to obtain the updated defect feature vector of the node, and arranging them in a certain order to form a node feature sequence.

10. The intelligent image defect detection system for thick-walled automotive headlight components according to claim 9, characterized in that, The pre-training of the defect mapping model includes: using a sample set of defect feature vectors labeled with defect types and three-dimensional center coordinates, with the goal of minimizing the sum of the classification loss function and the coordinate regression loss function, and performing end-to-end optimization of the parameters of the three-dimensional graph convolutional network and the multi-head self-attention mechanism through the backpropagation algorithm.