Microscopic Three-Dimensional Measurement Based on Telecentric Stereo and Speckle Projection Methods

Three-dimensional (3D) measurement of microstructures has become increasingly important, and many microscopic measurement methods have been developed. For the dimension in several millimeters together with the accuracy at sub-pixel or sub-micron level, there is almost no effective measurement method now. Here we present a method combining the microscopic stereo measurement with the digital speckle projection. A microscopy experimental setup mainly composed of two telecentric cameras and an industrial projection module is established and a telecentric binocular stereo reconstruction procedure is carried out. The measurement accuracy has firstly been verified by performing 3D measurements of grid arrays at different locations and cylinder arrays with different height differences. Then two Mitutoyo step masters have been used for further verification. The experimental results show that the proposed method can obtain 3D information of the microstructure with a sub-pixel and even sub-micron measuring accuracy in millimeter scale.


Introduction
With the development of micro-electro-mechanical system (MEMS), 3D measurements of microstructures have become more and more important [1,2]. Most microstructures have dimensions ranging from a few microns to several centimeters. Their 3D information, especially the heights, must be measured, and many measurement methods have been developed for this purpose. Among them, non-contact optical methods have been widely used because of their non-destructiveness, flexibility, and high efficiency. Some measurement methods such as digital holography [3], confocal microscopy [4], white-light interferometry [5] and optical fiber probe method [6][7][8], etc., can achieve submicron or even nano-scale measurement accuracy, whereas their measurement ranges are in sub-millimeter, micron, or sub-micron scale.
The microscopic fringe projection method, on the contrary, is studied widely and suitable for measuring microstructures whose dimensions are in the order of millimeters and above with the measurement accuracy from a few to tens of microns [9][10][11]. It can realize well 3D measurement of microstructures with different surfaces such as a gauge block [12], ball grid arrays (BGA) [13,14], coins [15,16], a wafer [17], an earphone diaphragm [18], and a step master [19], and can also perform dynamic measurements [20,21]. Due to a lack of suitable methods for system calibration and removing carrier-phase components from the measurement phases [22], it is difficult for its measurement accuracy to reach two or three microns and below. In the meanwhile, the microscopic stereo measurement method can obtain different measurement ranges and accuracies by changing the microscope objectives used, so that the 3D measurements of microstructures with different sizes and accuracy requirements can be realized [23]. These results depend on the measurement environment (especially the illumination conditions) and objects measured. For microstructures with no apparent features on the surfaces, it is difficult to obtain accurate 3D measurements. In order to improve the measuring robustness, patterns in the form of random speckles can be artificially created on the surfaces of monotonous microstructures [24]. Traditional methods to create patterns on micro-surfaces are mainly by spraying powders [25][26][27] or fluorescent microparticles [28,29], depositing constantan alloy [30], and generating laser speckles [31][32][33]. They are complicated and almost irreversible for the samples, and the microparticles may have a certain influence on 3D measurements. A method of projecting digital speckle patterns by means of a projector can conveniently create random features on the surface without affecting the samples, and has been applied to many macroscopic fields to achieve 3D measurements of simple shapes [34], human face [35], a Venus model [36], human body [37], a shape-complex mask [38], and different types of surfaces [39,40]. Whereas, this speckle projection method is rarely used in the field of microscopy.
Besides, almost all microscopic stereo measurement systems use pinhole microlenses as measuring probes because of the wide ranges in the field of view (FOV) and magnification, and the depths of field (DOF) are very small. The DOF and resolution of these microlenses are mutually constrained. It is insufficient to measure the complete depth of microstructures [13]. The telecentric lenses (including image-side, object-side and bi-telecentric lens), on the contrary, can extend the DOF to millimeters while maintaining high resolution due to the unique affine imaging properties [41,42]. However, telecentric lenses are rarely used in the 3D measurement of microstructures with binocular stereo microscopy except for aligning optical fibers [43].
In view of the above, we present a method combining the microscopic telecentric stereo measurement with the digital random speckle projection to obtain 3D information of microstructures with high accuracy. Two identical monochrome cameras were assembled from bi-telecentric lenses and charge coupled devices (CCDs) and used as image sensors (pixel sizes: 3.45 µm × 3.45 µm) to capture the images of microstructures. The measurement accuracy of the established setup was firstly verified by performing 3D measurements of grid arrays at different locations and cylinder arrays with different height differences. Then two Mitutoyo step masters were employed for further validation. The experimental results proved that the proposed method could obtain 3D information of the microstructures with sub-pixel (cylinder arrays, maximum 1.40 µm, 0.40 pixel size) and even sub-micron (grid arrays and step masters, maximum 0.83 µm) accuracy at least in a measuring range of 3.5 mm × 4.2 mm laterally and 0.6 mm longitudinally.

Telecentric Stereo Measurement
The bi-telecentric lens has been studied in detail [41,44]. It is combined with the CCD to form a bi-telecentric camera to perform parallel projection in practice with the model: where m is the magnification of the bi-telecentric lens (also the intrinsic parameter); (S u , S v ) are the scale factors in the sensor coordinate directions with units of unit metric length/pixel (generally given by the manufacturers of the sensors); (u 0 , v 0 ) are the coordinates of the image system's origin in the pixel system, that is, the coordinates of the principal point in pixels (generally taken as the image center); the truncated matrix R = [r 11 , r 12 , r 13 ; r 21 , r 22 , r 23 ] and truncated vector T = [t x ; t y ] are the first two rows of the rotation matrix and translation vector, respectively, and both are the extrinsic parameters. The intrinsic and extrinsic parameters can be calibrated based on the improved telecentric projection model presented in [45]. Then we multiply the intrinsic and extrinsic matrixes in the projection model and get: where p 11 = r 11 · m/S u , p 12 = r 12 · m/S u , p 13 = r 13 · m/S u , p 14 = t x · m/S u + u 0 , p 21 = r 21 · m/S v , These are the projection parameters of one camera which can be calculated directly, and so are the parameters of another camera. The imaging in pixels of a world point P w (X w , Y w , Z w ) in the left telecentric camera (simply called left camera) is considered as p 1 (u 1 , v 1 ), and in the right telecentric camera (simply called right camera) is p 2 (u 2 , v 2 ).
Combining the projection models of the left and right cameras, we can obtain:  Here Q is a full rank matrix, otherwise the world points derived from matching points are not unique, which goes against the basic principle of the binocular stereo vision imaging. Once the matching points are obtained, the coordinates of the world point can be derived from the following formula by performing a reverse operation on Equation (3): where Q −1 is the inverse matrix of Q.

Grayscale-Based Global Matching Method
In order to realize the measurement of 3D sizes of microstructures, a grayscale-based global matching method is adopted [46]. A template matching method which minimizes the gray value differences between a kernel of (2w m +1) × (2w n +1) pixels in one image (the template) and a displaced copy in another image is used to determine the most possible matching points, where w m and w n are the numbers of pixels in rowand columndirections in the pixel coordinate system, respectively. Taking into account the illumination changes between the left and right images, a zero-mean normalized sum of squared difference (ZNSSD) [24] matching criterion is adopted: where: Here, C l (j 1 , j 2 ) and C r (j 3 , j 4 ) are the centers of the kernel in the left and right images, respectively; x is the increment in rowdirection, ranging from −w m to w m , and y is the increment in columndirection, ranging from −w n to w n . (j 1 + x, j 2 + y) and (j 3 + x, j 4 + y) are the coordinates of the image points P l (in the kernel in left image) and P r (in the kernel in right image), respectively, and I(j 1 + x, j 2 + y) and I(j 3 + x, j 4 + y) are the gray values at the points P l and P r , respectively. Therefore, I lm and I rm are the mean gray values of all pixels in the kernels of left and right images, respectively; F i and G i can be considered as the zero-mean gray values at the point P l and P r , respectively; h 1 and h 2 are intermediate variables. When ϕ 2 takes a minimum value, C l (j 1 , j 2 ) matches C r (j 3 , j 4 ). In this way, we can find all the matching points.
There are epipolar line constraints [47] and range constraints in the matching process, so as to avoid a full image search in the reference images and reduce the matching time. When telecentric lenses are used in both the cameras, the epipolar line constraint can be written as [u 2 , v 2 , 1] · F A · [u 1 , v 1 , 1] = 0, where (u 1 , v 1 ) and (u 2 , v 2 ) are respectively the pixel coordinates of the matching points in the left and right images, and F A is the fundamental matrix of the telecentric binocular stereo measurement system which can describe the intrinsic geometrical properties and can be expressed as [48]: The range constraint is that a point in the left image matches a point in the right image within a certain area, and the size of this area is suitable for the entire matching process. The four parameters (a, b, c, d) in Equation (12) and the size of the area in the range constraint can be determined by four pairs of non-collinear matching points at least.

Statistically Random Coding Method
The statistical random coding method, which is easy to implement and miniaturize, has been applied to some commercial products in macro fields successfully, such as iPhone X, VIC series products, Microsoft Kinect V1, Inter RealSense R200, etc. [49]. There are still some fundamental limitations including low spatial resolution, low measurement accuracy, and sensitive to noise, etc. Few people think of applying it for micro measurements. Here we creatively apply it to the telecentric microscopic binocular system so as to realize 3D measurements of microstructures. Firstly, the random speckle coding pattern is generated by a computer; then, this speckle pattern is projected onto the surface of a microstructure by a projector; thirdly, the left and right cameras simultaneously acquire images of the microstructure whose surface is covered with the speckle pattern; fourthly, the matching points are searched by the grayscale-based global matching method described in Section 2.2; finally, the 3D information of the microstructure is calculated by the telecentric stereo measurement method introduced in Section 2.1.

Experimental Measurement
An experimental setup combining the microscopic telecentric stereo measurement with the digital random speckle projection, whose measurement range mainly determined by the telecentric cameras was 3.53 mm × 4.22 mm × 2.60 mm, was established as shown in Figure 1a. Two identical bi-telecentric cameras used as image sensors were applied to achieve the binocular stereo measurement with the pixel sizes 3.45 µm × 3.45 µm. An industrial projection module as shown in Figure 1b  Wintech, Beijing, China, with the resolution 912 × 1140, a projection distance of 119 mm, a projection size of 51.6 mm × 32.2 mm, and less than 0.1% projection distortion) was used to project the digital random speckle pattern (Figure 1c) on the surface of the microstructures, and act as an illuminator. Since the projection size was larger, it could completely cover the entire measurement area and the size of the measured projected image section was the same as the measurement range of the telecentric cameras. There was no measurement error between the prospective projected size and actual size. The two bi-telecentric cameras were calibrated based on the improved affine model. More details about other optical components could be found in [45]. The telecentric binocular stereo reconstruction algorithm was performed. A multi-frequency grid distortion target (composed of a grid array) serving as a planar calibration pattern was used for verifying the measurement accuracy of the established setup. This grid array was moved in z-direction controlled by a 3-axis micro-positioning stage, and images at different positions were captured by the two telecentric cameras. 3D measurements of three sets of cylinder arrays were performed for further verification. Two step masters, as shown respectively in Figure 1d  microstructures, and act as an illuminator. Since the projection size was larger, it could completely cover the entire measurement area and the size of the measured projected image section was the same as the measurement range of the telecentric cameras. There was no measurement error between the prospective projected size and actual size. The two bi-telecentric cameras were calibrated based on the improved affine model. More details about other optical components could be found in [45]. The telecentric binocular stereo reconstruction algorithm was performed. A multi-frequency grid distortion target (composed of a grid array) serving as a planar calibration pattern was used for verifying the measurement accuracy of the established setup. This grid array was moved in z-direction controlled by a 3-axis micro-positioning stage, and images at different positions were captured by the two telecentric cameras. 3D measurements of three sets of cylinder arrays were performed for further verification. Two step masters, as shown respectively in Figure 1d  The relevant parameters of the two bi-telecentric cameras expressed in Equation (1) were calibrated as follows: and the matrix of Q could be calculated as:  The relevant parameters of the two bi-telecentric cameras expressed in Equation (1) were calibrated as follows: and the matrix of Q could be calculated as:

Results and Discussion
After matching the corresponding grid points in the left and right images, different positions (where the grid array had been placed) and the spacings between adjacent grid points in x and y directions (both nominal values were 50 µm) could be figured out. Here the size of the measurement area was 2.50 mm × 2.50 mm laterally. Figure 2a shows the surfaces fitted from the reconstructions of the grid arrays at three different locations in an easy-to-view angle, and Figure 2b displays three lines formed by averaging the three surfaces in Figure 2a in the x-direction. In the z-direction, the average measurement results of the positions were 0.02, 499.86 and 599.58 µm, while the corresponding values were 0, 500.0 and 600.0 µm. The absolute errors were 0.02, 0.14 and 0.42 µm, respectively. The measured spacings, absolute errors and standard deviations between the adjacent grid points in x and y directions were also listed in Table 1. These errors were mainly affected by the resolution of the hardware devices, calibration error, and imaging noise. Even so, the reconstruction accuracies were still at sub-micron level.

Results and Discussion
After matching the corresponding grid points in the left and right images, different positions (where the grid array had been placed) and the spacings between adjacent grid points in x and y directions (both nominal values were 50 µ m) could be figured out. Here the size of the measurement area was 2.50 mm × 2.50 mm laterally. Figure 2a shows the surfaces fitted from the reconstructions of the grid arrays at three different locations in an easy-to-view angle, and Figure 2b displays three lines formed by averaging the three surfaces in Figure 2a in the x-direction. In the z-direction, the average measurement results of the positions were 0.02, 499.86 and 599.58 µ m, while the corresponding values were 0, 500.0 and 600.0 µ m. The absolute errors were 0.02, 0.14 and 0.42 µ m, respectively. The measured spacings, absolute errors and standard deviations between the adjacent grid points in x and y directions were also listed in Table 1. These errors were mainly affected by the resolution of the hardware devices, calibration error, and imaging noise. Even so, the reconstruction accuracies were still at sub-micron level.   3D reconstructions of the three sets of cylinder arrays were carried out. Figure 3a-c show the images in the left camera, and Figure 3d-f show the corresponding images in the right camera. The three sets of cylinder arrays in red boxes were denoted as C1, C2 and C3, respectively. The designed spacings between adjacent points were correspondingly 90, 150 and 200 µm, and the designed height differences were all 20 µm. Here the sizes of the measured areas were around 1.50 mm × 2.50 mm laterally. After threshold segmentation, edge detection, and feature extraction were performed successively, the corresponding circle center coordinates were extracted. Then, the 3D information of the cylinder arrays C1, C2 and C3 could be calculated and reconstructed, as shown in Figure 3g-i.   Figure 3a-c show the images in the left camera, and Figure 3d-f show the corresponding images in the right camera. The three sets of cylinder arrays in red boxes were denoted as C1, C2 and C3, respectively. The designed spacings between adjacent points were correspondingly 90, 150 and 200 µ m, and the designed height differences were all 20 µ m. Here the sizes of the measured areas were around 1.50 mm × 2.50 mm laterally. After threshold segmentation, edge detection, and feature extraction were performed successively, the corresponding circle center coordinates were extracted. Then, the 3D information of the cylinder arrays C1, C2 and C3 could be calculated and reconstructed, as shown in Figure 3g-i.  The results obtained from the Laser Scanning Confocal Microscope (LSCM, (VK-X200K, KEYENCE, Osaka, Japan), as listed in Table 2, were used for comparison. As could be seen, the maximum absolute errors of the established setup were 1.20 µm (|150.7−149.50|) laterally and 1.40 µm (|19.20−20.60|) longitudinally, proving that these measurement results were still within sub-pixel accuracy and the established setup was effective. The measurement errors were mainly caused by the fact that the circles on the cylinder arrays were not standard and there was a certain error in the extraction of the circle center coordinates. The measurement results of the two step masters were shown in Figure 4 as depth maps after smoothing and filtering. Figure 4a-f correspond to the 3D point cloud of the step masters with the height differences of 300, 100, 50, 20, 10 and 5 µm, respectively. The results obtained from the Laser Scanning Confocal Microscope (LSCM, (VK-X200K, KEYENCE, Osaka, Japan), as listed in Table 2, were used for comparison. As could be seen, the maximum absolute errors of the established setup were 1.20 µ m (|150.7−149.50|) laterally and 1.40 µ m (|19.20−20.60|) longitudinally, proving that these measurement results were still within sub-pixel accuracy and the established setup was effective. The measurement errors were mainly caused by the fact that the circles on the cylinder arrays were not standard and there was a certain error in the extraction of the circle center coordinates. Table 2. The reconstruction values compared with the measurement results of LSCM. Here 'Spacing' denoted the spacings between the cylinders, 'Height differences' denoted the average height differences, and (a), (b) and (c) corresponded to the cylinder arrays C1, C2 and C3. The measurement results of the two step masters were shown in Figure 4 as depth maps after smoothing and filtering.  The lateral measurement range in this experiment was 3.50 mm × 4.20 mm. The measurement results were given in Table 3, and the average heights measured by the Taylor Hobson's The lateral measurement range in this experiment was 3.50 mm × 4.20 mm. The measurement results were given in Table 3, and the average heights measured by the Taylor Hobson's comprehensive Sensors 2018, 18, 3882 9 of 13 measurement system for surface profile (Form Talysurf PGI 830, Taylor Hobson Ltd, Leicester, UK) were also listed for comparison. The absolute deviations and relative percentages of these two methods were calculated. The maximum values of these two indicators were 0.83 µm and 2.44%, respectively, which meant that all measurements were in sub-micron accuracy and the results were reliable. It could be seen from Figure 4 and Table 3 that the established setup combined with the proposed method was able to achieve 3D measurements of micro-steps, and the 3D point cloud data of the microstructures' surfaces could also be obtained with submicron-level accuracy in the measurement range. The point cloud data showed a slightly tilt (high on the left and low on the right), may ascribing to the underside of the step masters not even or the 3-axis micro-positioning stage slightly tilted after calibration. We also performed surface analysis of the high-and low-level point cloud data of the step masters whose height differences were 300 and 100 µm. For each level, a plane fitting operation was carried out, and then the fitted plane was subtracted from the measured point cloud to obtain the error distribution. The results along with the corresponding maximum absolute errors, average errors and standard deviations were shown in Figure 5. Here, Figure 5a,b show the error distributions of highand low-level point cloud data of the 300 µm step master, and Figure 5c,d show those of the 100 µm step master. Although the maximum absolute errors were at most 4.88 µm, the average errors were all in the sub-micron range, and the standard deviations were about 0.1%. This means that the error distribution was relatively even in each level and the proposed method had a sub-micron measurement accuracy in the plane and high measurement reliability. The major sources of these errors could come from the roughness of the surfaces, the random noise of the cameras, and the error transfer during measurement (such as calibration, matching, reconstruction, etc.).

Items
comprehensive measurement system for surface profile (Form Talysurf PGI 830, Taylor Hobson Ltd, Leicester, UK) were also listed for comparison. The absolute deviations and relative percentages of these two methods were calculated. The maximum values of these two indicators were 0.83 µ m and 2.44%, respectively, which meant that all measurements were in sub-micron accuracy and the results were reliable. It could be seen from Figure 4 and Table 3 that the established setup combined with the proposed method was able to achieve 3D measurements of micro-steps, and the 3D point cloud data of the microstructures' surfaces could also be obtained with submicron-level accuracy in the measurement range. The point cloud data showed a slightly tilt (high on the left and low on the right), may ascribing to the underside of the step masters not even or the 3-axis micro-positioning stage slightly tilted after calibration. We also performed surface analysis of the high-and low-level point cloud data of the step masters whose height differences were 300 and 100 µ m. For each level, a plane fitting operation was carried out, and then the fitted plane was subtracted from the measured point cloud to obtain the error distribution. The results along with the corresponding maximum absolute errors, average errors and standard deviations were shown in Figure 5. Here, Figure 5a,b show the error distributions of high-and low-level point cloud data of the 300 µ m step master, and Figure 5c,d show those of the 100 µ m step master. Although the maximum absolute errors were at most 4.88 µ m, the average errors were all in the sub-micron range, and the standard deviations were about 0.1%. This means that the error distribution was relatively even in each level and the proposed method had a sub-micron measurement accuracy in the plane and high measurement reliability. The major sources of these errors could come from the roughness of the surfaces, the random noise of the cameras, and the error transfer during measurement (such as calibration, matching, reconstruction, etc.).  The error caused by the surface roughness can be determined and eliminated by an instrument which is capable of measuring surface roughness more accurately, and other errors can be determined and reduced by measuring a smoother standard surface. Because the original point cloud data were smoothed in the row direction, the error distributions in every level looked the same in the horizontal direction. These results showed that high-precision 3D measurements of microstructures could be obtained in millimeter scale.

Conclusions
In this paper, we have proposed a method combining microscopic telecentric stereo measurements with digital speckle projections to achieve 3D measurements of microstructures. An experimental setup containing two identical telecentric cameras was established. An industrial DLP projection module was used to project the digital random speckle patterns and act as an illuminator. The two telecentric cameras used as image sensors were calibrated based on an improved affine model to obtain the intrinsic and extrinsic parameters. A telecentric binocular stereo reconstruction algorithm and a grayscale-based global matching method were then introduced. The measurement accuracy was firstly verified by performing 3D measurements of grid arrays at different locations and cylinder arrays with different height differences. Two Mitutoyo step masters were also used to validate the feasibility and measurement accuracy. The experimental results proved that our setup combined with the proposed method was capable of obtaining 3D information of the microstructure with a sub-pixel (maximum 1.40 µ m for cylinder arrays, 0.40 pixel size) and even sub-micron (maximum 0.42 µ m for grid arrays and 0.83 µ m for step masters) measuring accuracy in millimeter scale.
Author Contributions: Conceptualization, K.C.; Methodology, K.C., T.S. and G.L.; Software, K.C. and Q.L.; Validation, K.C., Q.L. and G.L.; Formal analysis, K.C. and G.L.; Investigation, K.C. and Q.L.; Resources, T.S., G.L. and Z.T.; Data curation, K.C.; Writing-original draft preparation, K.C.; Writing-review and editing, K.C., G.L. and Z.T.; Visualization, K.C. and G.L.; Supervision, T.S., G.L. and Z.T.; Project administration, G.L. and Z.T.; Funding acquisition, T.S. and G.L.  The error caused by the surface roughness can be determined and eliminated by an instrument which is capable of measuring surface roughness more accurately, and other errors can be determined and reduced by measuring a smoother standard surface. Because the original point cloud data were smoothed in the row direction, the error distributions in every level looked the same in the horizontal direction. These results showed that high-precision 3D measurements of microstructures could be obtained in millimeter scale.

Conclusions
In this paper, we have proposed a method combining microscopic telecentric stereo measurements with digital speckle projections to achieve 3D measurements of microstructures. An experimental setup containing two identical telecentric cameras was established. An industrial DLP projection module was used to project the digital random speckle patterns and act as an illuminator. The two telecentric cameras used as image sensors were calibrated based on an improved affine model to obtain the intrinsic and extrinsic parameters. A telecentric binocular stereo reconstruction algorithm and a grayscale-based global matching method were then introduced. The measurement accuracy was firstly verified by performing 3D measurements of grid arrays at different locations and cylinder arrays with different height differences. Two Mitutoyo step masters were also used to validate the feasibility and measurement accuracy. The experimental results proved that our setup combined with the proposed method was capable of obtaining 3D information of the microstructure with a sub-pixel (maximum 1.40 µm for cylinder arrays, 0.40 pixel size) and even sub-micron (maximum 0.42 µm for grid arrays and 0.83 µm for step masters) measuring accuracy in millimeter scale.