A recently proposed phase coding method for absolute phase retrieval performs well because its codeword is embedded into phase domain rather than intensity. Then, the codeword can determine the fringe order for the phase unwrapping. However, for absolute phase retrieval with a large number of codewords, the traditional phase coding method becomes not so reliable. In this paper, we present a novel phase coding method to tackle this problem. Six additional fringe images can generate more than unique codewords for correct absolute phase retrieval. The novel phase coding method can be used for absolute phase retrieval with high frequency. Experiment results demonstrate the proposed method is effective.
© 2012 OSA
Fringe projection technique is one of most widely used techniques for generating three-dimensional (3-D) shape measurement in many practical applications, because of its qualities of non-contact, low-cost, high-resolution, etc [1–5]. There are several techniques proposed to extract the wrapped phase for fringe projection technique, such as Fourier transform, wavelet transform and phase shifting algorithm . The transform techniques require complicated computation and cannot retrieve the wrapped phase accurately for measurement objects involving complex shape. Phase shifting algorithm suitable for measuring objects with complex shape has been extensively used owning to its speed and accuracy . Since the wrapped phase contains discontinuous jumps, a phase unwrapping method should be employed to retrieve the continuous absolute phase. However, when the measured objects have complex surface shape or some separated parts, how to implement correctly and rapidly absolute phase retrieval is a notable challenge for the 3-D measurement. There are many absolute phase retrieval methods proposed to tackle this problem [8–11]. Temporal phase unwrapping methods can deal with this problem, but need to project multiple frames of fringe images with different frequencies [12,13]. Binary encoding grating methods can detect the phase order for phase unwrapping by encoding a unique codeword, and then decoding this codeword [14–16]. Gray-code method is the most commonly used binary encoding method [17,18]. A recent study proposed a novel phase coding method to solve this problem, which is inherently better than the Gray-code method, because it uses phase instead of intensity to determine the codeword. As we know, phase is less sensitive to object surface contrast, ambient light, and camera noise .
For the phase coding method, the codeword is embedded into the coding phase ranging from to of phase-shifted fringe images (e.g., three images for a three step phase shifting algorithm). To generate codewords, the coding phase is quantized into levels with a stair height of . By this means, three additional fringe images can represent more than unique codewords. Figure 1(a) illustrates the phase coding method when . The stair phase-change is aligned with the discontinuities in the wrapped phase , and each phase stair can denote one codeword. The result codeword can determine the fringe order to retrieve the absolute phase as shown in Fig. 1(b).
According to the phase coding method with three additional fringe images, the number of generated unique codeword is more than . In general, for a phase shifting algorithm, the longer the wavelength used, the larger the phase noise is induced. It has been demonstrated the phase error in the low frequency fringes is larger than the high frequency fringes for fringe projection technique . It should be noted that wavelength here indicates the spatial width of the fringe images, i.e., number of pixels per fringe image. Therefore, for the fringe images with the same width, more codewords need much smaller wavelength. If the wrapped phase with fringe periods is accurate enough, more codewords are unnecessary. If unique codewords are not enough for measurement requirement, a large number of codewords are needed. In practical, how to retrieve the absolute phase with high frequency effectively remains a challenge . For example, the maximum unique number it can generate for a Gray-code method is for fringe images . The mulitiple-wavelength phase unwrapping method needs multiple frames of fringe images . For dual-wavelength or two-frequency phase unwrapping method, less fringe images are used, but the choice of fringe frequency is restricted to a certain range .
As we know, both of and are embedded by three step phase shifting algorithm. Owning to its easy availability, low cost and high flexibility, a digital video projector (DVP) has been commonly used in fringe projection technique. The phase-shift error can be totally avoided because the fringe images are generated by computer . However, the commercial DVP and the CCD camera used in fringe projection technique are generally fabricated to be nonlinear devices. This nonlinear intensity response of a fringe projection measurement system inevitably leads to the deviation of the captured fringe images from ideal distribution and introduces an additional phase error . In general, for commonly used DVP and the CCD camera, when are quantized into small levels, such as , this additional phase error will not influence the result codeword. However, when is quantized into large levels, this additional phase error will lead to wrong codeword, which cannot be used for correct phase unwrapping. The following theoretical analysis and experiment demonstrate this problem.
We propose a novel phase coding method to solve this problem. Through coding two phase information, two sets of embedding codeword are determined, which can generate a large number of codewords by simple calculation. Six additional fringe images can generate more than unique codewords for absolute phase retrieval. Compared with the traditional phase unwrapping methods, the proposed method is flexible and effective. The main work of this paper is given as follows. Section 2 gives the principle of the novel phase coding method. Section 3 demonstrates the proposed method through experiments. Section 4 summarizes this paper.
2. Principle of the novel phase coding method
2.1 The problem of a large number of codewords phase retrieval
Because of the nonlinear intensity response generated by the nonlinear devices of the DVP and the CCD camera , the real response of the projector to the input intensity for the ideal fringe image is expressed as the function shown in Eq. (1).
2.2 The novel phase coding method for a large number of codewords
We propose a novel method to solve this problem through coding two phase information. Two sets of embedding codeword can be calculated. Then, a large number of codewords can be determined using six additional fringe images. Experiment results verify that the proposed approach is robust for absolute phase retrieval. The details are given as follows. Figure 2 shows the framework of the proposed method. Figure 2(a) shows the wrapped phase , and two coding phase and. The result codeword for the coding phase is illustrated in Fig. 2(b). For the first coding phase, its fringe period is pixels, which is the same as the wrapped phase. There are fringe periods for which is divided into four equal parts. For each part, it is quantized into levels with . In the first periods, the coding phase decreases from to with a stair height of . For the second periods, the coding phase increases from to with a stair height of . The third periods, the coding phase distribution is the same as the first periods, and the fourth periods is the same as the second. As we know, the coding phase should change slowly in adjacent phase periods with a stair height of . If the phase of adjacent periods changes sharply, the intensity of the adjacent periods will change sharply. In the boundary area of the adjacent periods, the intensity of the adjacent periods will strongly influence each other. As a result, the phase achieved from the CCD camera captured fringe images will be not the same as we designed, and it is not suitable for absolute phase retrieval. Therefore, in the boundary area of adjacent periods, the phase changes slowly. For example, the phase information in the period is the same as the period. That is the reason the phase decreases from to in the first periods, and then increases from to in the second periods.
In conclusion, the coding phase is identical in the nonadjacent part of periods for . There are 4 phase periods for the second phase , and its phase period is pixels which are eight times of the pixels for . is quantized into levels with which decreases from to with a stair height of . All of , and are embedded by three step phase shifting algorithm. Therefore, three phase shifting fringe images are needed for each coding phase. Figures 3(a) -3(c) are used for generating , Figs. 3(d)-3(f) are for , and Figs. 3(g)-3(i) are for .
Through simple calculations, we get the result codeword shown in Fig. 2(b). denotes the codeword for , and the codeword in each periods is unique. The codeword for can determine the order of each periods for . Therefore, based on and , the new unique codeword can be calculated by Eq. (5) as follows,
Shown in Fig. 4 , the resulted new codeword ranges from to . Each unique codeword can determine one fringe order for the phase unwrapping. The coding phase is divided into parts. In each part, is quantized into levels in the range of or . In this condition, and . For example, when and , the result codeword which determines the phase order. When and , we can get which determines the phase order.
In this way, unique codewords can be determined for absolute phase retrieval. The number of the codewords equals to , and large unique codewords can be easily get by increasing and . For example, and which can generate unique codewords. However, when and , the novel method can generate unique codewords, which is more than codewords of the Gray-code method generated. Here we summarize the procedures of the proposed method.
Step 1: Set two integers and , embed the coding phase by a stair phase function:
Step 3: Obtain the wrapped phase , the coding phase and by three phase shifting algorithm, calculate the codeword of and from the coding phase:Eq. (5), which can be used to calculate the absolute phase based on Eq. (11).
The proposed novel phase coding method can generate a large number of codewords for absolute phase retrieval through coding two sets of phase, which can be used for high frequency absolute phase retrieval. For traditional gray-code method, the captured gray-code fringe images always are not so sharp cut-off in the black and white conversion boundaries, which may introduce wrong decoding phase orders and lead to absolute phase errors. The proposed phase coding method performs better than the gray-code method because its codeword is embedded into phase domain rather than intensity. However, in the boundary of stair phase-change, the fringe images are also not so sharp cut-off. It is mainly because of the impact of defocus and sharp change intensity in the boundary.
A self-correction phase correction phase unwrapping method is used to correct the unique codeword . All the positions of phase jump pixels in the wrapped phase map are marked first. Then, based on the calculated codeword , all the positions of phase order jump pixels are fixed. In the same row, each position of phase jump can be used to correct the position of its nearest phase order jump. The corrected new codeword can yield reliable absolute phase for 3-D shape measurement. A following experiment is used to verify this.
A fringe projection measurement system is developed, which consists of a black-and-white CCD camera (UNIQ UP1800) and a DLP projector (Optoma EP737) with the resolution of . The distance between the camera and the projector is about 20 cm and the tested object is placed in front of the system about 1.3 m.
Firstly, an experiment is provided to demonstrate the problem of a large number of codewords phase retrieval for traditional phase coding method. We quantize the coding phase into different levels with, and . For each number of quantized levels, three fringe images are designed for its coding phase . Accordingly, three sinusoidal fringe images with a phase shift of are used. The wrapped phase period includes pixels. One arbitrary row of the phase distribution is illustrated in Fig. 5(a) . Then, we calculate the codeword for the stair phase as the Fig. 5(b) shown.
When the coding phase is quantized into levels, the codeword can determine the correct fringe order. The unwrapped absolute phase is shown in Fig. 5(c). However, when the number of quantized levels increases to , the additional phase error leads to some wrong codewords where the codeword jumps are not aligned with the discontinuities. When the number increases to , more incorrect positions exist. Therefore, these positions lead to wrong absolute phase shown in Fig. 5(c). The wrong places in the codeword become more during the process of increasing of the number of the quantized levels. The experiment result is coincided with the theory analysis in the Section 2. We can conclude that when the number of codewords is large, the phase coding method becomes not reliable. A novel phase coding method to tackle this problem for high frequency fringe projection measurement is necessary.
Secondly, we compare the existed phase error with different lengths of fringe image period. The nonlinear intensity response introduced phase error can be alleviated or eliminated by using a large number of phase shifting algorithm . Therefore, the coding phase embedded by eight step phase shifting algorithm can be seemed correct. The coding phase embedded by three step phase shifting algorithm contains the additional phase error. Three sets of coding phase are designed as the first coding phase illustrated before, which is quantized into levels. The width of the fringe image is pixels. The fringe period length for each set of the coding phase is pixels, pixels and pixels, respectively. These fringe images are projected onto a flat board, then, captured by the CCD camera.
Based on the principle of phase shifting algorithm, two wrapped phase can be calculated for each set of coding phase. Subtracting the coding phase with additional phase error from the correct coding phase achieved by eight phase step phase shifting algorithm, we get the distribution for the phase error. One arbitrary row of the phase error is shown in Fig. 6 . There is no obvious difference of the phase error when the fringe images are with different fringe period lengths. The mean phase error for rows for the phase error is −0.0016 rad, 0.0025 rad and −0.0019 rad, respectively. Therefore, the coding phase with different lengths will not have obvious influence on the phase coding method.
Thirdly, in the same measurement, a series of fringe images including three sinusoidal intensity distribution fringe images, and six phase coding fringe images as shown in Fig. 3 are projected onto a flat board to verify the effective of the proposed phase coding method. Then, these fringe images are captured. Based on the principle of the proposed method, the achieved absolute reference phase maps are shown in Fig. 7 . Figures 7(a)-7(b) show the unwrapped absolute reference phase without using the self-correction method . There are obvious sharp phase jumps in the unwrapped reference caused by the fringe not so sharp cut-off phenomenon. The unique codeword in the boundary of stair phase-change needs to be corrected. The brief correction process is illustrated before. The corrected unwrapped absolute phase is smooth and without obvious phase errors shown in Figs. 7(c)-7(d). Therefore, based on the above proposed method, the number of the codewords for phase coding method will be not a problem. When and which can generate unique codewords for reliable measurement. However, unique codewords for traditional phase coding method is difficult to realize.
It should be noted that the number of quantized levels for one coding phase is limited. Much better device or more fringe patterns helps to increase the number of levels. For our measurement system, the phase coding method is reliable when the number increases to . So six additional fringe images can determine up to unique codewords, which is more than traditional gray-code method determined unique codewords for six additional fringe images. For general measurement system, more than quantized levels can be achieved. It can be concluded that the novel phase coding method can generate more than unique codewords for reliable absolute phase retrieval. Then, these fringe images are projected onto a plastic board to verify the proposed phase coding method used for measuring objects with complex surface. A plastic board is used with discontinuous holes and non-uniform surface reflectivity shown in Fig. 8(a) . Figure 8(b) is one of the captured three-step phase shifting fringe images. Figure 8(c) is one of the captured fringe images for the first coding phase. Figure 8(d) illustrates one of the captured fringe images for the second coding phase. The wrapped phase achieved by three step phase shifting algorithm is shown in Fig. 8(e). We retrieve the absolute phase by the proposed method, which illustrated in Fig. 8(f) is smooth and without obvious errors.
At last, traditional Gray-code method is used to compare with the proposed phase coding method. Subtracted the unwrapped phase from the reference phase, the phase information used for 3-D reconstruction can be achieved. Two views of the 3-D phase information are shown in Fig. 9 . The phase information is achieved by the Gray-code method shown in Figs. 9(a)-9(b). There is obvious phase error in the absolute phase map. These factors of surface contrast, the ambient light, and camera noise may bring errors in the binarization process for Gray-code method, which leads to wrong codeword for the absolute phase retrieval. The novel phase coding method achieved absolute phase is shown in Figs. 9(c)-9(d). There is no phase error caused by the phase unwrapping. The proposed phase coding method is less sensitive to the surface contrast, ambient light, and camera noise . The novel phase coding method is reliable for absolute phase retrieval with high frequency.
As a conclusion, we present a novel phase coding method for absolute phase retrieval with a large number of codewords. In general, six additional fringe images can represent more than unique codewords. The novel phase coding method is effective, which can be used for measurement requiring high frequency fringe images. Experiment results demonstrate the performance of the proposed method. In addition, this method can be easily combined with other commonly used phase shifting algorithms, for example, four step phase shifting algorithm or five step phase shifting algorithm. Therefore, the novel phase coding method has extensive application in 3-D phase measurement.
This research is supported by the National Natural Science Foundation of P. R. China (51175081) and (61107001), Natural Science Foundation of Jiangsu Province (BK2010058), Graduate Scientific Innovation Research Foundation of Jiangsu Province and Scientific Research Foundation of Graduate School of Southeast University.
References and links
5. E. H. Kim, J. Hahn, H. Kim, and B. Lee, “Profilometry without phase unwrapping using multi-frequency and four-step phase-shift sinusoidal fringe projection,” Opt. Express 17(10), 7818–7830 (2009). [CrossRef] [PubMed]
6. C. Quan, W. Chen, and C. J. Tay, “phase-retrieval techniques in fringe-projection profilometry,” Opt. Lasers Eng. 48(2), 235–243 (2010). [CrossRef]
8. Z. Wang, D. A. Nguyen, and J. Barnes, “Some practical considerations in fringe projection profilometry,” Opt. Lasers Eng. 48(2), 218–225 (2010). [CrossRef]
11. Y. Ding, J. Xi, Y. Yu, W. Cheng, S. Wang, and J. F. Chicharo, “Frequency selection in absolute phase maps recovery with two frequency projection fringes,” Opt. Express 20(12), 13238–13251 (2012). [CrossRef] [PubMed]
13. J. Tian, X. Peng, and X. Zhao, “A generalized temporal phase unwrapping algorithm for threee-dimensional profilometry,” Opt. Lasers Eng. 46(4), 336–342 (2008). [CrossRef]
14. G. Sansoni, M. Carocci, and R. Rodella, “Three-dimensional vision based on a combination of Gray-code and phase-shift light projection: analysis and compensation of the systematic errors,” Appl. Opt. 38(31), 6565–6573 (2005). [CrossRef] [PubMed]
15. J. H. Pan, P. S. Huang, and F. P. Chiang, “Color-coded binary fringe projection technique for 3-D shape measurement,” Opt. Eng. 44(2), 023606 (1999). [CrossRef]
17. Q. Zhang, X. Su, L. Xiang, and X. Sun, “3-D shape measurement based on complementary Gray-code light,” Opt. Lasers Eng. 50(4), 574–579 (2012). [CrossRef]
18. D. Zheng and F. Da, “Self-correction phase unwrapping method based on Gray-code light,” Opt. Lasers Eng. 50(8), 1130–1139 (2012). [CrossRef]
20. S. Zhang, “Phase unwrapping error reduction framework for a multiple-wavelength phase-shifting algorithm,” Opt. Eng. 48(10), 105601 (2009). [CrossRef]
22. B. Pan, Q. Kemao, L. Huang, and A. Asundi, “Phase error analysis and compensation for nonsinusoidal waveforms in phase-shifting digital fringe projection profilometry,” Opt. Lett. 34(4), 416–418 (2009). [CrossRef] [PubMed]