Three-dimensional (3-D) shape measurement using a novel encoded-phase grating is proposed. The projected sinusoidal fringe patterns are designed with wrapped and encoded phase instead of monotonic and unwrapped phase. Phase values of the projected fringes on the surface are evaluated by phase-shift technique. The absolute phase is then restored with reference to the encoded information, which is extracted from the differential of the wrapped phase. To solve the phase errors at some phase-jump areas, Hilbert transform is employed. By embedding the encoded information in the wrapped phase, there is no extra pattern that needs to be projected. The experimental results identify its feasibility and show the possibility to measure the spatially isolated objects. It will be promising to analyze dynamic objects.
© 2011 OSA
Optical 3-D shape measurement is one of the most important tasks in many applications, such as range acquisition, industrial inspection, reverse engineering, object recognition and 3D map building. The 3-D profilometry based on sinusoidal fringe pattern projection is one of the important methods to acquire 3-D surface of object [1–3]. It can realize non-scanning and full-field measurement. It is difficult to retrieve the absolute phases for spatially isolated surfaces, due to fringe order will be ambiguous in phase unwrapping [4,5]. To overcome this problem, there are two approaches roughly.
One is to project two- or multi- wavelength fringe patterns [6–10], which can give the exact fringe order. But it may slow measurement because more fringe patterns are needed to be projected. The other is to project some extra structured encoded patterns, which will provide the extra information for fringe order to fulfill the measurement of a spatially isolated object. Among them, Li et al. combined the sinusoidal fringe with the extra intensity encoded patterns , in which the Fourier transform is employed to obtain the phase distribution and the fringe order is extracted by the extra intensity encoded patterns. Zhang fulfilled the measurement by using binary images with defocused projection so that the binary images will guide the phase unwrapping process .
On the other side, the encoded information can be embedded in the projected sinusoidal fringe patterns. Wei-Hung Su generated the sinusoidal fringe patterns by giving every period a certain color, and the fringe order will be provided by the color information of the fringe patterns . In this approach, the color device is necessary and the phase accuracy might be influenced by the poor color response and the color crosstalk.
In this paper, we propose a novel encoding algorithm to embed the encoding information into the phase distributions rather than the intensity or color of the projected sinusoidal fringe patterns. Usually the phase distribution, which is used to generate the projected sinusoidal fringe patterns, is monotonic even it is wrapped and limited in [-π, π]. In general, this proposed encoded-phase technique changes the monotonicity. That means the projected sinusoidal fringe patterns will be produced by wrapped and encoded phase instead of the monotonic phase. In the experiment, the wrapped phase distributions will be calculated by phase-shift technique from the captured images. The fringe order will be obtained by checking the differential information of the wrapped phase. There are no extra patterns involved, for example, there are only 3-frame sinusoidal fringe patterns for three-frame phase-shift technique. This paper describes the principle of this approach and presents some preliminary experimental results.
2.1 The encoded-phase fringe pattern
In phase-shift technique, the intensity of the projected sinusoidal fringe patterns can be expressed as
With respect to the phase differential, in the classical phase-shift technique, there are two types of the wrapped phase of the projected fringes, except 2π phase jumps. The phase differential is positive in type one and negative in type two as shown in Fig. 1 . In general the two types could not appear at the same time. If a code value 1 or 0 is set for each period with positive and negative phase differential separately, a code sequence will be formed by collecting the code value of each period, e.g. it is “1111…” in Fig. 1(a), and “0000…” in Fig. 1(b).
We can form a new wrapped phase, which consists of those two types of wrapped phases, to produce the projected sinusoidal fringes. The wrapped phase of the projected fringes on the surface can be evaluated by phase-shift technique. The phase differential information will be utilized to identify the fringe orders and further restore the absolute phase.
Without loss of generality, we choose three-frame phase-shift technique to demonstrate this encoded-phase method. First we create the wrapped phase with respect to the code sequence shown in Fig. 2(a) . Then the three-frame projected sinusoidal fringes will be produced according to the designed wrapped phase and phase-shift technique, which are shown in Figs. 2(b)–2(d).
The code value of every period is extracted from the phase differential with respect to Fig. 1. The fringe order is obtained by looking up the position of a given sub-code sequence formed by the current period and its several neighbor periods in a code sequence.
The code sequence has a property that any sub-code sequence with a given length should appear only once in the whole sequence. For a six-digit sub-code sequence, there are 26 = 64 different sub-code sequences. Therefore the longest length of code sequence can be 64 to ensure each period is identified by a unique sub-code sequence. For example, any sub-code sequence with a length of six codes appears only once within the whole sequence ˝111111 0000001000011000101000111001001011001101001111010101110110˝. Figure 2(a) shows a part of this code sequence.
The number of the periods in the projected sinusoidal fringe, i.e., the length of the code sequence, and the length of the sub-code sequence should follow this relationship
In experiment, there might be some problems to correctly identify the code value of a given period. In the encoded phase, there are two types of phase jumps, one is classical phase jump for codewords 11 and 00, and the other one is encoded phase jump for codewords 10 and 01. The classical phase jump is 2π jump and easy to be identified. The encoded phase jump is the turning point of the sign of the differential. The code value of every period is accordance with the sign of the differential.
The encoded phase jump will be correct, when the differential of all pixels in a single period is uniformly plus or minus. In experiment, this assumption is not always satisfied, because the phase value will be influenced by noise and sampling etc. Then it is possible to get false phase jumps. A single period will be divided into several parts and given several codes. Therefore the false phase jumps have to be excluded. The elimination process is as follow. First, we can eliminate those, whose phase value is not close to π or –π, because the phase value of all phase jumps should be near π or –π. For example, we set a threshold π/2 or 2π/3 etc. Second, there might be more than one encoded phase jumps at the joint areas of two periods, and their phase values are all close to π or –π. We keep one and skip others to ensure the integrality of a single period. The selected encoded phase jump might be inaccurate. As a result, some phase errors might be involved, which will be corrected by a process in Section 2.3. The code value of every period will be decided by the majority of sign of the differential.
2.2 Decoding procedure
After getting the code value of every period, the fringe order m (m = 0,1,...,N-1,where N is the length of the code sequence), is obtained using the subsequence matching method. Figure 3 shows how to obtain m. There are 64 codes in the whole sequence as shown in section 2.1. The global position m of the subsequence ‘111110’ equals 1 which is obtained by string matching. So, the fringe orders m of all periods in this subsequence should be 1, 2, 3, 4, 5, and 6, respectively.
After identifying the fringe order m of each period, the absolute phase distributions can be restored. The process can be expressed as
2.3 Correction for phase errors
Besides the influence of the inaccurate location of the encoded-phase jumps, the errors also might be caused by the low pass filtering of the imaging system.
To the best of our knowledge, the low-pass filtering effect will not cause phase errors in the classical phase-shift technique. Here the monotonicity of the wrapped phase is changed with the codewords 10 and 01. Therefore, the 2nd and 3rd frames will be influenced by low pass filtering effect, and the phase value near the encoded-phase jumps might be not reliable. We demonstrate the low-pass filtering effect in Fig. 4 . The code sequence is same as shown in Fig. 2(a). The low-pass filtering effect is a 5 × 1 Gaussian window. Figures 4(a)–4(c) are the simulated captured fringes. Figure 4(d) is the differential of the wrapped phase, Fig. 4(e) is the phase errors. As a result of low-pass filtering effect, the fringe will become defocusing, or the image will be blurring. In the classical phase-shift techniques, the image blurring is not so sensitive, and sometimes the defocusing could increase the quality of the fringe. But the errors will be brought in by low-pass filtering effect in this method. Here we analyse the relationship between the size of Guassian window and the phase error by computer simulation. Table 1 shows the standard deviation of the errors caused by low-pass filtering effect with different size Gaussian windows in the proposed phase-code method. It is clear that the errors increase with defocusing. Therefore, a correction process is necessary. Here we employ Hilbert transform  to correct those errors. The results are also shown in Table 1.
With respect to the N-frame phase-shift technique, the wrapped phase can be retrieved by two components, e.g. the cos fringe Ic and sin fringe Is, which are calculated by and as shown in Figs. 5(a) and 5(c). The accumulative cos fringe is less influenced. Therefore the error in Fig. 4(e) is mainly introduced by the accumulative sin fringe, in which the direction of phase-shift reverses at the area with codeword 10 or 01. Here we set the accumulative cos fringe as the reference. We choose some part of a give line in the cos fringe, which includes both the A and B fringes in Fig. 5(e). There is no-zero constant value in the cos fringe, therefore Hilbert transform can produce a good sin fringe. A new phase can be recalculated by arc tangent function. We choose the part P1P2 to replace the corresponding original phase, because some errors will be involved by Hilbert transform at the ends of the chosen part with respect to Fourier transform’s characteristics. The Hilbert transform could not work well, when the captured A or B fringe failed to reach the point P1 or P2. The reference data is got by classical three-frame phase-shift technique. The difference before correction is shown in Fig. 5(f). Figure 5(g) shows the difference after correction. It shows that the error is dramatically reduced.
In a word, the absolute phase can be got by the following procedure as shown in Fig. 6 .
3. Experimental results
A 1024 × 768 pixels LCD projector is used. The period of the sinusoidal fringe is 16 pixels, therefore there are 64 periods totally, and the length of the sub-sequence is 6. The code sequence is ˝1111110000001000011000101000111001001011001101001111010101110110˝. The camera is a Ueye USB camera and its resolution is 1280 × 1024 pixels.
There are two experimental results. Firstly, a plane is measured by the proposed method as well as the classical phase-shift techniques. The interested area is the size of an A4 page. The angle of inclination is 45°. The number of phase-shift frames changes from 3 to 7. For a given phase-shift, i.e. three-frame, four-frame etc., there are two absolute phase distributions obtained by the proposed method and the classical one respectively. The reliability-guided phase unwrapping algorithm  is employed in classical technique. Figure 7 shows a profile of the difference. The standard deviation of measurement is shown in Table 2 , in which the result of the classical 7-frame phase-shift technique is set as the reference data. It is clear that the accuracy of the encoded-phase technique is at the same level of the classical phase-shift technique, and the error will decrease with the increase of phase-shift frames.
Secondly, a scene with isolated objects is tested. Its size is 300mm × 300mm × 40mm. The encoded three-frame phase-shift technique is used. The images of three sinusoidal fringe patterns are shown in Fig. 8 as well as the wrapped phase and the absolute phase distributions.
A novel encoded-phase 3D sensing method to obtain the absolute phase is proposed, which reserves the merit of phase-shift technique as well as no extra fringe involved, and fulfills the encoding process in the phase distributions. In this approach, first it is to find the code value of each period by checking the differential of the wrapped phase, and then the code value will be used to find the fringe order. Finally, the absolute phase distributions can be retrieved. The experimental results show the feasibility of this proposed method. It is suitable to capture the dynamic process in real time by using high-speed projector.
There are two restrictions about its applications. One is the consuming time of decoding is ten times more than the classical phase unwrapping process right now. The other is that the size of the imaging object cannot be so small as to be less than a sub-code sequence. The former will be dealt with a faster decoding algorithm. The latter can be improved by decreasing the size of each projected fringe. As same as the classical phase-shift method, this method fulfills the unwrapping process by the neighboring information. Therefore it does not work well when a false extracted sub-code sequence is caused by a sharp object. In addition this method will also be influenced by object texture and noise as well as the effect of vibrations or stray reflections.
This work is supported by the National Natural Science Foundation of China under grants No. 60838002 and 60807006.
References and links
1. F. Chen, G. M. Brown, and M. Song, “Overview of three-dimensional shape measurement using optical methods,” Opt. Eng. 39(1), 10–22 (2000). [CrossRef]
2. J. Salvi, S. Fernandez, T. Pribanic, and X. Llado, “A state of the art in structured light patterns for surface profilometry,” Pattern Recognit. 43(8), 2666–2680 (2010). [CrossRef]
3. Q. Zhang and X. Su, “High-speed optical measurement for the drumhead vibration,” Opt. Express 13(8), 3110–3116 (2005), http://www.opticsinfobase.org/oe/abstract.cfm?URI=oe-13-8-3110. [CrossRef]
4. X. Su and W. Chen, “Reliability-guided phase unwrapping algorithm: a review,” Opt. Lasers Eng. 42(3), 245–261 (2004). [CrossRef]
5. T. R. Judge and P. J. Bryanston-Cross, “Review of phase unwrapping techniques in fringe analysis,” Opt. Lasers Eng. 21(4), 199–239 (1994). [CrossRef]
7. W. Nadeborn, P. Andra, and W. Osten, “A robust procedure for absolute phase measurement,” Opt. Lasers Eng. 24(2–3), 245–260 (1996). [CrossRef]
10. E. B. Li, X. Peng, J. Xi, J. F. Chicharo, J. Q. Yao, and D. W. Zhang, “Multi-frequency and multiple phase-shift sinusoidal fringe projection for 3D profilometry,” Opt. Express 13(5), 1561–1569 (2005), http://www.opticsinfobase.org/oe/abstract.cfm?URI=OPEX-13-5-1561. [CrossRef]
11. Y. Li, C. F. Zhao, Y. X. Qian, H. Wang, and H. Zh. Jin, “High-speed and dense three-dimensional surface acquisition using defocused binary patterns for spatially isolated objects,” Opt. Express 18(21), 21628–21635 (2010), http://www.opticsinfobase.org/oe/abstract.cfm?URI=oe-18-21-21628. [CrossRef]
13. W.-H. Su, “Color-encoded fringe projection for 3D shape measurements,” Opt. Express 15(20), 13167–13181 (2007), http://www.opticsinfobase.org/oe/abstract.cfm?URI=oe-15-20-13167. [CrossRef]
14. L. Xiong and S. Jia, “Phase-error analysis and elimination for nonsinusoidal waveforms in Hilbert transform digital-fringe projection profilometry,” Opt. Lett. 34(15), 2363–2365 (2009). [CrossRef]