Terahertz adaptive scanning method for irregular samples
Patent Information
- Application Number
- CN202611460127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-10-23
AI Technical Summary
当曲率半径小于波束瑞利长度时,这种失准甚至可能导致界面回波的漏检或误检
[0049]本发明针对不规则样品曲面条件下太赫兹波传播路径发生折射偏折的问题,构建了融合表面法向量、主曲率参数与实际入射角的射线路径追踪模型,并通过实测飞行时间与路径模型的耦合反演,实现了对曲面折射引起路径畸变的自适应校正。相较于基于平面假设的传统方法,本发明能够在无需特定几何先验的条件下,适用于任意自由曲面及多层异质介质结构,有效消除入射角变化与界面曲率对时延测量的耦合干扰,使飞行时间与真实厚度之间恢复稳定映射关系。同时,通过引入界面曲率修正因子,实现了对各层厚度的逐层精确校正,显著提升复杂曲面区域的厚度反演精度与界面定位准确性,并在此基础上完成三维结构的高保真重建,使检测结果兼具空间几何一致性与物理可解释性,具有良好的通用性与精度优势。
Smart Images

Figure CN122961944A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of terahertz technology, and in particular to a terahertz adaptive scanning method for irregular samples. Background Technology
[0002] Terahertz waves, with their unique properties such as strong penetrability, low photon energy, and sensitivity to nonpolar materials, have found wide application in nondestructive testing, coating thickness measurement, and identification of internal defects in composite materials. Terahertz reflection imaging technology, based on the Time of Flight (TOF) principle, can achieve high-precision tomographic imaging of the thickness, interface morphology, and internal defects of multilayer structures by detecting the time delay of reflected echoes at different interfaces within a sample.
[0003] In existing terahertz reflection imaging detection, a commonly used basic assumption is that terahertz pulses propagate in a straight line within the sample and between interfaces, and that the echo path is reversible from the incident path. For planar samples with flat surfaces and negligible curvature, this assumption holds true when the terahertz probe is incident perpendicularly (normally), and there is a simple linear relationship between the flight time and the interface depth, resulting in high accuracy in thickness calculation.
[0004] However, when the sample under test is irregular (such as free-form components, coated parts with curved or uneven structures, or irregularly shaped composite materials), its surface morphology exhibits complex curvature changes or local undulations. Maintaining perpendicular incidence becomes extremely difficult, and the actual scanning process is often forced to be performed under oblique incidence. In this case, after the terahertz wave enters the sample, its propagation path is deflected due to the refraction effect at the curved surface boundary, causing the beam path to deviate significantly from the straight-line propagation assumption. This, in turn, introduces geometric distortion and interface positioning errors into the reconstructed image.
[0005] Specifically, for multilayer dielectric structures with curved boundaries (such as thermal barrier coatings on metal substrates, curved fiber-reinforced composite laminates, etc.), when terahertz waves are incident from air onto the sample surface, the incident angle changes continuously along the curved surface, and the refraction angle obeys Snell's law. However, the refracted beam path does not simply point towards the sample depth, but rather dynamically bends with the surface curvature. When the terahertz wave further penetrates to the lower interface (such as the coating-substrate interface, interlayer interface) and is reflected back to the detector, the actual echo delay not only includes thickness information but also includes pseudo-delay components caused by the lengthening or shortening of the refraction path. Existing terahertz imaging systems still use a linear propagation model under the assumption of a planar sample when inverting thickness or interface location, without compensating for the path distortion caused by curved surface refraction, resulting in the following specific technical problems:
[0006] In sample regions with significant curvature variations, the reflected echo time delay corresponding to the same actual thickness will vary significantly depending on the incident angle. The apparent thickness calculated directly using the linear time-of-flight formula deviates from the true thickness, and the deviation intensifies with increasing surface curvature. When the radius of curvature is smaller than the Rayleigh beam length, this misalignment may even lead to missed or false detections of interface echoes.
[0007] While existing technologies have attempted to approximate the correction of beam curvature in homogeneous media using split-step Fourier transform or angular spectrum propagation theory, these methods are typically designed for single media, regular curved surfaces (such as spheres and cylinders), or ideal models with known refractive index distributions. They are difficult to generalize to samples with arbitrary free-form surfaces, multiple layers of media with different refractive indices, or irregular samples with unknown or spatially varying refractive indices. Currently, there is a lack of a universal refraction compensation model that does not rely on specific geometric assumptions (such as the small curvature approximation or the symmetric surface assumption), capable of dynamically calculating the actual refraction propagation path of the terahertz wave at each scanning point based on surface morphology data obtained from actual scanning, and thereby correcting the mapping relationship between time of flight and thickness.
[0008] In summary, how to establish a general terahertz refraction path distortion correction method for the surface features of irregular samples, eliminate the interference of refraction effect on time delay measurement, and realize high-precision thickness inversion and image reconstruction of complex curved multilayer structures is a specific technical problem that urgently needs to be solved in this field. Summary of the Invention
[0009] To address the aforementioned technical problems, this invention provides a terahertz adaptive scanning method for irregular samples.
[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0011] This invention discloses a terahertz adaptive scanning method for irregular samples, comprising the following steps:
[0012] Step 1: Collect three-dimensional point cloud data of the irregular sample surface, and calculate the surface normal vector and principal curvature parameters at each scanning point based on the three-dimensional point cloud data;
[0013] Step 2: Drive the terahertz probe to scan along the irregular sample surface, and simultaneously record the terahertz time-domain echo signal at each scanning point and the actual incident angle of the terahertz probe relative to the irregular sample surface in real time;
[0014] Step 3: Based on the actual incident angle, the surface normal vector, the principal curvature parameter, and the estimated refractive index distribution of the irregular sample, construct a ray path tracing model that describes the continuous refraction of terahertz waves as they propagate along the curved boundary inside the irregular sample.
[0015] Step 4: Couple the ray path tracing model with the measured flight time corresponding to each reflection peak in the terahertz time-domain echo signal, and use numerical solutions of nonlinear equations to inversely derive the true depth value and interface curvature correction factor at each reflection interface.
[0016] Step 5: Based on the true depth value and the interface curvature correction factor, calculate the actual physical thickness of each layer inside the irregular sample along the surface normal direction, and generate a corrected time delay sequence after removing refractive distortion;
[0017] Step 6: Map the correction time delay sequence to a set of three-dimensional spatial coordinate points of each layer interface inside the irregular sample, and normalize the amplitude value of the terahertz time domain echo signal and assign it as the color attribute of the three-dimensional spatial coordinate point set.
[0018] Step 7: Based on the set of three-dimensional spatial coordinate points and their color attributes, reconstruct the three-dimensional structural image of the irregular sample and output the actual physical thickness array of each layer.
[0019] Furthermore, step 1 includes:
[0020] Step 1-1: Use a structured light 3D scanner or laser line profilometer to perform a full-field scan of the irregular sample surface to obtain 3D point cloud data consisting of N discrete scanning points, where the coordinates of each discrete scanning point are represented as follows: ;
[0021] Step 1-2: For each discrete scan point Using the K-nearest neighbor algorithm to search for and For the K nearest neighbors whose Euclidean distance is less than a set threshold, principal component analysis is used to perform eigenvalue decomposition on the covariance matrix of the K nearest neighbors. The eigenvector corresponding to the smallest eigenvalue is then normalized and used as the discrete scan point. Surface normal vector at the location ;
[0022] Steps 1-3: At discrete scan points Establish a surface normal vector at the location Using a local coordinate system along the Z-axis, project K neighboring points onto the XOY plane of the local coordinate system, and calculate the discrete scan points using a quadratic surface fitting method. The two principal curvature values at the location and and the two principal curvature values and The combination is the main curvature parameter.
[0023] Furthermore, step 2 includes:
[0024] Step 2-1: Fix the terahertz probe to the end effector of the six-degree-of-freedom robotic arm, generate the scanning trajectory of the six-degree-of-freedom robotic arm based on the three-dimensional point cloud data, and keep the angle between the optical axis of the terahertz probe and the surface normal vector at each scanning point within the preset allowable deviation range.
[0025] Step 2-2: Drive the six-degree-of-freedom robotic arm along the scanning trajectory to move the terahertz probe and scan the irregular sample surface point by point. At each scanning point, acquire a corresponding terahertz time-domain echo signal and compare the terahertz time-domain echo signal with the coordinates of the scanning point. Perform associated storage;
[0026] Steps 2-3: At each scanning point, by reading the real-time attitude data of the end effector of the six-degree-of-freedom robotic arm, calculate the optical axis direction of the terahertz probe and the surface normal vector. The angle between them is recorded as the actual incident angle of the terahertz probe relative to the irregular sample surface. .
[0027] Furthermore, step 3 includes:
[0028] Step 3-1: Based on the actual incident angle at each scanning point and surface normal vector The incident plane of the terahertz wave on the surface of the irregular sample is determined, and the interior of the irregular sample is discretized into M thin layers of equal thickness along the depth direction within the incident plane. Each thin layer of equal thickness is assigned a refractive index value determined by the estimated refractive index distribution of the irregular sample.
[0029] Step 3-2: Using the two principal curvature values at the scan point and As a boundary curvature constraint, a local refraction angle correction factor that varies with the interface curvature is introduced at each interface of equal-thickness thin layers. This local refraction angle correction factor dynamically adjusts the calculated value of the refraction angle in Snell's law according to the ratio of the radius of curvature at the interface to the terahertz wavelength.
[0030] Step 3-3: Starting from the incident point on the irregular sample surface, a layer-by-layer recursive ray tracing algorithm is used to calculate the actual refraction direction and propagation path length of the terahertz wave at each interface of equal-thickness thin layers. The propagation path lengths of each segment are then summed to obtain the propagation path length from the incident point to the... The total ray path expression between the internal reflecting interfaces, which includes the actual incident angle. Two principal curvature values and The ray path tracing model is constructed by using the refractive index values of each layer in the predicted refractive index distribution as independent variables.
[0031] Furthermore, step 4 includes:
[0032] Step 4-1: Extract the measured flight time corresponding to each reflection peak from the terahertz time-domain echo signal. subscript Indicates the first Each scan point, index Indicates the first An internal reflective interface, and the measured flight time The total ray path expression output by the ray path tracing model Establish an equation relationship, that is ,in The speed of light in a vacuum;
[0033] Step 4-2: For each scan point The J equations corresponding to the first to the Jth internal reflection interfaces are combined to form a nonlinear equation system, in which the true depth value of each internal reflection interface is used. and the actual refractive index of each layer of medium As the unknown quantity to be solved, the true depth value There is a one-to-one correspondence between the cumulative thickness of each equal-thickness thin layer in the ray path tracing model;
[0034] Step 4-3: The Levenberg-Marquardt algorithm is used to iteratively solve the nonlinear equations. In each iteration, the principal curvature parameters are used as prior constraints to limit the range of the interface curvature correction factor. The iteration stops when the absolute value of the difference between the objective function values of two adjacent iterations is less than the preset convergence threshold, and the true depth value of each internal reflection interface is output. and interface curvature correction factor Among them, the interface curvature correction factor Defined as the ratio of the actual propagation path length to the straight propagation path length at the interface.
[0035] Furthermore, step 5 includes:
[0036] Step 5-1: According to the first At the scanning point The true depth value of an internal reflective interface and the The true depth value of an internal reflective interface Calculate the first Layered medium along surface normal vector Original physical thickness in direction ,in Indicates an irregular sample surface;
[0037] Step 5-2: Use the first At the scanning point Interface curvature correction factor for each internal reflection interface For the original physical thickness Perform layer-by-layer correction to obtain the surface normal vector of the j-th layer of medium. Actual physical thickness in the direction ;
[0038] Step 5-3: Calculate the actual physical thickness of all internal reflective interfaces at each scanning point. According to the interface number Arranged in ascending order, forming a thickness array. At the same time, based on the actual physical thickness Using the known refractive indices of the various media layers within the irregular sample, the corrected time of flight corresponding to each reflection peak is calculated in reverse. After arranging all the corrected flight times in order of interface number, a corrected delay sequence is generated. .
[0039] Furthermore, step 6 includes:
[0040] Step 6-1: For the first The first scan point at the _th scan point An internal reflective interface is identified, and its true depth value is obtained. and the coordinates of the scan point and surface normal vector According to the spatial offset formula Calculate the three-dimensional spatial coordinates of the internal reflective interface. All scan points and all internal reflection interfaces Corresponding three-dimensional spatial coordinates After being collected, they form a set of three-dimensional spatial coordinate points. ;
[0041] Step 6-2: From each scan point Extract the first terahertz time-domain echo signal from the acquired terahertz signal. The amplitude value of the reflection peak corresponding to each internal reflection interface For the amplitude value of the reflection peak According to the formula Perform linear normalization, where The maximum value among the reflection peak amplitudes corresponding to all internal reflection interfaces at all scan points. It is the minimum value among the reflection peak amplitude values corresponding to all internal reflection interfaces at all scan points;
[0042] Step 6-3: Calculate the normalized reflection peak amplitude value Multiply by the length of the preset color lookup table Then round down to get the color index value. According to color index value Find the corresponding RGB color triplet in the preset color lookup table. Assign the RGB color triple to the corresponding point in the three-dimensional space coordinate point set Q. The color attribute.
[0043] Furthermore, step 7 includes:
[0044] Step 7-1: For each three-dimensional spatial coordinate point in the three-dimensional spatial coordinate point set Q... and its corresponding color attributes Input the data into the point cloud processing library to generate raw point cloud data with color information;
[0045] Step 7-2: Perform voxel downsampling filtering on the original point cloud data. Set the side length of the voxel grid to a preset resolution threshold. Take the arithmetic mean of the color attributes of all three-dimensional spatial coordinate points in each voxel grid and use it as the color attribute of the output point of that voxel grid to obtain the downsampled dense point cloud data.
[0046] Step 7-3: The Poisson surface reconstruction algorithm is used to reconstruct the dense point cloud data after downsampling. The coordinates and color attributes of each point in the dense point cloud data are used as constraints. The gradient field of the indicator function is solved iteratively. After extracting the isosurface, a three-dimensional mesh model with color texture mapping is generated. This three-dimensional mesh model is used as the three-dimensional structural image of the irregular sample.
[0047] Step 7-4: Scan all points All corresponding internal reflection interfaces Actual physical thickness According to scan point index and Interface Index Organized into a two-dimensional thickness matrix ,in The two-dimensional thickness matrix is output as an array of actual physical thicknesses for each layer in a comma-separated value file format.
[0048] The technological advancements achieved by this invention compared to existing technologies are as follows:
[0049] This invention addresses the problem of terahertz wave propagation path refraction and deflection under irregular sample curved surface conditions. It constructs a ray path tracing model that integrates surface normal vectors, principal curvature parameters, and the actual incident angle. Through coupled inversion of measured flight time and the path model, adaptive correction of path distortion caused by surface refraction is achieved. Compared to traditional methods based on planar assumptions, this invention is applicable to arbitrary free-form surfaces and multilayer heterogeneous media structures without requiring specific geometric priors. It effectively eliminates the coupling interference of incident angle changes and interface curvature on time delay measurements, restoring a stable mapping relationship between flight time and true thickness. Simultaneously, by introducing an interface curvature correction factor, layer-by-layer accurate correction of each layer's thickness is achieved, significantly improving the thickness inversion accuracy and interface positioning accuracy in complex curved surface regions. Furthermore, high-fidelity reconstruction of the three-dimensional structure is completed, giving the detection results both spatial geometric consistency and physical interpretability, demonstrating excellent versatility and accuracy. Attached Figure Description
[0050] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0051] In the attached diagram:
[0052] Figure 1 This is a flowchart of the present invention;
[0053] Figure 2 This is a three-dimensional point cloud and surface geometric feature diagram of an irregular sample according to the present invention;
[0054] Figure 3 This is a diagram showing the calculation results of the surface normal vector and principal curvature parameters of this invention;
[0055] Figure 4 This is a typical terahertz time-domain echo signal and reflection peak flight time extraction diagram for the present invention.
[0056] Figure 5 This is a schematic diagram of the terahertz surface refraction path tracing based on the actual incident angle and principal curvature of the present invention.
[0057] Figure 6 This is a comparison diagram of the interface position and thickness distribution before and after the refraction path correction of the present invention. Detailed Implementation
[0058] The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0059] like Figure 1As shown, this invention discloses a terahertz adaptive scanning method for irregular samples, comprising:
[0060] Step 1: Collect three-dimensional point cloud data of the irregular sample surface, and calculate the surface normal vector and principal curvature parameters at each scanning point based on the three-dimensional point cloud data;
[0061] Step 2: Drive the terahertz probe to scan along the irregular sample surface, and simultaneously record the terahertz time-domain echo signal at each scanning point and the actual incident angle of the terahertz probe relative to the irregular sample surface in real time;
[0062] Step 3: Based on the actual incident angle, the surface normal vector, the principal curvature parameter, and the estimated refractive index distribution of the irregular sample, construct a ray path tracing model that describes the continuous refraction of terahertz waves as they propagate along the curved boundary inside the irregular sample.
[0063] Step 4: Couple the ray path tracing model with the measured flight time corresponding to each reflection peak in the terahertz time-domain echo signal, and use numerical solutions of nonlinear equations to inversely derive the true depth value and interface curvature correction factor at each reflection interface.
[0064] Step 5: Based on the true depth value and the interface curvature correction factor, calculate the actual physical thickness of each layer inside the irregular sample along the surface normal direction, and generate a corrected time delay sequence after removing refractive distortion;
[0065] Step 6: Map the correction time delay sequence to a set of three-dimensional spatial coordinate points of each layer interface inside the irregular sample, and normalize the amplitude value of the terahertz time domain echo signal and assign it as the color attribute of the three-dimensional spatial coordinate point set.
[0066] Step 7: Based on the set of three-dimensional spatial coordinate points and their color attributes, reconstruct the three-dimensional structural image of the irregular sample and output the actual physical thickness array of each layer.
[0067] Specifically, step 1 includes:
[0068] like Figure 2 and Figure 3 As shown, step 1 aims to stably and continuously recover local geometric structure information from the 3D point cloud data of the irregular sample surface, ensuring that each scan point not only has spatial coordinates but also clear directional and curvature attributes, thus providing a geometric constraint basis for subsequent incident angle calculation and refraction path modeling. In the specific implementation, a structured light 3D scanner or laser line profiler is used to perform a full-field scan of the irregular sample surface to obtain a discretely distributed set of spatial sampling points. This point cloud data is expressed in spatial coordinates, and each sampling point is denoted as: These discrete scanning points form an approximate representation of the outer surface of the sample in space, and their density and distribution uniformity directly affect the stability of subsequent geometric parameter calculations.
[0069] At each discrete scan point, its local neighborhood structure needs to be constructed. Using the K-nearest neighbor algorithm, with Euclidean distance as the metric, and under constraints on the neighborhood radius or the number of neighboring points, the K nearest neighbors spatially closest to the point are selected. This neighborhood point set reflects the geometry of the local surface near that point and serves as the fundamental data carrier for estimating the normal vector and curvature. For the constructed neighborhood point set, principal component analysis is introduced to statistically model its spatial distribution. By calculating the covariance matrix of the neighborhood point coordinates and performing eigenvalue decomposition on this covariance matrix, three orthogonal eigenvectors and their corresponding eigenvalues can be obtained. Since the local surface exhibits the least change in the normal direction, corresponding to the smallest eigenvalue, the eigenvector corresponding to the smallest eigenvalue is selected as the normal direction of that point. This eigenvector is then normalized to obtain the surface normal vector at that scan point. The normal vector describes the orientation information of the local surface, and its stability depends on the uniformity of the distribution of neighborhood points and the ability to suppress noise.
[0070] After obtaining the surface normal vector, a local orthogonal coordinate system is established at the scan point using this normal vector as the Z-axis direction of the local coordinate system. By constructing two tangential basis vectors orthogonal to the normal vector, the neighborhood points are projected from the global coordinate system to the XOY plane of this local coordinate system, transforming the originally three-dimensional distribution of neighborhood points into a local two-dimensional height distribution problem, thus facilitating surface fitting.
[0071] In this local coordinate system, a quadratic surface is used to fit the projected neighborhood points, and its general form is as follows:
[0072]
[0073] This quadratic surface can approximate the shape of an actual surface within a local range. After solving for the model parameters using the least squares method, the principal curvatures at that point can be further calculated. The principal curvatures reflect the maximum and minimum bending of the surface in the two orthogonal principal directions, and their calculation essentially originates from the first and second derivative information of the quadratic surface. Finally, the two principal curvature values are obtained. and And use it as the principal curvature parameter of that scan point.
[0074] Through the above process, each discrete scanning point is assigned three key attributes: spatial coordinates, surface normal vector, and principal curvature parameter. These three types of information together constitute a complete description of the local geometric properties of the irregular sample surface, enabling the accurate establishment of the incident geometry at each scanning point in subsequent steps and providing continuous and differentiable boundary conditions for modeling the surface refraction path.
[0075] Specifically, step 2 includes:
[0076] like Figure 4 As shown, step 2 is carried out based on the surface normal vector and principal curvature parameters obtained in step 1. Its goal is to achieve controllable spatial geometric relationship between the terahertz probe and the sample surface under complex curved surface conditions, and to simultaneously acquire time-domain echo data that strictly corresponds to this geometric relationship, thereby providing real incident condition constraints for subsequent refraction path modeling.
[0077] In the specific implementation, the terahertz probe is rigidly mounted on the end effector of a six-degree-of-freedom robotic arm, allowing independent adjustment of the probe's spatial position and orientation. The 3D point cloud data obtained in step 1 and the surface normal vector at each scanning point are then used. Path planning is performed on the entire irregular sample surface. The core of path planning is not simple spatial coverage, but rather the introduction of directional constraints to ensure that the probe's optical axis remains approximately aligned with the surface normal vector at the corresponding scanning point throughout its movement. Specifically, in the first... At each scanning point, let the probe optical axis direction vector be... Then it must satisfy:
[0078]
[0079] in This is a preset allowable deviation range. This constraint ensures that the terahertz wave is as close as possible to normal incidence, reducing refraction errors caused by oblique incidence at the source, while allowing a certain attitude adjustment margin in regions with large curvature, thereby ensuring scanning continuity.
[0080] Based on the above constraints, discrete scanning points are organized into continuous scanning trajectories according to spatial adjacency relationships, and a smooth motion path for the robotic arm is generated using interpolation methods. During path generation, a target pose is simultaneously assigned to each trajectory point; this pose is determined by the position... With direction By jointly determining the position and orientation, the robotic arm can achieve coordinated control of its position and posture during movement.
[0081] During the scanning process, the six-degree-of-freedom robotic arm moves point-by-point to the target position according to the generated scanning trajectory, triggering the terahertz probe to perform a time-domain sampling at each scanning point to acquire the corresponding terahertz time-domain echo signal. This echo signal is essentially a sequence of functions of time and electric field intensity, denoted as: It contains multiple sets of echo information reflected from the sample surface and internal interfaces. To ensure a one-to-one correspondence between the data, each echo signal is associated with the spatial coordinates of its corresponding scanning point. Binding storage is performed to form structured data units: This data structure establishes a direct mapping relationship between spatial location and signal features, providing a foundation for subsequent parameter inversion based on spatial location.
[0082] At each scanning point, it is also necessary to accurately obtain the actual incident state of the probe. By reading the real-time attitude data of the six-degree-of-freedom robotic arm's end effector, the direction vector of the probe's optical axis in the global coordinate system can be obtained. Combining the surface normal vector of that point calculated in step 1... The angle between the two can be calculated using the dot product of the vectors, thus obtaining the actual angle of incidence.
[0083]
[0084] The incident angle is a key parameter in the subsequent refraction path modeling, as it directly determines the initial propagation direction of the terahertz wave after it enters the sample.
[0085] Through the above process, a complete data unit containing three types of information is formed at each scanning point, namely spatial location. Surface normal vector and terahertz time-domain echo signal And add the actual angle of incidence. This information together constitutes a complete description of where and in what direction the wave enters the sample and what kind of echo it produces. This allows the ray path tracing model established in subsequent steps to use real incident conditions as boundary inputs, rather than relying on the idealized normal incident assumption. This provides direct data support for solving the time delay inaccuracy problem caused by surface refraction.
[0086] Specifically, step 3 includes:
[0087] like Figure 5 As shown, step 3 is based on the surface normal vector and principal curvature parameters obtained in step 1 and the actual incident angle and echo signal obtained in step 2. Its essence is to construct a ray path tracing model that can describe the propagation behavior of terahertz waves inside irregular samples under the constraints of real geometric boundaries and non-ideal incident conditions, so that the propagation path is transformed from a straight line approximation to a segmented refraction path modulated by the curved surface.
[0088] At each scan point, the spatial position of that point is considered. Surface normal vector and actual angle of incidence Based on this, the incident geometry of terahertz waves is determined. The incident plane is defined by the direction vector of the incident optical axis. With surface normal vector The plane, through which the rays propagate, defines the two-dimensional analysis space for subsequent ray propagation, thus reducing the original three-dimensional problem to a two-dimensional propagation problem within the incident plane. Within this incident plane, starting from the sample surface, the sample interior is discretized in layers along the approximate depth direction, dividing the continuous medium into... Each ray tracing layer consists of equal-thickness layers, each characterized by an equivalent refractive index. This refractive index is given by the estimated refractive index distribution of the irregular sample, and can be either a piecewise constant or a function varying with depth. This discretization transforms the complex continuous refraction problem into a multi-interface refraction problem, making ray tracing computationally feasible.
[0089] Considering that the principal curvatures of the local surface have already been obtained in step 1 and Curvature constraints are introduced at each discrete layer interface, so that the interface is no longer considered an ideal plane, but a surface with local curvature characteristics. In the incident plane, the principal curvature can be projected as an equivalent curvature to characterize the degree of interface bending in that direction. The existence of curvature changes the mapping relationship between the incident angle and the refraction angle; therefore, a local refraction angle correction factor is introduced based on the traditional Snell's law. Let the... The equivalent radius of curvature at the layer interface is The wavelength of terahertz waves in this medium is Then, the correction factor can be expressed as a function of the curvature scale and the wavelength scale:
[0090]
[0091] This function reflects the modulation effect of curvature on the direction of wavefront propagation. When the radius of curvature is much larger than the wavelength, The value approaching 1 indicates that the interface is approximately planar; when the radius of curvature is on the same order of magnitude as the wavelength, the correction effect is significantly enhanced. Based on this, Snell's law is modified so that its refraction angle satisfies:
[0092]
[0093] This expression demonstrates that the angle of refraction is affected not only by the refractive index but also by the modulation of the interface curvature, thus enabling the description of continuous refraction behavior under curved surface boundary conditions.
[0094] After completing the interface modeling, ray tracing is performed starting from the incident point on the sample surface, using a recursive, layer-by-layer approach. The initial incident angle is known. Using the refractive index of the first layer and the corrected refractive relationship, the propagation direction after entering the first layer is calculated; subsequently, it propagates along this direction within the layer until it intersects with the next interface, and the corresponding propagation path length is calculated. For the... The propagation path length of a layer can be expressed as:
[0095]
[0096] in This is the equivalent thickness of the layer in the normal direction. Let be the propagation angle of the ray within that layer. Upon reaching the next interface, the propagation direction is updated based on the refractive index and curvature correction factor of that interface before entering the next layer. Through this recursive process of propagation, refraction, and repropagation, the path length and direction changes of the ray in each layer can be obtained layer by layer.
[0097] From the point of incidence to the The total propagation path is obtained by summing the lengths of all segmented paths at each internal reflection interface.
[0098]
[0099] The total path length is no longer a simple geometric straight-line distance, but rather the actual propagation distance after comprehensively considering the effects of the incident angle, refractive index distribution, and interface curvature. Since the propagation direction at each layer depends on the refraction result of the previous layer, this path expression is essentially a recursive nonlinear function, with its independent variables including the actual incident angle. Principal curvature parameters and and the refractive index of each layer .
[0100] Through the above construction process, a ray path tracing model capable of describing the propagation behavior of terahertz waves within irregular samples is formed. This model uses the geometric information provided in step 1 as boundary constraints and the incident information provided in step 2 as initial conditions. It explicitly incorporates the surface refraction effect into the propagation path calculation, ensuring that the subsequent mapping relationship between flight time and path length reflects the actual physical process, thus providing a reliable foundation for thickness inversion and interface localization.
[0101] Specifically, step 4 includes:
[0102] Step 4 serves to unify the constraints between the terahertz time-domain echo signal obtained in Step 2 and the ray path tracing model established in Step 3. By using the physical consistency relationship between time and path, the true geometric positions of each interface inside the irregular sample and the degree of path distortion introduced by surface refraction are obtained, thereby completing the mapping from observation time delay to actual structural parameters.
[0103] At each scan point, the terahertz time-domain echo signal is first analyzed. Feature analysis is performed. This signal typically exhibits several local extremum peaks, each corresponding to the reflection of a terahertz wave at a certain interface and its return to the probe. The first peak is extracted using peak detection and time localization methods. The flight time corresponding to each reflective interface is denoted as . This time measure describes the total propagation time of a terahertz wave from transmission to reception, and already includes information on path changes caused by propagation through multiple media and surface refraction.
[0104] The measured flight time is coupled with the ray path tracing model constructed in step 3. According to the fundamental relationship of electromagnetic wave propagation, the propagation path length and flight time have a linear relationship; therefore, in the first step… The scan point, the first Establish constraint equations at each interface:
[0105]
[0106] in The value is the speed of light in vacuum, and the right side is the expression for the total path length obtained through layer-by-layer ray tracing in step 3. This equation directly links the observation data with the geometric model; its essence is to constrain the spatial path calculation results with the time measurement results.
[0107] For the same scan point, as the reflective interface number increases, multiple sets of time-of-flight data can be obtained, corresponding to multiple path constraint relationships. This will be calculated from the first interface to the... A system of equations is formed by simultaneously solving all the equations for each interface. The unknowns in this system primarily include the true depth values of each interface. and the actual refractive index of each layer of medium. There is a correspondence between the actual depth value and the layer thickness in the ray path model; that is, the cumulative result of the thickness of each layer in the path calculation must be consistent with the interface depth. Because the path expression includes trigonometric functions, recursive relationships, and curvature correction terms, this system of equations exhibits significant nonlinear characteristics.
[0108] To achieve a stable solution, a numerical optimization method based on the least squares approach is introduced to iteratively solve the nonlinear equation system. An objective function is constructed to minimize the sum of squared errors between the model's computational path and the path derived from flight time, expressed as:
[0109]
[0110] In the solution process, the principal curvature parameters obtained in step 1 , It is introduced as prior information to constrain the range of values for the curvature correction factor. Since curvature directly determines the degree of refraction, limiting the range of variation of the curvature correction term can effectively avoid abnormal solutions that do not conform to the actual geometric shape during the solution process, thereby improving the inversion stability.
[0111] As the iterations proceed, the unknown parameters are gradually updated, continuously reducing the deviation between the path model and the observation time. When the change in the objective function between two consecutive iterations falls below a preset threshold, convergence is considered achieved, at which point the true depth value of each internal reflection interface is output. .
[0112] While obtaining the true depth, the influence of surface refraction on the propagation path can be further quantified. The interface curvature correction factor is defined as the ratio between the actual propagation path length and the ideal straight-line propagation path length, i.e.:
[0113]
[0114] The denominator represents the round-trip path length under the assumption of normal incident and rectilinear propagation. This correction factor reflects the path stretching or compression effect caused by surface refraction, when... A value close to 1 indicates that the curvature has a relatively small impact, while a value deviating from 1 indicates that the refraction path distortion is significant.
[0115] Through the above process, the inversion transformation from time-domain signal to spatial structure parameters was achieved at each scanning point, yielding a joint result of the true depth and path correction factor. This result not only corrects the errors caused by the linear propagation assumption in traditional methods but also provides physically consistent basic data for subsequent thickness calculations and 3D reconstruction.
[0116] Specifically, step 5 includes:
[0117] like Figure 5 As shown, step 5 establishes the true depth value obtained in step 4 through inversion. With interface curvature correction factor Above all, the goal is to convert the path-meaning depth parameter into the actual physical thickness along the surface normal direction, and further reconstruct the time delay expression consistent with the real geometry, so that subsequent imaging and quantitative analysis can get rid of the influence of refraction path distortion.
[0118] At each scan point, the true depth value obtained in step 4 Essentially corresponding to the geometric positions of each reflecting interface in space, this depth is an equivalent depth obtained based on the ray path model inversion, already including path curvature information caused by surface refraction. To obtain layer thickness parameters with clear physical meaning, the depth difference between adjacent interfaces needs to be converted into single-layer thickness. In the... At the scanning point, the _ ... The original physical thickness of the layer medium can be expressed as:
[0119]
[0120] in This corresponds to the sample surface location. This expression describes the geometric spacing of adjacent interfaces in the normal direction, and is local layer structure information extracted from the overall depth distribution. Because... Global consistency constraints have been applied through the path inversion process in step 4, and the thickness calculation exhibits good interlayer continuity.
[0121] The original physical thickness is still indirectly affected by the surface refraction effect. Although step 4 corrected the overall propagation path through path matching, the thickness of each layer may still be affected by the asymmetric distribution of the path during the hierarchical decomposition process. To further eliminate this effect, an interface curvature correction factor is introduced. The original thickness is corrected layer by layer. This correction factor is derived from the ratio between the actual path length and the ideal straight path length in step 4, and can reflect the degree of path stretching caused by refraction near the interface. Therefore, the first... The actual physical thickness of the layer medium is expressed as:
[0122]
[0123] The physical meaning of this correction process is to remap the thickness component originally formed by the accumulation of curved paths to an equivalent straight thickness along the surface normal vector direction, making it consistent with the true geometry of the material. Since each layer is independently corrected using the curvature correction factor of the corresponding interface, it can adapt to the situation of uneven curvature changes in multilayer structures.
[0124] After obtaining the actual physical thickness of each layer, the thicknesses of all layers at the same scan point are arranged in interface order to form a thickness array:
[0125]
[0126] This array fully describes the multi-layer structure distribution of the scan point along the surface normal direction, and is the basic data unit for subsequent 3D reconstruction and thickness analysis.
[0127] While completing the thickness reconstruction, it is also necessary to perform reverse correction on the original flight time. Since the time-domain echo signal obtained in step 2 corresponds to the time information along the actual propagation path, which includes additional time delay components introduced by the refraction path, the equivalent flight time needs to be recalculated based on the corrected physical thickness. This is done given the known refractive indices of each layer. Under the conditions, the first The corrected flight time corresponding to the layer can be expressed as:
[0128]
[0129] This expression reflects the time required for a terahertz wave to travel round-trip within the layer under ideal normal propagation conditions. By arranging the corrected flight times of all layers in interface order, a corrected time delay sequence is formed:
[0130]
[0131] Compared to the time axis in the original echo signal, this sequence has eliminated the path distortion caused by surface refraction, restoring a one-to-one correspondence between time information and true geometric thickness.
[0132] Through the above processing, the physical quantity conversion from inversion depth to actual thickness was achieved at each scanning point, and a corrected time delay sequence consistent with that thickness was constructed simultaneously. This process plays a crucial transitional role in the overall workflow, allowing subsequent spatial reconstruction steps to be directly based on real geometric parameters, while ensuring the consistency and interpretability of the mapping relationship between the time domain and the spatial domain.
[0133] Specifically, step 6 includes:
[0134] Step 6 proceeds based on the geometric reconstruction and thickness correction completed in steps 1 to 5. Its goal is to elevate the one-dimensional depth information along the normal vector into a three-dimensional spatial coordinate expression, and further embed the amplitude information of the terahertz echo into it, thereby constructing a three-dimensional point cloud data expression form that simultaneously possesses geometric structure and electromagnetic response characteristics.
[0135] At each scan point, step 1 has already provided the spatial coordinates of that point. and the corresponding surface normal vector Step 4 provides the true depth values for each internal reflective interface. Based on these three types of information, the depth quantity originally defined in the normal direction can be transformed into a spatial coordinate offset. Specifically, in the first... At the scanning point, the _ ... The spatial position of each internal reflective interface can be obtained by displacement along the normal vector direction, and it can be expressed as:
[0136]
[0137] The physical meaning of this expression is that, starting from a point on the sample surface, the interface depth is mapped to its corresponding position in three-dimensional space by extending along the local surface normal direction. Since the depth value in step 4 has already been corrected for the refraction path, this mapping process no longer relies on the linear propagation assumption, thus ensuring the accuracy of the interface position in space.
[0138] Repeating the above calculations for all scan points and all internal reflection interfaces corresponding to each scan point yields a set of discretely distributed three-dimensional spatial coordinate points. These points collectively constitute the spatial representation of the multi-layered interfaces within the irregular sample, denoted as:
[0139]
[0140] This point set not only contains surface information but also extends to the internal structure, realizing the expansion from a single surface point cloud to a multi-layer structure point cloud.
[0141] After constructing the geometric coordinates, amplitude information from the terahertz time-domain echo signal is introduced to enhance the attributes of the point cloud. The echo signal acquired in step 2... At each reflecting interface, there is a corresponding peak value, the amplitude of which reflects the electromagnetic reflection characteristics of that interface, such as the difference in dielectric interface impedance and the absorption characteristics of the material. At the... At the scanning point, the _ ... The amplitude of the reflection peak corresponding to each interface is denoted as . Since the amplitude range may vary significantly between different scan points and interfaces, a uniform scaling process is required. A global linear normalization method is used to map all amplitude values to the interval between 0 and 1, expressed as:
[0142]
[0143] in and These represent the maximum and minimum amplitude values for all scan points and all interfaces, respectively. Through this normalization process, the reflection intensity of different regions is compressed into a uniform numerical range, ensuring consistency in subsequent visualization.
[0144] To achieve a more intuitive representation of amplitude information, the normalized amplitude values are mapped to color attributes. A pre-constructed array of length... A color lookup table is used, defining color gradations from low to high intensity. During the mapping process, normalized amplitude values are proportionally converted into color indices.
[0145]
[0146] Use this index to find the corresponding RGB triplet in the color lookup table. And assign the color to the corresponding three-dimensional space point. This process maps scalar magnitudes to color attributes, enabling each point in the point cloud to not only have a spatial location but also carry color information reflecting material properties.
[0147] Through the above steps, a three-dimensional spatial point set with color attributes is constructed. This point set spatially describes the true location of the interfaces between different layers within the irregular sample and encodes the amplitude characteristics of the terahertz echo, thus forming a unified data representation that integrates geometric structure and electromagnetic response. This representation provides direct input for subsequent three-dimensional reconstruction and also allows information such as internal defects and interface anomalies to be intuitively presented through color changes.
[0148] Specifically, step 7 includes:
[0149] Step 7 proceeds based on the geometric inversion, thickness correction, and attributed point cloud construction completed in steps 1 to 6. Its goal is to transform the discrete three-dimensional spatial point set into a continuous structural representation and output layer thickness data results with engineering significance, thus realizing a complete closed loop from data acquisition to structural representation and quantitative result output.
[0150] At the data organization level, the three-dimensional spatial coordinate point set obtained in step 6 will be... The corresponding color attributes are uniformly input into the point cloud processing framework to form the original point cloud data structure. Each point in this point cloud contains spatial coordinates. and the corresponding color triplet Essentially, it is a discrete sampling representation with attributes. Since this point set originates from a point-by-point scanning process, its spatial distribution usually exhibits characteristics of non-uniform density and local redundancy. Directly using it for surface reconstruction can easily lead to increased computational burden and amplification of local noise.
[0151] To improve point cloud quality and unify spatial resolution, voxel downsampling is performed on the original point cloud. Specifically, a regular voxel grid is constructed in 3D space, dividing the space into cubic units with side lengths equal to a preset resolution threshold. For multiple points falling within the same voxel grid, only one representative point is retained as the output point for that voxel; its spatial location can be determined by the geometric center or centroid of the points within that voxel. For color attribute processing, the color components of all points within the voxel are arithmetically averaged to obtain a new color attribute. Through this process, the original point cloud is transformed into dense point cloud data with a more uniform distribution and significantly reduced redundancy, while maintaining the continuity of the overall geometric contour and amplitude information.
[0152] After obtaining a more regular point cloud structure, a surface reconstruction method based on a global implicit function is introduced to mesh the point cloud. Using the Poisson surface reconstruction method, the point cloud is treated as a discrete sample of the gradient field of a certain implicit function, constructing an indicator function model that satisfies the consistency of the point cloud normal. During the solution process, the spatial coordinates of the points are used as geometric constraints, and the normal distribution of the points is used as gradient constraints. The optimal expression of this implicit function in the entire spatial domain is solved iteratively. Subsequently, isosurfaces are extracted from this function, transforming the discrete point cloud into a continuous closed 3D mesh structure. Since the point cloud already contains color attributes, color information is mapped onto the mesh surface during reconstruction, forming a 3D model with texture information. This model can not only express the external surface morphology of irregular samples but also reflect the spatial distribution characteristics of the internal interface structure, thus constituting a complete 3D structural image.
[0153] While completing the 3D structural representation, the thickness data obtained in step 5 is output in a structured manner. For each scanning point i, its corresponding multi-layer thickness array is represented as follows:
[0154]
[0155] Arrange the thickness arrays of all scan points according to their indices to form a two-dimensional thickness matrix:
[0156]
[0157] The rows of this matrix correspond to different scanning positions, and the columns correspond to different layer structures. Overall, it expresses the spatial thickness distribution of irregular samples. By outputting this two-dimensional thickness matrix in a standard data format, quantitative analysis and subsequent processing of the thickness of each layer can be achieved, making the results not only visually expressible but also computationally and analytically achievable.
[0158] Through the above processing, the conversion from discrete point clouds to continuous structural models was completed, and the standardized output of thickness data was achieved. The entire process unifies the expression of spatial geometric information and physical quantity information, making the three-dimensional structural image and thickness distribution results correspond to each other. This not only intuitively reflects the internal structural morphology of irregular samples, but also provides accurate quantitative results of layer thickness, thereby meeting the comprehensive needs of detecting complex curved multi-layer structures.
[0159] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A terahertz adaptive scanning method for irregular samples, characterized in that, Includes the following steps: Step 1: Collect three-dimensional point cloud data of the irregular sample surface, and calculate the surface normal vector and principal curvature parameters at each scanning point based on the three-dimensional point cloud data; Step 2: Drive the terahertz probe to scan along the irregular sample surface, and simultaneously record the terahertz time-domain echo signal at each scanning point and the actual incident angle of the terahertz probe relative to the irregular sample surface in real time; Step 3: Based on the actual incident angle, the surface normal vector, the principal curvature parameter, and the estimated refractive index distribution of the irregular sample, construct a ray path tracing model that describes the continuous refraction of terahertz waves as they propagate along the curved boundary inside the irregular sample. Step 4: Couple the ray path tracing model with the measured flight time corresponding to each reflection peak in the terahertz time-domain echo signal, and use numerical solutions of nonlinear equations to inversely derive the true depth value and interface curvature correction factor at each reflection interface. Step 5: Based on the true depth value and the interface curvature correction factor, calculate the actual physical thickness of each layer inside the irregular sample along the surface normal direction, and generate a corrected time delay sequence after removing refractive distortion; Step 6: Map the correction time delay sequence to a set of three-dimensional spatial coordinate points of each layer interface inside the irregular sample, and normalize the amplitude value of the terahertz time domain echo signal and assign it as the color attribute of the three-dimensional spatial coordinate point set. Step 7: Based on the set of three-dimensional spatial coordinate points and their color attributes, reconstruct the three-dimensional structural image of the irregular sample and output the actual physical thickness array of each layer.
2. The terahertz adaptive scanning method for irregular samples according to claim 1, characterized in that, Step 1 includes: Step 1-1: Use a structured light 3D scanner or laser line profilometer to perform a full-field scan of the irregular sample surface to obtain 3D point cloud data consisting of N discrete scanning points, where the coordinates of each discrete scanning point are represented as follows: ; Step 1-2: For each discrete scan point Using the K-nearest neighbor algorithm to search for and For the K nearest neighbors whose Euclidean distance is less than a set threshold, principal component analysis is used to perform eigenvalue decomposition on the covariance matrix of the K nearest neighbors. The eigenvector corresponding to the smallest eigenvalue is then normalized and used as the discrete scan point. Surface normal vector at the location ; Steps 1-3: At discrete scan points Establish a surface normal vector at the location Using a local coordinate system along the Z-axis, project K neighboring points onto the XOY plane of the local coordinate system, and calculate the discrete scan points using a quadratic surface fitting method. The two principal curvature values at the location and and the two principal curvature values and The combination is the main curvature parameter.
3. The terahertz adaptive scanning method for irregular samples according to claim 2, characterized in that, Step 2 includes: Step 2-1: Fix the terahertz probe to the end effector of the six-degree-of-freedom robotic arm, generate the scanning trajectory of the six-degree-of-freedom robotic arm based on the three-dimensional point cloud data, and keep the angle between the optical axis of the terahertz probe and the surface normal vector at each scanning point within the preset allowable deviation range. Step 2-2: Drive the six-degree-of-freedom robotic arm along the scanning trajectory to move the terahertz probe and scan the irregular sample surface point by point. At each scanning point, acquire a corresponding terahertz time-domain echo signal and compare the terahertz time-domain echo signal with the coordinates of the scanning point. Perform associated storage; Steps 2-3: At each scanning point, by reading the real-time attitude data of the end effector of the six-degree-of-freedom robotic arm, calculate the optical axis direction of the terahertz probe and the surface normal vector. The angle between them is recorded as the actual incident angle of the terahertz probe relative to the irregular sample surface. .
4. The terahertz adaptive scanning method for irregular samples according to claim 3, characterized in that, Step 3 includes: Step 3-1: Based on the actual incident angle at each scanning point and surface normal vector The incident plane of the terahertz wave on the surface of the irregular sample is determined, and the interior of the irregular sample is discretized into M thin layers of equal thickness along the depth direction within the incident plane. Each thin layer of equal thickness is assigned a refractive index value determined by the estimated refractive index distribution of the irregular sample. Step 3-2: Using the two principal curvature values at the scan point and As a boundary curvature constraint, a local refraction angle correction factor that varies with the interface curvature is introduced at each interface of equal-thickness thin layers. This local refraction angle correction factor dynamically adjusts the calculated value of the refraction angle in Snell's law according to the ratio of the radius of curvature at the interface to the terahertz wavelength. Step 3-3: Starting from the incident point on the irregular sample surface, a layer-by-layer recursive ray tracing algorithm is used to calculate the actual refraction direction and propagation path length of the terahertz wave at each interface of equal-thickness thin layers. The propagation path lengths of each segment are then summed to obtain the propagation path length from the incident point to the... The total ray path expression between the internal reflecting interfaces, which includes the actual incident angle. Two principal curvature values and The ray path tracing model is constructed by using the refractive index values of each layer in the predicted refractive index distribution as independent variables.
5. The terahertz adaptive scanning method for irregular samples according to claim 4, characterized in that, Step 4 includes: Step 4-1: Extract the measured flight time corresponding to each reflection peak from the terahertz time-domain echo signal. subscript Indicates the first Each scan point, index Indicates the first An internal reflective interface, and the measured flight time The total ray path expression output by the ray path tracing model Establish an equation relationship, that is ,in The speed of light in a vacuum; Step 4-2: For each scan point The J equations corresponding to the first to the Jth internal reflection interfaces are combined to form a nonlinear equation system, in which the true depth value of each internal reflection interface is used. and the actual refractive index of each layer of medium As the unknown quantity to be solved, the true depth value There is a one-to-one correspondence between the cumulative thickness of each equal-thickness thin layer in the ray path tracing model; Step 4-3: The Levenberg-Marquardt algorithm is used to iteratively solve the nonlinear equations. In each iteration, the principal curvature parameters are used as prior constraints to limit the range of the interface curvature correction factor. The iteration stops when the absolute value of the difference between the objective function values of two adjacent iterations is less than the preset convergence threshold, and the true depth value of each internal reflection interface is output. and interface curvature correction factor Among them, the interface curvature correction factor Defined as the ratio of the actual propagation path length to the straight propagation path length at the interface.
6. The terahertz adaptive scanning method for irregular samples according to claim 5, characterized in that, Step 5 includes: Step 5-1: According to the first At the scanning point The true depth value of an internal reflective interface and the The true depth value of an internal reflective interface Calculate the first Layered medium along surface normal vector Original physical thickness in direction ,in Indicates an irregular sample surface; Step 5-2: Use the first At the scanning point Interface curvature correction factor for each internal reflection interface For the original physical thickness Perform layer-by-layer correction to obtain the surface normal vector of the j-th layer of medium. Actual physical thickness in the direction ; Step 5-3: Calculate the actual physical thickness of all internal reflective interfaces at each scanning point. According to the interface number Arranged in ascending order, forming a thickness array. At the same time, based on the actual physical thickness Using the known refractive indices of the various media layers within the irregular sample, the corrected time of flight corresponding to each reflection peak is calculated in reverse. After arranging all the corrected flight times in order of interface number, a corrected delay sequence is generated. .
7. The terahertz adaptive scanning method for irregular samples according to claim 6, characterized in that, Step 6 includes: Step 6-1: For the first The first scan point at the _th scan point An internal reflective interface is identified, and its true depth value is obtained. and the coordinates of the scan point and surface normal vector According to the spatial offset formula Calculate the three-dimensional spatial coordinates of the internal reflective interface. All scan points and all internal reflection interfaces Corresponding three-dimensional spatial coordinates After being collected, they form a set of three-dimensional spatial coordinate points. ; Step 6-2: From each scan point Extract the first terahertz time-domain echo signal from the acquired terahertz signal. The amplitude value of the reflection peak corresponding to each internal reflection interface For the amplitude value of the reflection peak According to the formula Perform linear normalization, where The maximum value among the reflection peak amplitudes corresponding to all internal reflection interfaces at all scan points. It is the minimum value among the reflection peak amplitude values corresponding to all internal reflection interfaces at all scan points; Step 6-3: Normalize the amplitude value of the reflection peak Multiply by the length of the preset color lookup table Then round down to get the color index value. According to color index value Find the corresponding RGB color triplet from the preset color lookup table. Assign the RGB color triple to the corresponding point in the three-dimensional space coordinate point set Q. The color attribute.
8. The terahertz adaptive scanning method for irregular samples according to claim 7, characterized in that, Step 7 includes: Step 7-1: For each three-dimensional spatial coordinate point in the three-dimensional spatial coordinate point set Q... and its corresponding color attributes Input the data into the point cloud processing library to generate raw point cloud data with color information; Step 7-2: Perform voxel downsampling filtering on the original point cloud data. Set the side length of the voxel grid to a preset resolution threshold. Take the arithmetic mean of the color attributes of all three-dimensional spatial coordinate points in each voxel grid and use it as the color attribute of the output point of that voxel grid to obtain the downsampled dense point cloud data. Step 7-3: The Poisson surface reconstruction algorithm is used to reconstruct the dense point cloud data after downsampling. The coordinates and color attributes of each point in the dense point cloud data are used as constraints. The gradient field of the indicator function is solved iteratively. After extracting the isosurface, a three-dimensional mesh model with color texture mapping is generated. This three-dimensional mesh model is used as the three-dimensional structural image of the irregular sample. Step 7-4: Scan all points All corresponding internal reflection interfaces Actual physical thickness According to scan point index and Interface Index Organized into a two-dimensional thickness matrix ,in The two-dimensional thickness matrix is output as an array of actual physical thicknesses for each layer in a comma-separated value file format.