Next Article in Journal / Special Issue
An Efficient Closed Form Solution to the Absolute Orientation Problem for Camera with Unknown Focal Length
Previous Article in Journal
Development of a Low-Cost Open-Source Measurement System for Joint Angle Estimation
Previous Article in Special Issue
Parallel Structure from Motion for Sparse Point Cloud Generation in Large-Scale Scenes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Phase Error Analysis and Correction for Crossed-Grating Phase-Shifting Profilometry

Department of Opto-Electronics, Sichuan University, Chengdu 610065, China
*
Author to whom correspondence should be addressed.
Sensors 2021, 21(19), 6475; https://doi.org/10.3390/s21196475
Submission received: 26 August 2021 / Revised: 21 September 2021 / Accepted: 26 September 2021 / Published: 28 September 2021

Abstract

:
Crossed-grating phase-shifting profilometry (CGPSP) has great utility in three-dimensional shape measurement due to its ability to acquire horizontal and vertical phase maps in a single measurement. However, CGPSP is extremely sensitive to the non-linearity effect of a digital fringe projection system, which is not studied in depth yet. In this paper, a mathematical model is established to analyze the phase error caused by the non-linearity effect. Subsequently, two methods used to eliminate the non-linearity error are discussed in detail. To be specific, a double five-step algorithm based on the mathematical model is proposed to passively suppress the second non-linearity. Furthermore, a precoding gamma correction method based on probability distribution function is introduced to actively attenuate the non-linearity of the captured crossed fringe. The comparison results show that the active gamma correction method requires less fringe patterns and can more effectively reduce the non-linearity error compared with the passive method. Finally, employing CGPSP with gamma correction, a faster and reliable inverse pattern projection is realized with less fringe patterns.

1. Introduction

Phase shifting profilometry (PSP), with non-contact, full-field, high-resolution and high-precision advantages, is a popular three-dimensional (3D) shape measurement technique based on fringe projection [1,2,3]. PSP has found extensive applications in several fields such as industrial surface inspection, reverse engineering, and biomedical engineering [4,5,6]. In PSP, the height information of a tested object is encoded within the phase of the projected fringe patterns. The phase retrieved from the captured deformed fringe patterns by phase shifting algorithm is wrapped within the range from −π to π [7]. A phase unwrapping algorithm must be conducted to obtain a continuous phase map. Conventional phase unwrapping algorithms can be divided into two principal categories: spatial phase unwrapping [8,9,10] and temporal phase unwrapping [11,12,13]. Spatial phase unwrapping implemented on a single wrapped phase map is normally dependent on the unwrapping path. Due to the phase continuity assumption, it cannot handle surfaces with large discontinuities or separations. Temporal phase unwrapping can solve the phase ambiguity problem by using multi-wrapped phase maps, in which phase unwrapping is performed at each pixel independently.
In some applications of PSP, such as phase measurement deflectometry [14], inverse pattern projection (IPP) [15] and calibration of structured light measurement systems [16], it is desired that both horizontal and vertical phase maps of the tested object are recovered. Traditionally, in single carrier-frequency grating phase shifting profilometry (SGPSP), horizontal and vertical sinusoidal fringe patterns are separately projected on the tested object, and the deformed fringe patterns are recorded to recover the two orthogonal phases. To improve the measurement efficiency, Liu et al. [17] employed crossed-grating phase-shifting profilometry (CGPSP) to obtain the two orthogonal phases. Theoretically, in CGPSP, only five fringe patterns are required to obtain the two orthogonal phases.
However, CGPSP is extremely susceptible to the non-linear response of the digital fringe projection system. The non-linearity effect of the industrial camera can be neglected compared with that of the digital projector [1]. Therefore, the non-linearity effect of the projector, as the main error resource of the system [18,19], has been studied by many researchers. Some phase correction methods used in sinusoidal grating phase shifting profilometry and binary grating phase shifting profilometry (BGPSP) have been proposed. They are roughly divided into two categories: active correction and passive correction [20]. In the first category, the ideal sinusoidal fringe patterns are desired to be projected on the object. One solution is to find the most proper gamma value, which is pre-encoded in the projected fringe patterns to guarantee the captured fringes perfectly. For instance, Hoang et al. [21] used the least-square approach to calculate the system gamma value from the difference between the real phase value of the three-step phase-shifting algorithm and the true phase value obtained by a large-step phase-shifting method. Employing the statistical analysis, Guo et al. [22] calculated the gamma value from the normalized cumulative histogram of the captured fringe patterns with different backgrounds and modulations. Yu et al. [23] calculated the gamma value based on probability distribution function (PDF) of the retrieved wrapped phase. Another way to generate ideal fringes is the defocusing technique which acts as a low-pass filter. For instance, Baker et al. [24] derived the mathematical model of the defocusing technique. Lei et al. [25] generated ideal sinusoidal fringe patterns by defocusing binary fringe patterns. In the second category, the non-linearity error is passively corrected by a post-processing instead of projecting pro-encoded fringes. Pan et al. [19] proposed a simple iterative algorithm to reduce the phase error owing to non-sinusoidal waveforms. Zhang [7,26] established a look-up-table between the phase error and the corresponding phase value to compensate the phase error directly. Huang et al. [27] proposed a double three-step algorithm to obtain two distorted phases with opposite distortion direction and identical distortion amplitude, and averaged them to eliminate the distortion. The similar model based on the Hilbert transform was also proposed to eliminate the phase error [28]. Zheng et al. applied the above two methods to the phase error correction of BGPSP with projector defocusing [29]. In addition, a large-step phase-shifting method can be used to eliminate the non-linearity error [30]. However, methods with less fringe patterns and higher accuracy are the common goal. In CGPSP, fewer fringe patterns are required to obtain two orthogonal phases, but an elemental theoretical analysis of the non-linearity error and practical methods to eliminate the error are still not extensively studied.
To improve the accuracy and flexibility of CGPSP, a mathematical model to analyze the non-linearity error and practical methods to eliminate the phase error are studied in detail in this paper. Based on a polynomial model of the non-linear effect, the mathematical model is derived. To eliminate the non-linearity error, we study passive and active non-linear phase error correction methods, including a passive double five-step algorithm and an active gamma correction method based on PDF. The phase correction performance of the two methods is compared. Finally, a faster IPP is realized by employing CGPSP with gamma correction.
The rest of the paper is organized as follows: Section 2 introduces the principle of CGPSP, the principle of IPP based on CGPSP and the phase error analysis of CGPSP. Section 3 illustrates the principle of the double five-step algorithm and the gamma correction method based on PDF. Section 4 presents some experimental results. Section 5 concludes the paper.

2. Principle

2.1. Principle of Crossed-Grating Phase-Shifting Profilometry

The schematic of geometric optical path for the CGPSP measurement setup is shown in Figure 1, where C and P are the camera photocenter and the projector photocenter respectively, O is the intersection point of the optical axis of projector and camera, and θ is the angle between the baseline CP and the horizontal axis Xw. In order to generate the fringe deformation in both the horizontal and vertical directions, the baseline CP should have components in the horizontal and vertical directions (for example, θ is 45 degrees).
In the ideal measurement system, the deformed fringe patterns captured by the camera can be described as:
I n ( x , y ) = A ( x , y ) + B 1 ( x , y ) cos [ φ x ( x , y ) + δ n ] + B 2 ( x , y ) cos [ φ y ( x , y ) + k δ n ] ,
where n = 1, 2, …, N and N is the total number of phase shifts, (x, y) is the coordinate of an arbitrary point in the image, A(x, y) is the background intensity, B1(x, y) and φx(x, y) are the intensity modulation and the desired phase in the horizontal direction, respectively, B2(x, y) and φy(x, y) are the intensity modulation and the desired phase in the vertical direction respectively, δn = 2πn/N is the phase-shifting amount, k is an integer within the range of [2, N/2) (N/2, N − 2] and controls the phase-shifting amount in the vertical direction. Because there are five unknown variables in Equation (1), at least five images should be used to extract the phase information. For convenience, (x, y) is omitted in some complex expressions hereafter.
The measured phases in the horizontal and vertical direction can be extracted by the least-squares algorithm:
φ x w = arctan ( n = 1 N I n sin ( δ n ) n = 1 N I n cos ( δ n ) ) , φ y w = arctan ( n = 1 N I n sin ( k δ n ) n = 1 N I n cos ( k δ n ) ) .
The phases φxw and φyw are wrapped within the range of [−π, π). To recover unambiguous phases even in the presence of large discontinuities or isolated objects, simple and robust three-frequency temporal phase unwrapping (3FTPU) is carried out. For the horizontal phase unwrapping, the 3FTPU algorithm can be simply described as:
{ φ x u 1 = φ x w 1 φ x u l = φ x w l + 2 π R o u n d [ ( f l / 1 ) φ x u 1 φ x w l 2 π ] φ x u h = φ x w h + 2 π R o u n d [ ( f h / f l ) φ x u l φ x w h 2 π ] ,
where 1, fl and fh (commonly fh = fl2) are the carrier frequencies of three sets of crossed fringes, and subscripts l and h denote ‘low frequency’ and ‘high frequency’, respectively. φxw1, φxwl and φxwh denote the unwrapped phases of the single-, low- and high-frequency fringes, respectively. Round[∙] is the operation to obtain the closest integer value.
In 3FTPU based on CGPSP, three set of fringes with frequencies of 1, fl and fh in the horizontal and vertical directions are required. Theoretically, two orthogonal phase maps can be extracted from 15 captured fringe patterns. As a comparison, in traditional 3FTPU based on SGPSP [12], 18 fringe patterns are required, employing the three-step phase-shifting method. Twenty-four fringe patterns are required, employing the four-step phase-shifting method. Therefore, CGPSP normally requires fewer fringes to obtain two orthogonal phase maps compared with SGPSP.

2.2. Principle of Crossed-Grating Phase-Shifting Profilometry

IPP has been widely used in many fields such as industrial surface detection [31], and augmented reality [32]. In traditional IPP, horizontal and vertical phase-shifting fringe patterns are separately projected to obtain horizontal and vertical absolute phases which are used to establish the geometric mapping relationship between the projector pixel and the camera pixel. If the CGPSP method is used, the mapping relationship can be established with fewer fringes. Taking the generation of an inverse straight fringe pattern as an example, the flow chart as shown in Figure 2 illustrates the whole process of IPP based on CGPSP. For simplicity, the first frames of three sets of captured crossed fringe patterns are shown in Figure 2. Firstly, the horizontal and vertical absolute phases of a target object are recovered by CGPSP based on 3FTPU. With the two phases, the geometric mapping relationship between the projector pixel (l, m) and the camera pixel (x, y) can be established:
l ( x , y ) = p x φ x ( x , y ) 2 π , m ( x , y ) = p y φ y ( x , y ) 2 π ,
where φx(x, y) and φy(x, y) denote the horizontal and vertical phases respectively, px and py are the crossed fringe pitches in the horizontal and vertical directions respectively. The high accuracy of the two orthogonal phases guarantees the precision of the geometric mapping relationship in Equation (4). Based on the geometric mapping relationship and an expected pattern (straight fringe), a projected inverse pattern (deformed fringe) is generated. In the same projector-camera measurement system, after projecting the inverse pattern on the object, a non-distorted fringe pattern on the surface of the object can be collected by the camera.

2.3. Phase Error Analysis for Crossed-Grating Phase-Shifting Profilometry

In practice, considering the non-linearity effect of the measurement system, the actual captured fringe patterns In′ can be theoretically described as the gamma power of the ideal captured fringe patterns In [33].
I n = I n γ ,
where γ is the gamma value of the system and can be a non-integer value. To facilitate the analysis of the non-linear error, Equation (5) can be approximated by a polynomial function [34]:
I n = ε 0 + ε 1 I n + ε 2 ( I n ) 2 + ε 3 ( I n ) 3 + ,
where ε0, ε1, ε2, ε3 are coefficients. Substituting Equation (1) into Equation (6), the actual captured crossed fringe patterns can be calculated as
I n = a 0 + i = 1 a i cos [ i ( φ x + δ n ) ] + i = 1 b i cos [ i ( φ y + k δ n ) ] + i = 2 j = 1 i 1 e i j cos [ j ( φ x + δ n ) ] cos [ ( i j ) ( φ y + k δ n ) ] ,
where a0 is the background intensity, ai, bj and eij denote the amplitudes of horizontal and vertical harmonic components and crosstalk components, respectively. It is clear that the phase error will be introduced by horizontal and vertical high-order harmonics and crosstalk components. It has been verified that the harmonic amplitude decreases rapidly with the increasing of its frequency in SGPSP [19]. Non-linear system response makes the harmonic amplitude distribution of the captured sinusoidal fringe follow the conclusion regardless of the carrier frequency in the horizontal direction or vertical direction. Therefore, the conclusion is also valid in CGPSP. A simulation is added to confirm the conclusion in CGPSP more clearly. The spectra of the simulated crossed fringe with different gamma values 1.4, 2.4, and 3.4, as shown in Figure 3a–c respectively, illustrate the conclusion. As a comparison, the frequency spectra of a simulated vertical sinusoidal fringe and a simulated horizontal sinusoidal fringe distorted by gamma value 2.4 are shown in Figure 3d,e, respectively. Compared with the single carrier-frequency fringes, the crossed fringe has more complex spectra distribution.
When the parameter k is set to two in Equation (1), a full-cycle phase shifting within 4π is performed in the vertical direction. Setting k to 2 and substituting Equation (7) into Equation (2), we derive two wrapped phase expressions which are related to the total number of phase shifts N (N ≥ 5).
  • When N is an odd number, the wrapped phases φxw′ and φyw′ are derived as:
    φ x w = arctan { a 1 sin φ x m = 1 a m N 1 sin [ ( m N 1 ) φ x ] + m = 1 a m N + 1 sin [ ( m N + 1 ) φ x ] m = 1 b ( 2 m 1 ) N 1 2 sin [ ( 2 m 1 ) N 1 2 φ y ] a 1 cos φ x + m = 1 a m N 1 cos [ ( m N 1 ) φ x ] + m = 1 a m N + 1 cos [ ( m N + 1 ) φ x ] + m = 1 b ( 2 m 1 ) N 1 2 cos [ ( 2 m 1 ) N 1 2 φ y ] + m = 1 b ( 2 m 1 ) N + 1 2 sin [ ( 2 m 1 ) N + 1 2 φ y ] e 21 2 sin ( φ x φ y ) + F ( φ x , φ y ) + m = 1 b ( 2 m 1 ) N + 1 2 cos [ ( 2 m 1 ) N + 1 2 φ y ] + e 21 2 cos ( φ x φ y ) + G ( φ x , φ y ) } ,
    φ y w = arctan { b 1 sin φ y m = 1 b m N 1 sin [ ( m N 1 ) φ y ] + m = 1 b m N + 1 sin [ ( m N + 1 ) φ y ] + a 2 sin ( 2 φ x ) m = 1 a m N 2 sin [ ( m N 2 ) φ x ] b 1 cos φ y + m = 1 b m N 1 cos [ ( m N 1 ) φ y ] + m = 1 b m N + 1 cos [ ( m N + 1 ) φ y ] + a 2 cos ( 2 φ x ) + m = 1 a m N 2 cos [ ( m N 2 ) φ x ] + m = 1 a m N + 2 sin [ ( m N + 2 ) φ x ] + H ( φ x , φ y ) + m = 1 a m N + 2 cos [ ( m N + 2 ) φ x ] + I ( φ x , φ y ) } ,
    where m is a positive integer for describing the harmonic order. The functions F(φx, φy) and G(φx, φy) in Equation (8), and H(φx, φy) and I(φx, φy) in Equation (9) are regarded as the high-order crossed phase error. They are the summation of periodic sinusoidal and cosinusoidal harmonic functions with variables φx and φy, but their mathematical expressions are too complex to be written as explicit functions. Their magnitudes decrease with the increasing of the total number of phase shifts N. Seen from Equations (8) and (9), both φxw′ and φyw′ include periodic phase error caused by the horizontal and vertical high-order harmonics and the crosstalk components. Equation (8) shows that the horizontal phase error is introduced by the mN ± 1th horizontal harmonics, the [(2m − 1)N − 1]/2th vertical harmonics and the crossed phases −[e21sin(φxφy)]/2 + F(φx, φy) and [e21cos(φxφy)]/2 + G(φx, φy). Equation (9) shows that the vertical phase error is induced by the 2nd and mN ± 2th horizontal harmonics, the mN ± 1th vertical harmonics and the crossed phases H(φx, φy) and I(φx, φy). For instance, when N = 5 and m = 1, 2, φxw′ includes the horizontal phase error introduced by the horizontal harmonics 4, 6, 9, 11, vertical harmonics 2, 3, 7, 8, and the crossed phases −[e21sin(φxφy)]/2 + F(φx, φy)|N=5 and [e21cos(φxφy)]/2 + G(φx, φy)|N=5. φyw′ includes the vertical phase error introduced by the horizontal harmonics 2, 3, 7, 8, 12, the vertical harmonics 4, 6, 9, 11, and the crossed phases H(φx, φy)|N=5 and I(φx, φy)|N=5.
  • When N is an even number, φxw′ and φyw′ are derived as:
    φ x w = arctan { a 1 sin φ x m = 1 a m N 1 sin [ ( m N 1 ) φ x ] + m = 1 a m N + 1 sin [ ( m N + 1 ) φ x ] e 21 2 sin ( φ x φ y ) + J ( φ x , φ y ) a 1 cos φ x + m = 1 a m N 1 cos [ ( m N 1 ) φ x ] + m = 1 a m N + 1 cos [ ( m N + 1 ) φ x ] + e 21 2 cos ( φ x φ y ) + K ( φ x , φ y ) } ,
    φ y w = arctan { b 1 sin φ y m = 1 b m N 2 1 sin [ ( m N 2 1 ) φ y ] + m = 1 b m N 2 + 1 sin [ ( m N 2 + 1 ) φ y ] + a 2 sin ( 2 φ x ) m = 1 a m N 2 sin [ ( m N 2 ) φ x ] b 1 cos φ y + m = 1 b m N 2 1 cos [ ( m N 2 1 ) φ y ] + m = 1 b m N 2 + 1 cos [ ( m N 2 + 1 ) φ y ] + a 2 cos ( 2 φ x ) + m = 1 a m N 2 cos [ ( m N 2 ) φ x ] + m = 1 a m N + 2 sin [ ( m N + 2 ) φ x ] + L ( φ x , φ y ) + m = 1 a m N + 2 cos [ ( m N + 2 ) φ x ] + M ( φ x , φ y ) } ,
The four functions J(φx, φy), K(φx, φy), L(φx, φy) and M(φx, φy) are also composed of the summation of periodic sinusoidal and cosinusoidal harmonic functions with variables φx and φy. Their magnitudes decrease with the increasing of the total number of phase shifts N. Seen from Equations (10) and (11), the phase expressions are different with those in the odd condition. However, periodic phase error caused by horizontal and vertical high-order harmonics and crosstalk components still exists in the calculated phases. Equations (10) and (11) reveal that the horizontal phase error is induced by the mN ± 1th horizontal harmonics and the crossed phases −[e21sin(φxφy)]/2 + J(φx, φy) and [e21cos(φxφy)]/2 + K(φx, φy), and the vertical phase error is induced by the 2nd and mN ± 2th horizontal harmonics, the mN/2 ± 1th vertical harmonics and the crossed phases L(φx, φy) and M(φx, φy).
For clarity, a summary is given as follows:
  • There is always the crossed-phase component φxφy in the horizontal distorted phase;
  • There is always the phase error induced by the 2nd horizontal harmonic in the vertical distorted phase;
  • The crossed phase component φxφy and the 2nd horizontal harmonic in Equations (8)–(11) make the large-step phase-shifting method invalid to eliminate the non-linear error in CGPSP.
When parameter k is set to other integer within the range of [2, N/2) (N/2, N − 2], similar phase distribution can be derived, which can be summarized as below:
  • When N ≥ 2k + 1, there is always the crossed phase component (k − 1)φxφy in the horizontal distorted phase;
  • When N ≥ 2k + 1, there is always the phase error induced by the kth horizontal harmonic in the vertical distorted phase.

3. Phase Error Correction for Crossed-Grating Phase-Shifting Profilometry

The above analysis results show that the non-linearity effect in CGPSP is quite serious and complicated. Therefore, it is necessary to remove the non-linear error for the further application of CGPSP. In this section, a double five-step algorithm is presented to passively eliminate the second non-linearity. In addition, an attractive gamma correction method based on PDF [23] is discussed in detail as well.

3.1. Double Five-Step Algorithm

Referring to the double three-step algorithm [27], the double five-step algorithm is proposed to eliminate the second non-linearity effect in CGPSP which is the main component of the non-linearity effect normally. Considering the non-linearity up to the second order and setting N to 5, Equations (8) and (9) can be simplified and the corresponding unwrapped phases can be expressed as:
{ φ x u = U { arctan [ a 1 sin φ x b 2 sin 2 φ y e 21 2 sin ( φ x φ y ) a 1 cos φ x + b 2 cos 2 φ y + e 21 2 cos ( φ x φ y ) ] } φ y u = U { arctan [ b 1 sin φ y + a 2 sin 2 φ x e 21 2 sin ( φ x + φ y ) b 1 cos φ y + a 2 cos 2 φ x + e 21 2 cos ( φ x + φ y ) ] } ,
where U{∙} is the operation to unwrap the wrapped phase. The phase error in the two directions can be derived as follows:
{ Δ φ x u = φ x u φ x = U { arctan [ b 2 sin ( 2 φ y + φ x ) e 21 2 sin ( 2 φ x φ y ) a 1 + b 2 cos ( 2 φ y + φ x ) + e 21 2 cos ( 2 φ x φ y ) ] } Δ φ y u = φ y u φ y = U { arctan [ a 2 sin ( 2 φ x φ y ) e 21 2 sin ( 2 φ y + φ x ) b 1 + a 2 cos ( 2 φ x φ y ) + e 21 2 cos ( 2 φ y + φ x ) ] } ,
where φx and φy are the ideal phases. In practice, a1 is much larger than b2 and e21/2, and b1 is much larger than a2 and e21/2. Equation (13) can be simplified as:
{ Δ φ x u U { arctan [ b 2 sin ( 2 φ y + φ x ) e 21 2 sin ( 2 φ x φ y ) a 1 ] } Δ φ y u U { arctan [ a 2 sin ( 2 φ x φ y ) e 21 2 sin ( 2 φ y + φ x ) b 1 ] } .
If an extra phase offset of π is introduced into the ideal fringes, two extra measured phases φxu″ and φyu″ can be obtained and the corresponding phase errors can be derived as:
{ Δ φ x u U { arctan [ b 2 sin ( 2 φ y + φ x ) e 21 2 sin ( 2 φ x φ y ) a 1 ] } Δ φ y u U { arctan [ a 2 sin ( 2 φ x φ y ) e 21 2 sin ( 2 φ y + φ x ) b 1 ] } .
It is obvious that ∆φxu= −∆φxu″ and ∆φyu= −∆φyu″. Therefore, the second non-linearity can be eliminated by averaging the two sets of measured phases:
φ x = φ x u + φ x u π 2 , φ y = φ y u + φ y u π 2 .
To clearly explain the process of retrieving the absolute phases of 3FTPU based on double five-step algorithm, Figure 4 shows the flowchart of calculating the horizontal absolute phase, in which 1, fl and fh are the carrier frequencies of three sets of crossed fringes, respectively. Subscripts w and u denote ‘wrapped phase’ and ‘unwrapped phase’, respectively. SPU denote the spatial phase unwrapping operation. Three steps are used to describe the procedure of calculating the horizontal phase:
  • Step 1: Two unwrapped phases φxw1′ and φxw1″ with non-linearity error are obtained from the single-frequency crossed fringes with and without the initial phase offset of π, respectively. Then, an unwrapped phase φx1 eliminated the second non-linearity error obtained by the double five-step algorithm.
  • Step 2: Two wrapped phases φxwl′ and φxwl″ are firstly obtained from the low-frequency (fl) crossed fringes with and without the initial phase offset of π, respectively. Then, combining the unwrapped phase φx1 obtained in Step 1, the two wrapped phases are unwrapped to obtain φxul′ and φxul″, respectively. Finally, an unwrapped phase φxl without the second non-linearity error can be obtained by the double five-step algorithm.
  • Step 3: Similarly, two wrapped phases φxwh′ and φxwh″ respectively obtained from high-frequency (fh) crossed fringes with and without the initial phase offset of π are unwrapped to obtain φxuh′ and φxuh″, employing the unwrapped phase φxl obtained in Step 2. The final corrected phase φxh can be obtained by the double five-step algorithm.
A similar procedure can be performed to obtain the vertical phase from the crossed fringes.
A simulation is conducted to investigate the performance of the double five-step algorithm. The size of the simulated fringe patterns is 512 × 512 pixels. Three sets of fringes with the number of fringe periods of 1, 8 and 64 are used in 3FTPU. The gamma value of the system is set as 2.4, which leads to obvious 2nd and 3rd non-linearity. The simulated phase error of the double five-step algorithm, the five-step CGPSP method and the traditional five-step SGPSP method are compared. The 400th row of the horizontal phase errors and the 114th column of the vertical phase errors are shown in Figure 5a,c, respectively. For clarity, Figure 5b,d show the zoomed results of area A in Figure 5a and area B in Figure 5c, respectively. The STD values of the phase errors and the number of fringe patterns are given in Table 1. As shown in Figure 5a,c, abnormal phase jump errors emerge in five-step CGPSP because the non-linearity errors in the wrapped phases lead to fringe order errors in phase unwrapping. The double five-step algorithm effectively improves the phase accuracy by eliminating the second non-linearity. The five-step SGPSP performs better than the double five-step algorithm because it eliminates the second and third non-linearity. Anyway, the double five-step CGPSP provides a convenient way to eliminate second non-linearity in the measurement system where the physical crossed grating is designed to produce the structured fringe. If only the second non-linearity is included in the crossed fringe patterns, the accuracy of five-step CGPSP is as same as that of five-step SGPSP.

3.2. Gamma Correction Method Based on Probability Distribution Function

The non-linearity error in CGPSP is so complicated that it is difficult to passively eliminate all the high-order harmonics and the crosstalk components. An active correction method, the gamma correction method based on PDF [23], is used to eliminate the phase error in CGPSP.
Theoretically, if an appropriate value γp which nearly equals 1/γ is found to preprocess the projected fringes, the non-linearity of the system can be eliminated. The captured crossed fringes can be rewritten as:
I n = I n γ / γ p .
The gamma correction method based on PDF [23] can be used to calculate the pre-encoded value γp. In practice, considering the defocusing effect of the digital projector with a large aperture, Equation (17) is rewritten as [23]:
I n = C 1 I n γ a / γ p + γ b + C 2 ,
where C1, C2, γa and γb are system parameters. By projecting two sets of vertical sinusoidal fringe patterns with different pre-encoded gamma values, γa and γb can be calculated based on the PDF method. Then, setting γa/γp + γb = 1, the desired pre-encoded value γp can be obtained.
Theoretically, the pre-encoded value γp reflects the non-linearity of the system and can be calculated from either the captured horizontal or vertical sinusoidal fringe patterns. For instance, using the experimental setup as shown in Figure 6 and projecting the horizontal and vertical sinusoidal fringe patterns, we calculated two sets of pre-encoded values in different measurement conditions (e.g., the projector and camera were adjusted slightly). The results, as shown in Table 2, indicate that the two pre-encoded values in each case are close, which coincides with the theoretical analysis.

4. Experiments and Discussion

The experimental setup is shown in Figure 6, including a DLP projector with the resolution of 1280 × 800 (GVD PDC03), a CCD camera with the resolution of 1280 × 1024 (IDS UI-124xSE-M), a plate white board and some tested objects. To generate fringe deformation in both horizontal and vertical directions, the baseline of the projector and the camera has components in the horizontal and vertical direction of the board. The 3FTPU algorithm is used in the experiment; 1, 8 and 64 are selected as the number of fringe period of the single-frequency, low-frequency and high-frequency crossed fringes, respectively.

4.1. Phase Calculation of Crossed-Grating Phase-Shifting Profilometry

First, the accuracy of the double five-step algorithm and the gamma correction method were compared by measuring the flat white board. Traditional 16-step SGPSP were used to obtain the ideal horizontal and vertical phases of the white board. The phase error was obtained by subtracting the measured phase from the ideal phase in each direction. The fringe patterns and their spectra are shown in Figure 7. Figure 7a shows a captured crossed fringe pattern. Figure 7b shows a captured crossed fringe pattern with an initial phase offset of π. Figure 7c is a captured crossed fringe with gamma correction and Figure 7d is a vertical sinusoidal fringe. Figure 7e–h show the corresponding frequency spectra of the above four fringe patterns. There are obvious second harmonic and crosstalk components in Figure 7e,f, while these harmonics are eliminated by the gamma correction method, as shown in Figure 7g. The captured vertical sinusoidal fringe pattern only contains obvious second harmonic besides the direct component and the fundamental component, as shown in Figure 7h.
Taking the horizontal phase as example, Figure 8a–d show the phase error maps obtained by five-step CGPSP, the double-five algorithm, five-step CGPSP with gamma correction and five-step SGPSP, respectively. For clarity, a section of the 300th row of the horizontal phase errors and a section of the 456th column of the vertical phase errors are shown in Figure 8e,f, respectively. Apparently, there are serious phase jump errors caused by the fringe order errors in five-step CGPSP. The double five-step algorithm apparently reduces the non-linearity error. The phase error of the gamma correction method is less than that of the double five-step algorithm, and the phase error of the five-step SGPSP is smallest. The quantitative comparison results are listed in Table 3. The results of the double five-step algorithm and the five-step SGPSP method coincide with their simulation results. The gamma correction method performs better than the double five-step algorithm. In addition, the error of the gamma correction method is bigger than that of the five-step SGPSP method, because there are more low-intensity areas in the crossed fringe pattern compared with the single carrier-frequency fringe, which decreases the signal-to-noise ratio. However, the error is acceptable and fewer fringe patterns are required in the gamma correction method.
In the second experiment, a couple of isolated surfaces were measured. The results are shown in Figure 9, where the first, second and third rows correspond to the measurement results of five-step CGPSP, the double five-step algorithm and five-step CGPSP with gamma correction, respectively. The captured high-frequency crossed fringe patterns, the horizontal and vertical phases of the three methods are shown in the first, second and third columns of Figure 9, respectively. The phases retrieved by five-step CGPSP are distorted seriously by the non-linearity effect, as shown in Figure 9b,c. The double five-step CGPSP effectively attenuates the non-linearity error, but there is still the residue phase error in the surfaces as shown in Figure 9e,f. Because the method only eliminates the second non-linearity. Figure 9h,i show that the gamma correction method almost removes the non-linearity error.
The experiments indicate that CGPSP with gamma correction can more effectively eliminate the non-linearity error and requires less fringes compared with the double five-step algorithm. However, the double five-step algorithm can provide convenience to eliminate the non-linear error in the case of using the physical grating to generate the crossed fringe pattern.

4.2. Inverse Pattern Projection Based on CGPSP

The five-step CGPSP method with gamma correction is applied in the IPP technique. A gourd model shown in Figure 10a was measured. Three captured crossed fringe patterns with the number of fringe periods of 1, 8 and 64 are shown in Figure 10a–c, respectively. We defined an expected straight fringe pattern and a character pattern which could be ‘seen’ by the CCD camera, as shown in Figure 10d,g. Two corresponding inverse patterns were generated by the IPP technique, as shown in Figure 10e,h. The resulting images captured by the CCD camera are shown in Figure 10f,i. The results verify that the geometric mapping relationship between the projector pixel and the camera pixel are correctly established by IPP based on CGPSP with fewer fringes.
An application of IPP based on CGPSP with gamma correction was carried out to show the encoded two-dimensional (2D) pattern on the 3D object, as an augmented reality display. A 3LCD projector (Epson CB-X29) was used to project the crossed fringe patterns and the inverse patterns. The height distribution of the gourd model was firstly obtained employing the phase-to-height mapping technique [35]. Then, with the height information and the geometric mapping relationship established in advance, a contour-line inverse pattern and a color-coding inverse pattern were generated. Finally, the inverse patterns were projected on the gourd model. The resulting images captured by a camera are shown in Figure 11a,b, respectively. Another two inverse patterns of the designed color images were also generated and projected on the object. The captured images are shown in Figure 11c,d. These encoded 2D patterns fit well on the 3D model, which enhances our visual experience.

5. Conclusions

In this paper, research to improve the accuracy and flexibility of CGPSP has been conducted. A mathematical model was firstly derived to analyze the non-linearity error in the measured phases obtained by the CGPSP method. Then, the double five-step algorithm and the gamma correction method based on PDF were introduced to eliminate the non-linearity error. The double five-step algorithm proposed on the basis of the mathematical model can passively eliminate the second non-linearity error, while the gamma correction method can actively remove the high-order harmonics more effectively and requires fewer projected patterns. Therefore, CGPSP with the gamma correction method is recommended in practical applications. Finally, we applied the CGPSP method with gamma correction to the IPP technique, and the augmented reality display was realized. The experiment results demonstrate the CGPSP method with gamma correction is reliable and practical. The quantitative analysis of the geometric mapping accuracy between the projector pixel and camera pixel is not the main work of this manuscript. In the future work, we will research this problem.

Author Contributions

F.L.: conceptualization, methodology, investigation, data curation, writing—original draft preparation; W.C.: conceptualization, methodology, writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Natural Science Foundation of China (Grant No. 62075143 and Grant No. U20A20215) and National Key Scientific Apparatus Development Project of China (Grant No. 2013YQ490879).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zuo, C.; Feng, S.; Huang, L.; Tao, T.; Yin, W.; Chen, Q. Phase shifting algorithms for fringe projection profilometry: A review. Opt. Lasers Eng. 2018, 109, 23–59. [Google Scholar] [CrossRef]
  2. Srinivasan, V.; Liu, H.; Halioua, M. Automated phase-measuring profilometry of 3-D diffuse objects. Appl. Opt. 1984, 23, 3105–3108. [Google Scholar] [CrossRef] [PubMed]
  3. Gorthi, S.; Rastogi, P. Fringe projection techniques: Whither we are? Opt. Lasers Eng. 2010, 48, 133–140. [Google Scholar] [CrossRef] [Green Version]
  4. Kang, S.; Ume, I. Dynamic digital fringe projection technique for measuring the warpage of unpainted PBGA packages and boards. Int. J. Adv. Manuf. Technol. 2018, 96, 3235–3249. [Google Scholar] [CrossRef]
  5. Kim, S.; Choi, Y.; Oh, J. Reverse engineering: High speed digitization of free-form surfaces by phase-shifting grating projection moiré topography. Int. J. Mach. Tools Manuf. 1999, 39, 389–401. [Google Scholar] [CrossRef]
  6. Ford, K.; Myer, G.; Hewett, T. Reliability of landing 3D motion analysis: Implications for longitudinal analyses. Med. Sci. Sports Exerc. 2007, 39, 2021–2028. [Google Scholar] [CrossRef] [PubMed]
  7. Zhang, S.; Yau, S. Generic nonsinusoidal phase error correction for tree-dimensional shape measurement using a digital video projector. Appl. Opt. 2007, 46, 36–43. [Google Scholar] [CrossRef]
  8. Li, S.; Chen, W.; Su, X. Quality-guided phase unwrapping technique: Comparison of quality maps and guiding strategies. Appl. Opt. 2011, 50, 6214–6224. [Google Scholar]
  9. Zhang, Q.; Han, Y.; Wu, Y. Comparison and combination of three spatial phase unwrapping algorithms. Opt. Rev. 2019, 26, 380–390. [Google Scholar] [CrossRef]
  10. Flynn, T. Two-dimensional phase unwrapping with minimum weighted discontinuity. J. Opt. Soc. Am. A 1997, 14, 2692–2701. [Google Scholar] [CrossRef]
  11. Zuo, C.; Huang, L.; Zhang, M.; Chen, Q.; Asundi, A. Temporal phase unwrapping algorithms for fringe projection profilometry: A comparative review. Opt. Lasers Eng. 2016, 85, 84–103. [Google Scholar] [CrossRef]
  12. Huntley, J.; Saldner, H. Temporal phase-unwrapping algorithm for automated interferogram analysis. Appl. Opt. 1993, 32, 3047–3052. [Google Scholar] [CrossRef]
  13. Gushov, V.; Solodkin, Y. Automatic processing of fringe patterns in integer interferometers. Opt. Lasers Eng. 1991, 14, 311–324. [Google Scholar] [CrossRef]
  14. Huang, L.; Idir, M.; Zuo, C.; Asundi, A. Review of phase measurement deflectometry. Opt. Lasers Eng. 2018, 107, 247–257. [Google Scholar] [CrossRef]
  15. Li, W.; Bothe, T.; Osten, W.; Kalms, M. Object adapted pattern projection—Part I: Generation of inverse patterns. Opt. Lasers Eng. 2004, 41, 31–50. [Google Scholar] [CrossRef]
  16. Feng, S.; Zuo, C.; Zhang, L.; Tao, T.; Hu, Y.; Yin, W.; Qian, J.; Chen, Q. Calibration of fringe projection profilometry: A comparative review. Opt. Lasers Eng. 2021, 143, 106622. [Google Scholar] [CrossRef]
  17. Liu, Y.; Olesch, E.; Yang, Z.; Hausler, G.; Su, X. A novel one-dimensional phase-shift technique by using crossed fringe for phase measuring deflectometry. Proc. SPIE 2019, 9302, 93020X. [Google Scholar]
  18. Kamagara, A.; Wang, X.; Li, S. Nonlinear gamma correction via normed bicoherence minimization in optical fringe projection metrology. Opt. Eng. 2018, 57, 034107. [Google Scholar] [CrossRef]
  19. Pan, B.; Qian, K.; Huang, L.; Asundi, A. Phase error analysis and compensation for nonsinusoidal waveforms in phase-shifting digital fringe projection profilometry. Opt. Lett. 2009, 34, 416–418. [Google Scholar] [CrossRef]
  20. Zhang, S. Comparative study on passive and active projector nonlinear gamma calibration. Appl. Opt. 2015, 54, 3834–3841. [Google Scholar] [CrossRef]
  21. Hoang, T.; Pan, B.; Nguyen, D.; Wang, Z. Generic gamma correction for accuracy enhancement in fringe-projection profilometry. Opt. Lett. 2010, 35, 1992–1994. [Google Scholar] [CrossRef] [PubMed]
  22. Guo, H.; He, H.; Chen, M. Gamma correction for digital fringe projection profilometry. Appl. Opt. 2004, 43, 2906–2914. [Google Scholar] [CrossRef] [PubMed]
  23. Yu, X.; Liu, Y.; Liu, N.; Fan, M.; Su, X. Flexible gamma calculation algorithm based on probability distribution function in digital fringe projection system. Opt. Express 2019, 27, 32047–32057. [Google Scholar] [CrossRef] [PubMed]
  24. Baker, M.; Xi, J.; Chicharo, J. Elimination of gamma non-linear luminance effects for digital video projection phase measuring profilometers. In Proceedings of the 4th IEEE International Symposium on Electronic Design, Test and Applications, Hong Kong, China, 23–25 January 2008; pp. 496–501. [Google Scholar]
  25. Lei, S.; Zhang, S. Flexible 3-D shape measurement using projector defocusing. Opt. Lett. 2009, 34, 3080–3082. [Google Scholar] [CrossRef] [PubMed]
  26. Zhang, S.; Huang, P. Phase error compensation for a 3-D shape measurement system based on the phase-shifting method. Opt. Eng. 2007, 46, 063601. [Google Scholar]
  27. Huang, P.; Hu, Q.; Chiang, F. Double three-step phase-shifting algorithm. Appl. Opt. 2002, 41, 4503–4509. [Google Scholar] [CrossRef]
  28. Cai, Z.; Liu, X.; Jiang, H.; He, D.; Peng, X.; Huang, S.; Zhang, Z. Flexible phase error compensation based on Hilbert transform in phase shifting profilometry. Opt. Express. 2015, 23, 25171–25181. [Google Scholar] [CrossRef]
  29. Zheng, D.; Da, F.; Qian, K.; Seah, H. Phase error analysis and compensation for phase shifting profilometry with projector defocusing. Appl. Opt. 2019, 55, 5721–5728. [Google Scholar] [CrossRef]
  30. Wang, Z.; Nguyen, D.; Barnes, J. Some practical considerations in fringe projection profilometry. Opt. Lasers Eng. 2010, 48, 218–225. [Google Scholar] [CrossRef]
  31. Li, W.; Bothe, T.; Kalms, M.; Kopylow, C.; Juptner, W. Applications for inverse pattern projection. Proc. SPIE 2003, 5144, 492–503. [Google Scholar]
  32. Bothe, T.; Gesierich, A.; Li, W.; Kopylow, C.; Kopp, N.; Juptner, W. 3D-camera for scene capturing and augmented reality applications. In Proceedings of the 3DTV Conference, Kos, Greece, 7–9 May 2007; pp. 1–4. [Google Scholar]
  33. Liu, K.; Wang, Y.; Lau, D.; Hao, Q.; Hassebrook, L. Gamma model and its analysis for phase measuring profilometry. J. Opt. Soc. Am. A 2010, 27, 553–562. [Google Scholar] [CrossRef] [PubMed]
  34. Huang, P.; Zhang, C.; Chiang, F. High-speed 3-D shape measurement based on digital fringe projection. Opt. Eng. 2002, 4, 163–168. [Google Scholar] [CrossRef]
  35. Zhao, W.; Su, X.; Chen, W. Discussion on accurate phase-height mapping in fringe projection profilometry. Opt. Eng. 2017, 56, 104109. [Google Scholar] [CrossRef]
Figure 1. Schematic of geometric optical path for crossed-grating phase-shifting profilometry (CGPSP) measurement setup.
Figure 1. Schematic of geometric optical path for crossed-grating phase-shifting profilometry (CGPSP) measurement setup.
Sensors 21 06475 g001
Figure 2. Schematic diagram of inverse pattern projection (IPP) based on CGPSP.
Figure 2. Schematic diagram of inverse pattern projection (IPP) based on CGPSP.
Sensors 21 06475 g002
Figure 3. Frequency spectra of three simulated fringes with gamma distortion: (ac) frequency spectra of crossed fringe with gamma value 1.4, 2.4 and 3.4, respectively; (d) frequency spectrum of vertical sinusoidal fringe with gamma value 2.4; (e) frequency spectrum of horizontal sinusoidal fringe with gamma value 2.4.
Figure 3. Frequency spectra of three simulated fringes with gamma distortion: (ac) frequency spectra of crossed fringe with gamma value 1.4, 2.4 and 3.4, respectively; (d) frequency spectrum of vertical sinusoidal fringe with gamma value 2.4; (e) frequency spectrum of horizontal sinusoidal fringe with gamma value 2.4.
Sensors 21 06475 g003
Figure 4. Combination flowchart of the double five-step algorithm and the three-frequency temporal phase unwrapping (3FTPU) algorithm.
Figure 4. Combination flowchart of the double five-step algorithm and the three-frequency temporal phase unwrapping (3FTPU) algorithm.
Sensors 21 06475 g004
Figure 5. Phase error distribution of five-step CGPSP, the double five-step algorithm and five-step SGPSP: (a) the horizontal phase error; (b) zoomed view of area A in (a); (c) the vertical phase error; (d) zoomed view of area B in (c).
Figure 5. Phase error distribution of five-step CGPSP, the double five-step algorithm and five-step SGPSP: (a) the horizontal phase error; (b) zoomed view of area A in (a); (c) the vertical phase error; (d) zoomed view of area B in (c).
Sensors 21 06475 g005
Figure 6. Experimental setup.
Figure 6. Experimental setup.
Sensors 21 06475 g006
Figure 7. Captured fringe patterns and their frequency spectra: (a,e) crossed fringe; (b,f) crossed fringe with an initial phase offset of π; (c,g) crossed fringe with gamma correction; (d,h) vertical sinusoidal fringe.
Figure 7. Captured fringe patterns and their frequency spectra: (a,e) crossed fringe; (b,f) crossed fringe with an initial phase offset of π; (c,g) crossed fringe with gamma correction; (d,h) vertical sinusoidal fringe.
Sensors 21 06475 g007
Figure 8. The phase error distributions of four methods: (a) horizontal phase error of five-step CGPSP; (b) horizontal phase error of the double five-step algorithm; (c) horizontal phase error of five-step CGPSP with gamma correction; (d) horizontal phase error of five-step SGPSP; (e) a section of the 300th row of the horizontal phase errors; (f) a section of the 456th column of the vertical phase errors.
Figure 8. The phase error distributions of four methods: (a) horizontal phase error of five-step CGPSP; (b) horizontal phase error of the double five-step algorithm; (c) horizontal phase error of five-step CGPSP with gamma correction; (d) horizontal phase error of five-step SGPSP; (e) a section of the 300th row of the horizontal phase errors; (f) a section of the 456th column of the vertical phase errors.
Sensors 21 06475 g008
Figure 9. Measurement results of three methods: (ac) results of the five-step CGPSP; (df) results of the double five-step algorithm; (gi) results of the five-step CGPSP with gamma correction. (Unit of phase: radians).
Figure 9. Measurement results of three methods: (ac) results of the five-step CGPSP; (df) results of the double five-step algorithm; (gi) results of the five-step CGPSP with gamma correction. (Unit of phase: radians).
Sensors 21 06475 g009
Figure 10. Measurement results of IPP based on CGPSP: (ac) deformed crossed fringes with the number of fringe period of 1, 8, 64; (d) defined straight fringe pattern; (e) projected inverse fringe pattern; (f) captured pattern after projecting (e); (g) defined character pattern; (h) projected inverse character pattern; (i) captured pattern after projecting (g).
Figure 10. Measurement results of IPP based on CGPSP: (ac) deformed crossed fringes with the number of fringe period of 1, 8, 64; (d) defined straight fringe pattern; (e) projected inverse fringe pattern; (f) captured pattern after projecting (e); (g) defined character pattern; (h) projected inverse character pattern; (i) captured pattern after projecting (g).
Sensors 21 06475 g010
Figure 11. Three-dimensional display results of four encoding methods. (a) 3D display of the contour encoding. (b) 3D display of the color encoding. (c,d) 3D display of the designed color pattern encoding.
Figure 11. Three-dimensional display results of four encoding methods. (a) 3D display of the contour encoding. (b) 3D display of the color encoding. (c,d) 3D display of the designed color pattern encoding.
Sensors 21 06475 g011
Table 1. Quantitative comparison of three methods when gamma value is 2.4.
Table 1. Quantitative comparison of three methods when gamma value is 2.4.
MethodSTD of the Horizontal
Phase Errors (rad)
STD of the Vertical
Phase Errors (rad)
Five-step CGPSP19.55719.557
Double five-step algorithm0.0460.046
Five-step SGPSP0.0020.002
Table 2. Pre-encoded values calculated from horizontal and vertical sinusoidal fringes.
Table 2. Pre-encoded values calculated from horizontal and vertical sinusoidal fringes.
CasePre-Encoded Values γp
Horizontal Sinusoidal FringeVertical Sinusoidal Fringe
11.7011.698
21.6971.689
31.6801.673
Table 3. Quantitative comparison of measurement results by four methods.
Table 3. Quantitative comparison of measurement results by four methods.
MethodSTD of the Horizontal
Phase Errors (rad)
STD of the Vertical
Phase Errors (rad)
Number of Fringe Patterns
Five-step CGPSP12.97411.71115
Double five-step algorithm0.0350.03730
Gamma correction0.0260.02915
Five-step SGPSP0.0120.01530
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Li, F.; Chen, W. Phase Error Analysis and Correction for Crossed-Grating Phase-Shifting Profilometry. Sensors 2021, 21, 6475. https://doi.org/10.3390/s21196475

AMA Style

Li F, Chen W. Phase Error Analysis and Correction for Crossed-Grating Phase-Shifting Profilometry. Sensors. 2021; 21(19):6475. https://doi.org/10.3390/s21196475

Chicago/Turabian Style

Li, Fuqian, and Wenjing Chen. 2021. "Phase Error Analysis and Correction for Crossed-Grating Phase-Shifting Profilometry" Sensors 21, no. 19: 6475. https://doi.org/10.3390/s21196475

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop