## 1.

## Introduction

Fringe projection profilometry (FPP) using a digital video projector is one of the most common and effective techniques in fast three-dimesnional (3-D) shape measurement for its low cost, high reliability, high accuracy, and fast speed. It has been widely used in many fields, including biomedical applications,^{1} human body shape measurement,^{2} reverse engineering,^{3} and quality control.^{4} For phase-shifting methods, a series of sinusoidal fringe patterns generated by the computer are projected on to the object and captured by the camera. Then, the phase distribution that contains the object’s height information is calculated by analysis of the images. Thus, the object shape is reconstructed through phase unwrapping and system calibration.^{5}

However, the commercial projector device used in an FPP system is manufactured to be nonlinear for a better visual effect. The nonlinearity of the projector deforms the ideal sinusoidal fringe patterns to be nonsinusoidal and introduces phase error. This phase error is one dominant error source of measurement because the phase-shift error does not exist because of the digital fringe pattern generation nature.^{6} For accurate measurement, this kind of phase error is not desirable. Recently, many research efforts have been focused on mitigating the nonsinusoidal phase error to obtain better measurement accuracy. Huang et al. proposed a double three-step phase-shifting algorithm and the error level has been reduced to less than half.^{7} Pan et al. presented an iterative method and simplified phase error to one order.^{8} Guo et al. have proposed a gamma-correction technique on the basis of statistical analysis of the fringe images. This technique allows one to estimate the value of gamma from the normalized cumulative histogram.^{9} However, their phase-error models are too simple to represent the actual gamma effect. Zhang and Yau utilized a look-up-table to alleviate the phase error.^{6} Liu et al. developed a method based on their model of the harmonic coefficients of the gamma value.^{10} The method works well for their purpose. However, it is time consuming to calibrate the gamma value. Besides of the gamma nonlinearity, system vibration and noise are nonnegligible. As the system vibration and noise exist, the captured images have a grayscale deflection from the true value and this will introduce a significant error to the result. In this paper, a method is proposed to reduce the phase error considering the system vibration, noise, and gamma nonlinearity. In this method, four-step phase-shifting is done four times with an initial phase offset of 22.5 deg and four phase maps are averaged to reduce the phase error introduced by the gamma nonlinearity. Every phase-shifting image is replaced by the average of multiple fringe images captured continuously at the same state to eliminate the phase error caused by system vibration and noise. Experimental results show that this method can effectively eliminate the measurement error.

In Sec. 2 a detailed phase error analysis is performed. The proposed phase error elimination method is discussed in Sec. 3. Section 4 shows the experimental results, and the conclusions are given in Sec. 5.

## 2.

## Phase Error Analysis

## 2.1.

### System Vibration and Noise

In the phase-shifting method, a series of phase-shifted fringe images are used to calculate the phase. However, the grayscale of the captured images deviate from the true value because of the system vibration and noise. For example, if we capture two fringe images of one object with a time interval of 0.5 s. Due to system vibration and noise, these two images are not exactly the same. Figure 1(a) shows the grayscale difference between them and the histogram is plotted in Fig. 1(b) The maximum value of the grayscale difference is 20. It is obvious that both these two captured images could not represent the real situation. As a consequence, phase error will occur in the next phase-shifting calculation using these images.

## 2.2.

### Gamma Nonlinearity

Typically, the ideal intensity of a projected fringe pattern, regardless of the gamma nonlinearity, is expressed as

where ${A}^{p}$ is the background intensity, ${B}^{p}$ is the intensity modulation, ${\varphi}^{p}=2\pi fx$ is the user defined phase for each pixel, $f$ is the fringe frequency, ${\delta}_{n}=2\pi n/N$ represents the phase-shift value, $n$ is the index, and $N$ is the number of phase-shifted patterns. Without considering gamma, the intensity of the captured image could be expressed asThe desired phase information can be solved according to Eq. (2)

## (3)

$$\varphi =\mathrm{arctan}\text{\hspace{0.17em}}\frac{\sum _{n=0}^{N-1}{I}_{n}^{c}\text{\hspace{0.17em}}\mathrm{sin}({\delta}_{n})}{\sum _{n=0}^{N-1}{I}_{n}^{c}\text{\hspace{0.17em}}\mathrm{cos}({\delta}_{n})}.$$Then, the 3-D coordinates of the object can be derived through triangulation with the projector.^{11}12.^{–}^{13}

If there exists gamma distortion in the FPP system, the intensity of the captured image will be nonsinusoidal, and the computation for $\varphi $ will not be accurate using Eq. (3). Figures 2 and 3 show the simulation results.

The intensity of the captured nonsinusoidal fringe pattern could be expressed as

## (4)

$${I}_{n,c}^{\gamma}=\alpha {[M+N\text{\hspace{0.17em}}\mathrm{cos}(\varphi +{\delta}_{n})]}^{\gamma},$$## (5)

$${I}_{n,c}^{\gamma}=\alpha {M}^{\gamma}{[1+p\text{\hspace{0.17em}}\mathrm{cos}(\varphi +{\delta}_{n})]}^{\gamma},$$## (6)

$${I}_{n,c}^{\gamma}=\alpha {M}^{\gamma}\sum _{m=0}^{\infty}\left[\right(\begin{array}{c}\gamma \\ m\end{array}){p}^{m}\text{\hspace{0.17em}}{\mathrm{cos}}^{m}(\varphi +{\delta}_{n})].$$According to the cosine power equations, Eq. (6) can be expressed as

## (7)

$${I}_{n,c}^{\gamma}=A+\sum _{k=1}^{\infty}{B}_{k}\text{\hspace{0.17em}}\mathrm{cos}[k(\varphi +{\delta}_{n})],$$## (8)

$${B}_{k}=2{M}^{\gamma}\sum _{m=0}^{\infty}{b}_{k,m},\phantom{\rule[-0.0ex]{2em}{0.0ex}}A=0.5{B}_{0}.$$In addition,

## (9)

$${b}_{k,m}={(0.5p)}^{2\text{\hspace{0.17em}}\text{\hspace{0.17em}}m+k}\left(\begin{array}{c}\gamma \\ 2\text{\hspace{0.17em}}\text{\hspace{0.17em}}m+k\end{array}\right)\left(\begin{array}{c}2\text{\hspace{0.17em}}\text{\hspace{0.17em}}m+k\\ m\end{array}\right),$$To accurately analyze the phase error, the harmonic waves up to the eighth-order are considered ($k=8$), because the components of the harmonic waves higher than eighth-order are small enough and can be ignored. For the four-step phase-shifting method ($n=1-4$), the phase error can be derived from Eq. (7) as^{14}

## (10)

$$\mathrm{\Delta}\varphi =-\mathrm{arctan}\text{\hspace{0.17em}}\frac{q\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}4\varphi -r\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}4\varphi +s\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8\varphi}{1+q\text{\hspace{0.17em}}\mathrm{cos}\text{\hspace{0.17em}}4\varphi +r\text{\hspace{0.17em}}\mathrm{cos}\text{\hspace{0.17em}}4\varphi +s\text{\hspace{0.17em}}\mathrm{cos}\text{\hspace{0.17em}}8\varphi},$$## (11)

$$\mathrm{\Delta}\varphi \approx (-q+r+rs)\mathrm{sin}\text{\hspace{0.17em}}4\varphi +(\frac{{q}^{2}}{2}-\frac{{r}^{2}}{2}-s)\mathrm{sin}\text{\hspace{0.17em}}8\varphi \phantom{\rule{0ex}{0ex}}+qs\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}12\varphi +\frac{{s}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}16\varphi .$$Since $r\ll q$, $s\ll q$, $r$ and $s$ can be ignored. Equation (11) is simplified as

## (12)

$$\mathrm{\Delta}\varphi \approx -q\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}4\varphi +\frac{{q}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8\varphi .$$We note that the phase error is determined by the phase and the ratio $q$.

## 3.

## Phase Error Elimination Method

Based on the analysis in Sec. 2, it is easily found that the phase error consists of two parts. One is the system vibration and noise, and the other is the gamma nonlinearity. These two factors are independent of each other.

## 3.1.

### For System Vibration and Noise

The phase error introduced by the system vibration and noise can be reduced significantly by replacing every phase-shifting image of the average of multiple images captured continuously at the same state. Figure 4 shows the relationship between the max grayscale deflection (MGD) and the number of images (N) averaged. The max grayscale deflection tapers off with an increase in the of number of averaged images. When $N\ge 20$, the MGD is less than 5. That means that the average of 20 images is enough to represent the real situation.

## 3.2.

### For Gamma Nonlinearity

From the above phase error analysis in Sec. 2.2, we developed a novel algorithm for reducing the phase error introduced by gamma nonlinearity. From Eq. (12), we know that the phase error is determined by the phase $\varphi $ and the parameter $q$. If we introduce an initial phase offset into the phase-shifted fringe patterns, the phase error will vary correspondingly. If we introduce three phase maps with initial phase offsets of 22.5, 45, $-25\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg}$, the phase error becomes

## (13)

$$\mathrm{\Delta}{\varphi}^{\prime}=\mathrm{\Delta}(\varphi +22.5\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})\phantom{\rule{0ex}{0ex}}=-q\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}4(\varphi +22.5\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})+\frac{{q}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8(\varphi +22.5\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})\phantom{\rule{0ex}{0ex}}=-q\text{\hspace{0.17em}}\mathrm{cos}\text{\hspace{0.17em}}4\varphi -\frac{{q}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8\varphi ,$$## (14)

$$\mathrm{\Delta}{\varphi}^{\prime \prime}=\mathrm{\Delta}(\varphi +45\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})\phantom{\rule{0ex}{0ex}}=-q\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}4(\varphi +45\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})+\frac{{q}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8(\varphi +45\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})\phantom{\rule{0ex}{0ex}}=q\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}4\varphi +\frac{{q}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8\varphi ,$$## (15)

$$\mathrm{\Delta}{\varphi}^{\prime \prime \prime}=\mathrm{\Delta}(\varphi -22.5\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})\phantom{\rule{0ex}{0ex}}=-q\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}4(\varphi -22.5\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})+\frac{{q}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8(\varphi -22.5\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{deg})\phantom{\rule{0ex}{0ex}}=q\text{\hspace{0.17em}}\mathrm{cos}\text{\hspace{0.17em}}4\varphi -\frac{{q}^{2}}{2}\text{\hspace{0.17em}}\mathrm{sin}\text{\hspace{0.17em}}8\varphi .$$It is obvious that $\mathrm{\Delta}\varphi +\mathrm{\Delta}{\varphi}^{\prime}+\mathrm{\Delta}{\varphi}^{\prime \prime}+\mathrm{\Delta}{\varphi}^{\prime \prime \prime}=0$. Therefore, if we average the four phase maps, the phase error caused by gamma nonlinearity will disappear.

## 4.

## Experiments and Discussions

Our employed three-dimensional profile measurement system is composed of a Vivitek-D5185HD projector (Taiwan) and Baumer-TXG12 camera (Frauenfeld, Switzerland). The resolution ratio of the projector is $1920\times 1080$ and the camera has a resolution of $1296\times 966$.

To verify the effectiveness of the proposed method in reducing measurement errors, we measured a flat board pasted onto the wall. In our experiment, four-step phase-shifting is done four times with an initial phase offset of 225 deg. Table 1 shows the phase shift used each time. For each single phase-shifting fringe image, we continuously capture 20 images at the same state and average them. Figure 5 shows one of the captured fringe images and the result is shown in Fig. 6. Figure 6(a) shows the phase map using the general four-step phase-shifting algorithm. Figure 6(b) shows the phase map after compensation only for the system vibration and noise. Figure 6(c) is the phase map after compensation only for gamma nonlinearity. Figure 6(d) is the result considering both factors. The phase of a cross section (red line in Fig. 5) is shown in Fig. 7. Theoretically, the phase value of these pixels is supposed to be zero as there is no out-of-plane displacement here. Therefore, the phase value represents the phase error. Generally, we use the root-mean-square (RMS) value to evaluate the error. It can be seen that a serious phase error exists before any error elimination in Fig. 7(a). The RMS error is 0.0615 rad. As shown in Fig. 7(b), the RMS error reduces to 0.0121 rad after eliminating the phase error introduced by system vibration and noise. It is approximately five times smaller, which proves that the influence of system vibration and noise on phase error cannot be ignored. The RMS error reduces to 0.0183 rad, while the phase error caused by gamma nonlinearity is eliminated. When both the system vibration and noise and the gamma nonlinearity are considered, the RMS error decreases to 0.0043 rad, which is about 14 times smaller than the result using an ordinary phase-shifting algorithm. Table 2 compares the effectiveness of these four different algorithms. Figure 8 shows the 3-D shape of the blue rectangle area in Fig. 5. It is obvious that the surface of the flat plane is much smoother after phase error elimination.

## Table 1

Phase shift in each time phase shifting.

Phase-shifting order | Phase shift | |||
---|---|---|---|---|

1 | 0 deg | 90 deg | 180 deg | 270 deg |

2 | 225 deg | 112.5 deg | 202.5 deg | 292.5 deg |

3 | 45 deg | 135 deg | 225 deg | 315 deg |

4 | −22.5 deg | 67.5 deg | 157.5 deg | 247.5 deg |

## Table 2

Phase error RMS value of four different algorithms.

Algorithm | RMS | Reduction |
---|---|---|

a | 0.0615 | — |

b | 0.0121 | 80.5% |

c | 0.0183 | 70.3% |

d | 0.0043 | 93.1% |

As a practical application of the proposed method, some more complex objects are measured, and one of the experimental results of a reconstructed face is shown in Fig. 9. Figure 9(a) gives the phase distribution of the object using an ordinary four-step phase-shifting algorithm. Figure 9(b) shows the phase distribution after phase error elimination using our proposed method. The 3-D shape maps of Figs. 9(a) and 9(b) are shown in Figs. 9(c) and 9(d). Figures 9(e) and 9(f) plot the data of one same cross section. It is obvious that the reconstructed face after phase error elimination is much smoother with well-retained details. The phase error elimination method proposed in this paper can effectively remove the periodical phase error due to gamma nonlinearity, system vibration, and noise and obtain a more accurate result with a better visual effect.

## 5.

## Conclusions

In this paper, we analyze the influence of system vibration and noise and gamma nonlinearity on phase error. It is proven that system vibration and noise will introduce grayscale deflection in fringe images and result in a nonnegligible phase error. This error can be eliminated by using the average of multiple fringes images continuously captured at the same state. On the basis of theoretical analysis, we proposed a novel algorithm by doing the four-step phase-shifting four time to eliminate the phase error caused by gamma nonlinearity. The effectiveness of the proposed method has been demonstrated by the experimental results. The phase error can be reduced at least 90%.

## Acknowledgments

This research work is supported by National Natural Science Foundation of China, No. 11372182.