A terahertz three-dimensional reconstruction method based on mechanical arm scanning
By combining robotic arm scanning and terahertz spectral data processing with the K-nearest neighbor algorithm and time-of-flight thickness measurement, the reconstruction accuracy and visualization problems of terahertz 3D imaging are solved, achieving efficient 3D reconstruction and visualization effects, which are suitable for high-precision analysis of complex and irregular samples.
Patent Information
- Application Number
- CN202510911897.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-07-03
AI Technical Summary
Existing terahertz 3D imaging technology suffers from problems such as insufficient reconstruction accuracy, high computational complexity, severe data noise, lack of deep learning enhancement methods, and limited visualization effects, making it difficult to meet the needs of real-time processing and high-quality data analysis.
A robotic arm-based scanning method was adopted to acquire terahertz spectral data through snake scanning. The normal vector was calculated by combining the K-nearest neighbor algorithm and the terahertz time-of-flight thickness measurement. The three-dimensional coordinates of the sample were reconstructed layer by layer. The terahertz spectral data was then converted into a color matrix for three-dimensional reconstruction and visualization.
It improves the resolution and accuracy of 3D imaging, clearly presenting the internal structure and surface details of samples, enabling efficient data visualization and interactive analysis, and is suitable for high-precision 3D reconstruction of complex and irregular samples.
Smart Images

Figure CN120411387B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of three-dimensional imaging, and in particular relates to a terahertz three-dimensional reconstruction method based on robotic arm scanning, which is particularly suitable for performing terahertz three-dimensional imaging of irregular samples. Background Art
[0002] As an emerging non-destructive detection method, terahertz (THz) imaging technology has received widespread attention in recent years in the fields of security testing, biomedical imaging, and non-destructive testing of materials. Terahertz waves are located between the millimeter wave and infrared bands of the electromagnetic spectrum (0.1–10 THz). They have both optical and radio frequency characteristics and can penetrate a variety of non-metallic materials, such as plastics, paper, and fiber fabrics. They also have a strong ability to distinguish the spectral characteristics of various substances. Therefore, terahertz imaging technology can be used to obtain structural information and material properties of the object being tested. Terahertz three-dimensional imaging is one of the important research directions in this field, but existing terahertz three-dimensional imaging technology still faces many challenges, mainly including the following deficiencies:
[0003] (1) Limited 3D reconstruction accuracy. Traditional terahertz 3D imaging methods rely primarily on tomography or synthetic aperture radar for data reconstruction. These methods often require a large amount of sampled data to achieve high resolution, and insufficient sampling can lead to reconstruction artifacts, affecting imaging quality. Although the existing Fourier transform reconstruction method has a fast computational speed, it is sensitive to data noise and can easily lead to loss of details in 3D imaging, affecting the final visualization effect.
[0004] (2) High computational complexity and insufficient real-time processing capabilities. Traditional 3D reconstruction algorithms, such as beamforming algorithms, ART algebraic reconstruction, and FBP filtered back projection, have high computational complexity, resulting in slow processing speeds and difficulty meeting the needs of real-time imaging or large-scale data processing. In application scenarios such as industrial inspection or security screening, 3D reconstruction often needs to be completed in milliseconds, but the computational efficiency of existing algorithms is difficult to meet practical application requirements.
[0005] (3) Data noise has a serious impact, making it difficult to achieve high-quality enhancement. During the terahertz imaging process, due to signal attenuation and environmental interference, the collected data often contains strong noise and artifacts, resulting in a decrease in imaging quality.
[0006] (4) Traditional denoising methods, such as wavelet transform and mean filtering, often cannot take into account both noise suppression and detail preservation, resulting in obvious deficiencies in data enhancement for terahertz three-dimensional imaging.
[0007] (5) Lack of effective deep learning enhancement methods. In recent years, deep learning has made great breakthroughs in the field of computer vision, but its application in 3D data enhancement for terahertz imaging is still in its infancy. Most existing deep learning methods are based on 2D image processing and are difficult to directly apply to 3D terahertz imaging data. They require specific optimization for 3D point clouds, volume data (Voxel), or spectral data.
[0008] (6) Limited visualization effects and lack of interactive data analysis capabilities. Existing terahertz imaging visualization systems mostly use simple two-dimensional pseudo-color images, which are difficult to truly reflect the three-dimensional structure of objects. The amount of data after three-dimensional reconstruction is huge, and there is a lack of efficient rendering algorithms and interactive visualization methods, resulting in low data analysis efficiency and difficulty in meeting the application requirements of complex scenes. Summary of the Invention
[0009] The present invention aims to provide a terahertz three-dimensional reconstruction method based on robotic arm scanning, aiming to address the shortcomings of existing terahertz three-dimensional imaging technology in reconstruction accuracy, computational efficiency, data enhancement and visual interaction.
[0010] In order to achieve the above object, the present invention adopts the following technical solutions:
[0011] A terahertz three-dimensional reconstruction method based on robotic arm scanning specifically includes the following steps:
[0012] S1. The 3D modeling system establishes a scanning trajectory on the surface of the sample to be tested. The robotic arm clamps the terahertz probe and scans perpendicularly to each scanning point on the surface of the sample to be tested using a serpentine scanning method. The terahertz spectrum data S corresponding to the sample is collected. The scanning trajectory of the sample surface to be tested is given by scanning points, the coordinates of the i-th scanning point are , , the spatial coordinate sequence composed of n scanning points is P, , scan the i-th scanning point to obtain the corresponding terahertz spectrum data , , is a one-dimensional vector of length m, i is a positive integer from 1 to n, then .
[0013] S2. Search according to the estimated K nearest neighbor algorithm and calculate the normal vector of each scan point in P. The normal vector corresponding to the i-th scan point is , , the normal vector is a unit vector, and the sequence of normal vectors corresponding to all scan points in P is .
[0014] S3. According to the terahertz time-of-flight thickness measurement method, determine the offset distance d along the normal vector of the scanning point in the jth layer relative to the corresponding scanning point in the j-1th layer based on the following formula.
[0015]
[0016] in, is the delay time, is the refractive index of the sample to be measured, and c is the speed of light.
[0017] S4. Calculate the coordinate set corresponding to the n points in each j layer according to the following formula , based on the coordinate set , merge the coordinate points of the m layer of the sample to be tested, and get The coordinate point matrix H, j is a positive integer between 2 and m.
[0018]
[0019]
[0020] S5. Convert the time-domain amplitude value of the terahertz spectrum into a color matrix .
[0021]
[0022] in, is a The matrix, Indicates that all elements are the maximum value in matrix S The matrix, Indicates that all elements are minimum values in matrix S , C is the color matrix, Indicates the length of the color matrix C.
[0023] S6. Combine the coordinate point matrix H and the color matrix Combined 3D reconstruction and visualization.
[0024] Step S2 is specifically as follows: S201. For the i-th scanning point, take the i-th scanning point as the center point, and use the K nearest neighbor algorithm to search for all three-dimensional space coordinate points whose Euclidean distance D to the i-th scanning point is less than 0.1 as adjacent points. The number of adjacent points is K, and the maximum value of K is 30.
[0025] S202. Find the centroid C of K adjacent points, subtract the centroid from the coordinates of each adjacent point, and obtain the centralized vector , use the centralized point set to construct the covariance matrix , perform eigendecomposition on the covariance matrix to obtain the eigenvalues and corresponding eigenvectors. The eigenvector corresponding to the minimum eigenvalue is normalized to become the normal vector.
[0026] Step S6 specifically includes: Import the Open3D library, convert the two matrices into Open3D point cloud data, denoise, filter or downsample the point cloud data, and finally perform 3D reconstruction and visualization.
[0027] The present invention first obtains terahertz spectral data based on scanning the sample surface by a robotic arm, divides the sample into m layers based on the terahertz spectral data, and then determines the corresponding n three-dimensional coordinates in the second to mth layers through the coordinates of the scanning points, the normal vectors corresponding to the scanning points, and the distance offset along the normal vectors to obtain the sample's three-dimensional coordinate matrix H. Then, the amplitude values of the terahertz spectral data are converted into a color matrix I. Finally, the three-dimensional coordinate matrix H and the color matrix I are combined to realize three-dimensional reconstruction of the sample to be tested.
[0028] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention can improve the resolution of terahertz three-dimensional imaging. Experimental results show that the present invention improves the three-dimensional reconstruction accuracy of complex irregular samples by more than 100% compared with the prior art, and can clearly present the internal structure and surface details of the sample; (2) The three-dimensional reconstruction method of the present invention has no requirements on the surface shape, structure and material of the sample. It is not only suitable for the three-dimensional reconstruction of complex irregular samples, but also can be applied to terahertz imaging analysis of other types of samples. Whether it is biological tissue, composite materials or micro-nanostructure samples, high-precision terahertz spectrum three-dimensional reconstruction can be achieved through the present invention; (3) The terahertz spectrum data set with precise position marks and the optimized and reconstructed three-dimensional model greatly improve the reliability of the data. At the same time, the three-mode model can be presented intuitively, the visualization is enhanced, the interpretability of the data is improved, and it is convenient for researchers to conduct data analysis and scientific research. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a schematic diagram of the continuous time-domain terahertz time-domain spectrum structure involved in Example 1.
[0030] Figure 2 This is a flow chart of the terahertz three-dimensional reconstruction method based on robotic arm scanning involved in Example 1.
[0031] Figure 3 This is the terahertz spectrum data collected at a certain scanning point.
[0032] Figure 4 is the normal vector image of the surface (curved surface) of the sample to be tested.
[0033] Figure 5 The three-dimensional image constructed from the coordinate point matrix H.
[0034] Figure 6 is the coordinate point matrix H and color matrix A three-dimensional image constructed together. DETAILED DESCRIPTION
[0035] The present invention will be further described below through specific examples.
[0036] Example 1
[0037] like Figure 2 As shown, the terahertz 3D reconstruction method based on robotic arm scanning involved in this embodiment specifically includes the following steps:
[0038] S1. The 3D modeling system establishes a scanning trajectory on the surface of the sample to be tested. The robotic arm clamps the terahertz probe and scans perpendicularly to each scanning point on the surface of the sample to be tested using a serpentine scanning method. The terahertz spectrum data S corresponding to the sample is collected. The scanning trajectory of the sample surface to be tested is given by scanning points, the coordinates of the i-th scanning point are , , the spatial coordinate sequence composed of n scanning points is P, , scan the i-th scanning point to obtain the corresponding terahertz spectrum data (See Figure 3 ), , is a one-dimensional vector of length m, i is a positive integer from 1 to n, then .
[0039] Based on the penetrability of terahertz waves, terahertz spectral data is obtained when the terahertz wave is vertically incident on the sample. , Indicates the depth information of the sample below the i-th scanning point, , indicating that the terahertz spectral data consists of m points. Based on the terahertz time-of-flight (TOF) thickness measurement method, the delay times corresponding to these m points can be converted into corresponding depths. Therefore, based on the terahertz spectral data corresponding to all scanning points in P, the sample to be tested can be divided into m layers. Each layer can be determined by multiple (e.g., n) three-dimensional coordinates. All scanning points in P determine the structure and morphology of the first layer. Based on the coordinates of all scanning points in P, the normal vectors corresponding to the scanning points, and the offset distances along the normal vectors, the corresponding n three-dimensional coordinates in layers 2 through m can be determined. That is, if the sample to be tested is divided into m layers, the coordinates of a point in the jth layer can be obtained by offsetting any scanning point in the first layer by a corresponding distance along the normal vector of that scanning point. Using all scanning points in the first layer, the three-dimensional coordinates of n points in the jth layer can be obtained. These n points can determine the structure and morphology of the jth layer, where j is a positive integer between 2 and m.
[0040] This embodiment adopts Figure 1 The terahertz time-domain spectrometer performs scanning and includes a bias source, a femtosecond laser 1, an optical path delay, a transmitting antenna 2, a detecting antenna 3, and a signal acquisition system. The femtosecond laser 1 is configured to output two femtosecond pulses of the same frequency and phase. One femtosecond pulse (pump light) is output to the transmitting antenna 2, while the other femtosecond pulse (probe light) is delayed by the optical fiber delay before reaching the detecting antenna 3. The femtosecond pulses excite photogenerated carriers within the photoconductive material. Under the action of an external bias source, these carriers generate pulsed terahertz waves. The pulsed terahertz waves are incident on the sample 4 and propagate to the detecting antenna 3. The pulsed terahertz waves and the femtosecond pulse (probe light) meet at the detecting antenna 3, generating a current. The signal acquisition system samples the current to obtain the terahertz signal intensity. The terahertz probe includes the detecting antenna 3 and the transmitting antenna 2, and can specifically be the terahertz system optical integrated lens disclosed in Patent Publication No. CN114967026A.
[0041] S2. Search according to the estimated K nearest neighbor algorithm and calculate the normal vector of each scan point in P. The normal vector corresponding to the i-th scan point is , , the normal vector is a unit vector, and the sequence of normal vectors corresponding to all scan points in P is , Figure 4 is the image of the normal vectors formed by all scanning points in P, and the direction of the normal vector of the i-th scanning point is the direction of the depth corresponding to the terahertz spectrum data corresponding to the point.
[0042] Specifically, S201, for the i-th scanning point, take the i-th scanning point as the center point, and use the K nearest neighbor algorithm to search for all three-dimensional space coordinate points whose Euclidean distance D to the i-th scanning point is less than 0.1 as neighboring points. The number of neighboring points is K, and the maximum value of K is 30.
[0043] For example, the coordinates of the i-th scanning point are , the coordinates of the kth scanning point are , then the Euclidean distance D between the i-th scanning point and the k-th scanning point is:
[0044]
[0045] S202. Find the centroid C of K adjacent points, subtract the centroid from the coordinates of each adjacent point, and obtain the centralized vector , use the centralized point set to construct the covariance matrix , perform eigendecomposition on the covariance matrix to obtain the eigenvalues and corresponding eigenvectors. The eigenvector corresponding to the minimum eigenvalue is normalized to become the normal vector (unit vector).
[0046]
[0047]
[0048] .
[0049] S3. According to the terahertz time of flight (TOF) thickness measurement method, determine the offset distance d along the normal vector of the scanning point in the jth layer relative to the corresponding scanning point in the j-1th layer based on the following formula.
[0050]
[0051] in, is the delay time, is the refractive index of the sample to be measured, and c is the speed of light.
[0052] S4. Calculate the coordinate set corresponding to the n points in each j layer according to the following formula , based on the coordinate set , merge the coordinate points of the m layer of the sample to be tested, and get Coordinate point matrix H, such as Figure 5 shown.
[0053]
[0054]
[0055] S5. Convert the time-domain amplitude value of the terahertz spectrum into a color matrix .
[0056]
[0057] in, is a The matrix, Indicates that all elements are the maximum value in matrix S The matrix, Indicates that all elements are minimum values in matrix S , C is the color matrix, Indicates the length of the color matrix C.
[0058] S6. Combine the coordinate point matrix H and the color matrix Combined 3D reconstruction and visualization.
[0059] Specifically, the coordinate point matrix H and the color matrix Import the Open3D library, convert the two matrices into Open3D point cloud data, process the point cloud data, such as denoising, filtering or downsampling, and finally perform 3D reconstruction and visualization. The results are as follows Figure 6 shown.
Claims
1. A terahertz three-dimensional reconstruction method based on robotic arm scanning, characterized in that: The specific steps include: S1. The 3D modeling system establishes a scanning trajectory on the surface of the sample to be tested. The robotic arm clamps the terahertz probe and scans perpendicularly to each scanning point on the surface of the sample to be tested using a serpentine scanning method. The terahertz spectrum data S corresponding to the sample is collected. The scanning trajectory of the sample surface to be tested is given by scanning points, the coordinates of the i-th scanning point are , , the spatial coordinate sequence composed of n scanning points is P, , scan the i-th scanning point to obtain the corresponding terahertz spectrum data , , is a one-dimensional vector of length m, i is a positive integer from 1 to n, then ; S2. Search according to the estimated K nearest neighbor algorithm and calculate the normal vector of each scan point in P. The normal vector corresponding to the i-th scan point is , , the normal vector is a unit vector, and the sequence of normal vectors corresponding to all scan points in P is ; S3. Determine the offset distance d along the normal vector of the scanning point in the jth layer relative to the corresponding scanning point in the j-1th layer based on the following formula according to the terahertz time-of-flight thickness measurement method; ; in, is the delay time, is the refractive index of the sample to be measured, c is the speed of light; S4. Calculate the coordinate set corresponding to the n points in each j layer according to the following formula , based on the coordinate set , merge the coordinate points of the m layer of the sample to be tested, and get Coordinate point matrix H, j is a positive integer between 2 and m; ; S5. Convert the time-domain amplitude value of the terahertz spectrum into a color matrix ; ; in, is a The matrix, Indicates that all elements are the maximum value in matrix S The matrix, Indicates that all elements are minimum values in matrix S , C is the color matrix, Indicates the length of the color matrix C; S6. Combine the coordinate point matrix H and the color matrix Combined 3D reconstruction and visualization.
2. The terahertz 3D reconstruction method based on robotic arm scanning according to claim 1, characterized in that: Step S2 is specifically as follows: S201, for the i-th scanning point, take the i-th scanning point as the center point, and use the K nearest neighbor algorithm to search for all three-dimensional space coordinate points whose Euclidean distance D to the i-th scanning point is less than 0.1 as neighboring points, the number of neighboring points is K, and the maximum value of K is 30; S202. Find the centroid C of K adjacent points, subtract the centroid from the coordinates of each adjacent point, and get the centralized vector , use the centralized point set to construct the covariance matrix , perform eigendecomposition on the covariance matrix to obtain the eigenvalues and corresponding eigenvectors. The eigenvector corresponding to the minimum eigenvalue is normalized to become the normal vector.
3. The terahertz 3D reconstruction method based on robotic arm scanning according to claim 1, characterized in that: Step S6 specifically includes: Import the Open3D library, convert the two matrices into Open3D point cloud data, denoise, filter or downsample the point cloud data, and finally perform 3D reconstruction and visualization.
Citation Information
Patent Citations
Flexible two-dimensional adjustable terahertz system optical integrated lens
CN114967026A
Self-adaptive terahertz three-dimensional tomography device and method
CN114777676A
Method and system for measuring thickness of curved-surface multilayer structure based on terahertz time-domain spectroscopy
CN118758193A