Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28613

Quantized phase coding and connected region labeling for absolute phase retrieval XIANGCHENG CHEN,1 YUWEI WANG,2,5 YAJUN WANG,3 MENGCHAO MA,4 1,6 AND CHUNNIAN ZENG 1

School of Automation, Wuhan University of Technology, Wuhan 430070, China Department of Precision Machinery and Precision Instrumentation, University of Science and Technology of China, Hefei 230026, China 3 Institute of Machinery Manufacturing Technology, China Academy of Engineering Physics, Mianyang 621900, China 4 Department of Instrument Science and Opto-electronics Engineering, Hefei University of Technology, Hefei 230088, China 5 [email protected] 6 [email protected] 2

Abstract: This paper proposes an absolute phase retrieval method for complex object measurement based on quantized phase-coding and connected region labeling. A specific code sequence is embedded into quantized phase of three coded fringes. Connected regions of different codes are labeled and assigned with 3-digit-codes combining the current period and its neighbors. Wrapped phase, more than 36 periods, can be restored with reference to the code sequence. Experimental results verify the capability of the proposed method to measure multiple isolated objects. © 2016 Optical Society of America OCIS codes: (100.5070) Phase retrieval; (150.6910) Three-dimensional sensing; (120.2650) Fringe analysis; (120.5050) Phase measurement.

References and links 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.

X. Su and Q. Zhang, “Dynamic 3-D shape measurement method: A review,” Opt. Lasers Eng. 48(2), 191–204 (2010). J. Geng, “Structured-light 3D surface imaging: a tutorial,” Adv. Opt. Photonics 3(2), 128–160 (2011). Z. H. Zhang, “Review of single-shot 3D shape measurement by phase calculation-based fringe projection techniques,” Opt. Lasers Eng. 50(8), 1097–1106 (2012). C. Quan, W. Chen, and C. Tay, “Phase-retrieval techniques in fringe-projection profilometry,” Opt. Lasers Eng. 48(2), 235–243 (2010). C. Zuo, L. Huang, M. L. Zhang, Q. Chen, and A. Asundi, “Temporal phase unwrapping algorithms for fringe projection profilometry: A comparative review,” Opt. Lasers Eng. 85, 84–103 (2016). M. Takeda and K. Mutoh, “Fourier transform profilometry for the automatic measurement of 3-D object shapes,” Appl. Opt. 22(24), 3977–3982 (1983). J. Zhong and J. Weng, “Spatial carrier-fringe pattern analysis by means of wavelet transform: wavelet transform profilometry,” Appl. Opt. 43(26), 4993–4998 (2004). V. Srinivasan, H. C. Liu, and M. Halioua, “Automated phase-measuring profilometry of 3-D diffuse objects,” Appl. Opt. 23(18), 3105–3108 (1984). Z. Zhang, Z. Jing, Z. Wang, and D. Kuang, “Comparison of Fourier transform, windowed Fourier transform, and wavelet transform methods for phase calculation at discontinuities in fringe projection profilometry,” Opt. Lasers Eng. 50(8), 1152–1160 (2012). T. Hoang, B. Pan, D. Nguyen, and Z. Wang, “Generic gamma correction for accuracy enhancement in fringeprojection profilometry,” Opt. Lett. 35(12), 1992–1994 (2010). Y. An, J.-S. Hyun, and S. Zhang, “Pixel-wise absolute phase unwrapping using geometric constraints of structured light system,” Opt. Express 24(16), 18445–18459 (2016). K. Creath, “Step height measurement using two-wavelength phase-shifting interferometry,” Appl. Opt. 26(14), 2810–2816 (1987). Y. Y. Cheng and J. C. Wyant, “Multiple-wavelength phase-shifting interferometry,” Appl. Opt. 24(6), 804–807 (1985). 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 (1999).

#278444 Journal © 2016

http://dx.doi.org/10.1364/OE.24.028613 Received 11 Oct 2016; revised 19 Nov 2016; accepted 23 Nov 2016; published 2 Dec 2016

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28614

15. W. H. Su, “Color-encoded fringe projection for 3D shape measurements,” Opt. Express 15(20), 13167–13181 (2007). 16. Y. Wang and S. Zhang, “Novel phase-coding method for absolute phase retrieval,” Opt. Lett. 37(11), 2067–2069 (2012). 17. F. Chen and X. Su, “Phase-unwrapping algorithm for the measurement of 3D object,” Optik (Stuttg.) 123(24), 2272–2275 (2012). 18. D. Zheng and F. Da, “Phase coding method for absolute phase retrieval with a large number of codewords,” Opt. Express 20(22), 24139–24150 (2012). 19. B. Li, Y. Fu, J. Zhang, H. Wu, and Z. Zeng, “Period correction method of phase coding fringe,” Opt. Rev. 22(5), 717–723 (2015). 20. Y. Xing, C. Quan, and C. Tay, “A modified phase-coding method for absolute phase retrieval,” Opt. Lasers Eng. 87, 97–102 (2016). 21. S. Zhang, “Phase unwrapping error reduction framework for a multiple-wavelength phase-shifting algorithm,” Opt. Eng. 48(10), 105601 (2009). 22. Y. Liu, X. Su, and Q. Zhang, “A novel encoded-phase technique for phase measuring profilometry,” Opt. Express 19(15), 14137–14144 (2011). 23. P. S. Huang and S. Zhang, “Fast three-step phase-shifting algorithm,” Appl. Opt. 45(21), 5086–5091 (2006). 24. L. He, Y. Chao, K. Suzuki, and K. Wu, “Fast connected-component labeling,” Pattern Recognit. 42(9), 1977– 1987 (2009).

1. Introduction Three-dimensional (3D) shape measurement has numerous applications ranging from scientific studies to industrial practices [1, 2]. Among all optical methods developed, fringe projection profilometry (FPP) has been broadly used due to its advantages of non-contact, high-resolution and high-speed [3–5]. In such FPP system, the project uint projects fringe pattens onto the measured objects, while the image acquisition unit records the deformed images of image patterns, then the processing/analysis unit calculates the phase modulation from the recorded images using a fringe analysis technique. The 3D shapes are reconstructed by mapping the unwrapped phase distributions to real 3D world coordinates. The phase extraction accuracy will directly influence the 3D reconstruction result of measurd objects. There are several techniques to extract wrapped phase from fringe images, such as Fourier transform [6], wavelet transform [7] and phase-shift [8] algorithms. Transform methods requiring single-shot measurement are propitious to inspect dynamic objects, yet cannot obtain correct phase at edges because of their global processing [9]. Phase-shift methods usually take more than three frames to evaluate wrapped phases pixel-by-pixel and are more suitable for measuring objects with complex shapes [10]. Unfortunately, both the three methods involve the arctangent operation that will result in wrapped phase ranging from [0,2π] with 2π jumps, and therefore phase unwrapping should be carried out for an absolute phase map before 3D reconstruction. However, for multiple objects with complex shapes or texture variations, how to implement rapidly and simultaneously absolute phase retrieval remains challenging. Numerous studies have been conducted for phase unwrapping during past decades, which can be generally classified into two principal groups: spatial phase unwrapping and temporal phase unwrapping [5]. Spatial phase unwrapping is a natural and straightforward way that detects 2π phase jumps from the wrapped phase map itself and removes them by adding or subtracting multiples of 2π. However, such spatial methods tend to fail if abrupt shapes introduce more than 2π phase changes from one pixel to its neighboring pixels [11]. Researchers pay more attention to temporal methods because they can avoid the error transferring between pixels and are more effective than spatial methods. The common temporal methods include two-wavelength [12], multiple-wavelength [13], gray-code [14], color-encoded [15] and phase-coding [16], and all of them require additional fringe patterns to provide extra information about the fringe orders. Rather than embedding codes into intensity or color images, phase-coding method is less sensitivity to surface contrast, ambient light and camera noises [16–20]. And this method has capability to measure multiple objects rapidly and simultaneously. For the traditional phase-coding method [16], two sets of phaseshift fringe patterns are employed, including the sinusoidal ones for the wrapped phase, and

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28615

the other coded ones for the fringe order. Specifically, when unwrapping the wrapped phase with N periods, N unique codewords need to be embedded into coding phase. The coding phase ranging from [0, 2π] is quantized into N levels in ascending order, and each quantized phase is used to denote one codeword. However, there are compromises between the number of codewords, difference between adjacent quantized phases and wavelength of sinusoidal fringes. If we quantify the coding phase into large levels for more codewords, the difference between adjacent quantized phases will be too small to guarantee the correct codewords because of the system non-linearity [20]. Conversely, if the number of codewords decreases, the larger wavelength of the sinusoidal fringes will result in larger phase error [21]. To address this problem, much more codewords can be generated by using two sets of coded patterns [18]. Nevertheless, more patterns mean that we need take more time to project and record their images, and it is not desirable especially under motion conditions. Unlike previous phase-coding methods, we propose a quantized phase-coding method to generate more than 36 different 3-digit-codes, without reducing the difference between adjacent quantized phases or increasing the number of coded patterns. The 3-digit-code is formed by three codes of the current period, the former period and the latter period. Each fringe period can be uniquely identified by looking up the position of the 3-digit-code in the whole code sequence, thus its fringe order can be correctly determined. In addition, traditional line-scanning methods [15, 22] suffer from complex shapes, textures and noises, which will result in false multi-digit-codes. Thus we extract the 3-digit-codes based on more robust connected regions. The rest of the paper is organized as follows. Section 2 describes the principle of the proposed method. Section 3 and Section 4 present the simulations and experiments. Section 5 shows the discussions, and Section 6 includes this paper. 2. Methods 2.1 Fringe Projection Profilometry(FPP) system

Fig. 1. Fringe projection profilometry(FPP) system.

Figure 1 illustrates a typical FPP system consisting of a projector, a camera and a computer. Fringe patterns are generated by software on the computer and then projected onto the measured object by the projector. The surface geometry of the object distorts and reflects the fringe patterns. The camera, positioned at a certain angle with respect to the projector, records the reflected fringe patterns. Thus the projector and the camera form a triangulation system. The captured images (six patterns: three sinusoidal fringes and three coded fringes) are sent to the computer. Phase wrapping and phase unwrapping algorithms are used to reconstruct the absolute phase map of the object. Finally, the 3-D information of the object can be achieved by a phase-to-height conversion algorithm based on triangulation.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28616

2.2 Coding scheme In the conventional phase-coding method [16], two sets of phase-shift fringe patterns (as shown in Fig. 2) are employed, including the sinusoidal ones for the wrapped phase, and the other coded ones for the fringe order. The method quantifies the coding phase with limited number in ascending order to generate unique codewords. The calculation of fringe orders just refers to the quantized phase of current period, without considering the phase information of adjacent periods. Therefore, in essence this method only employs 1-digital-code to determine the fringe order. As described previously, if we quantify the coding phase into more quantized levels for more unique codewords, the differences between adjacent quantized phases will be too small to guarantee the correct codewords because of the system non-linearity.

Fig. 2. Principle of conventional phase-coding method.

To solve the above problem, we propose a quantized phase-coding method that combines the current period and its adjacent periods to calculate the fringe order. It can generate more than 36 different 3-digit-codes, without reducing the differences between adjacent quantized phases or increasing the number of coded patterns. Rather than setting quantized phases in ascending order, the fringe orders are modulated by a specific code sequence, and the code sequence will be embedded into quantized phases of three coded fringe patterns. For convenience, this encoding method is referred as quantized phase-coding. Figure 3 shows the principle of the proposed quantized phase-coding scheme. The blue line plots the wrapped phase obtained from sinusoidal fringe patterns, and the red line plots the quantized phase extracted from the coded fringe patterns. Each quantized phase, treated as 1-digit-code, is assigned to one fringe period. Three continuous codes treated as one group are used to identify the current period. Figure 4 shows the procedure how to calculate the fringe order. For example, the 1th, 2th and 3th stripes in the red group are used to identify the 2th fringe period, the 5th, 6th and 7th stripes in the green group are used to identify the 6th fringe period, and the 11th, 12th and 13th stripes in the blue group are used to identify the 12th fringe period. In this way, all the fringe orders, except the leftmost and the rightmost periods on the boundary, can be determined. For the period on the boundary, its fringe order can be calculated by adding or subtracting one to that of its adjacent periods.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28617

Fig. 3. Principle of quantized phase-coding method. (a) The wrapped phase and quantized phase, (b) the corresponding codes.

Fig. 4. Procedure to calculate the fringe orders.

Next we will introduce the generation of the code sequence CS. In order to produce a large number of codewords, the quantized level M should be greater than 5, therefore the codes are integers less than or equal to M. Because of the height modulation of objects, the stripes with same codes may merge together, so any same codes in the CS should be separated by at least two other codes. Meanwhile, for unique identification of every fringe period, any 3-digit-codes in the CS should appear only once. To generate such CS, the codes are divided into two groups based on odd and even, then all possible 3-digit-codes consisting of odd codes and that of even codes are itemized, finally these 3-digit-codes are arranged by alternating with odd codes and even codes in a manner the CS can be obtained. In this paper we set quantized level M = 6 as an example, all possible 3-digit-codes consisting of odd number are '135', '153', '351', '315','513','531', and all possible 3-digit-codes consisting of odd number are '246', '264', '426', '462', '624', '642'. Then all 3-digit-codes can combine with each other to form one 36-digit code sequence. CS = "135246351462513624153642531426315264"

(1)

Searching for the fringe orders becomes positioning the 3-digit-codes in the CS. As an example, a 3-digit-code ‘635’ uniquely matches with CS (6,7,8), thus the fringe orders are 6, 7 and 8, respectively. Supposing the period of sinusoidal fringes projected by projector is T, and the unit is pixels. Then the conversion from the CS to the quantized phase φ Q ( x, y ) can be described as the following function:

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28618

φ Q ( x, y ) = CS floor ( x /T ) ∗ 2π /T

(2)

where floor ( x /T ) = k ( x, y ) is truncated integer representing the fringe order; CS(k) returns the k-th code of CS; T is the fringe pitch, or the number of pixels per period of the sinusoidal fringes. In general, phase-shift methods take more than three images to recover the phases and therefore are more suitable for measuring objects with complex shapes [15]. Without loss of generality, as three-step algorithm requires the minimum number of fringes among all phaseshift methods [23], so we put the quantized phases φ Q ( x, y ) into three coded phase-shift fringes:

I n = b( x, y ) + m( x, y ) cos φ Q ( x, y ) + 2π n /3

(3)

where n = 1, 2,3 , b( x, y ) is the average intensity, m( x, y ) is the intensity modulation. After capturing the coded fringe images, the quantized phase in range of [0, 2π ] can be calculated by solving Eq. (3).

φ Q ( x, y )= tan −1 3 ( I 2 − I1 ) / ( 2 I 3 − I1 − I 2 )

(4)

Then the phase code map can be obtained from the quantized phase according to Eq. (4). C ( x, y ) = round M φ Q ( x, y )/2π

(5)

where round ( x) returns the closest integer. 2.3 Connected region labeling

Fig. 5. Six binary masks created from the code map.

On the basis of code values, six binary masks are created from the code map, as shown in Fig. 5. 1, if C ( x, y ) = i Bi ( x, y ) = where i = 1, 2,3, 4,5, 6 0, otherwise

(6)

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28619

These binary masks are desirable to address the distribution of the regions with different codes. In the CS, one code may appear many times, thus there will be several stripes with same code and several connected regions within same binary mask. Obviously, all points within the same connected region have the same fringe order. So if the fringe order of one point is determined, all points within its region can also be determined. For the mask Bi , each connected region can be masked with a unique label value by use of labeling operation [24]. For a connected region Rij with code i and label j, its centroid ( xij , yij ) can be calculated as x , y xRij ( x, y ) ( xij , yij ) = , Rij ( x, y ) x, y

yRij ( x, y ) R ( x, y ) x , y ij

x, y

(7)

Let’s denote the left-most point of region Rij in row yij by ( xijL , yij ) , and the right-most point by ( xijR , yij ) . Since region Rij belongs to mask Bi , the fringe period corresponding to this region Rij has a phase code Ccurrent = i . Meanwhile, the code of its former strip should be C former = C ( xijL − 1, yij ) , and the latter one should be Clatter = C ( xijR + 1, yij ) . Then region Rij can

be labeled by a 3-digit-code C former Ccurrent Clatter . Since the presence of background and shadow, the C former and Clatter may be zero that cannot be used for fringe order determination. For example, if one point locates in the background or cannot be illuminated by the projector, its quantized phase as well as the code will be unavailable. In summary, there are four different cases that should be considered. Case 1: C former > 0 & Clatter > 0 .

This is the most common and intuitive case that both the former strip and latter strip can be illuminated by the projector. Such that both ( xijL − 1, yij ) and ( xijR + 1, yij ) have available codes. The fringe order k ( x, y ) equals the position index of 3-digitcode C former Ccurrent Clatter in the CS . Case 2: C former = 0 & Clatter > 0 .

If former strip locates in the background or cannot be illuminated by the projector, while latter strip has available code. The fringe order of current stripe can be obtained according to the fringe order k ( xijR + 1, yij ) of the next stripe. And the fringe order k ( x, y ) = k ( xijR + 1, yij ) − 1 . Case 3: C former > 0 & Clatter = 0 .

Similarly, latter strip locates in the background or cannot be illuminated by the projector, while former strip has available code. The fringe order of current stripe can be obtained according to the fringe order k ( xijL − 1, yij ) of the previous stripe. And the fringe order k ( x, y ) = k ( xijL − 1, yij ) + 1 . Case 4: C former = 0 & Clatter = 0 .

This case is relatively rare that both former strip and latter strip are unavailable. Therefore we need change the row yij into the other row which must intersect with the current region. Meanwhile, the first or the third code of the new 3-digit-code

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28620

must greater than zero. Then we can use the new 3-digit-code to find out the fringe order. Once the fringe order k ( x, y ) is determined, the absolute phase map can be obtained as Φ ( x, y ) = φ ( x, y ) + 2π k ( x, y )

(9)

3. Simulations

In order to compare the performance between the proposed method and conventional phasecoding method [16], simulations were performed to demonstrate the stability and superiority of our method. In the simulation, we employed these two methods to generate 36 codewords respectively. The coding phases were quantized into six levels for our method, and 36 levels for conventional method. Gaussian noises (SNR = 20) were also added to the phase encoded fringe patterns of the two methods. Figure 6(a) shows three quantized phase-coding fringe patterns, and Fig. 6(b) shows three conventional phase-coding fringe patterns. As can be seen from the intensity curves, the fringe patterns are noisy. Figure 6(c) shows the extracted coded phases of the two methods, which also depicts some noises on the coded phases. Figure 6(d) shows the code of our method, and Fig. 6(e) shows the fringe order by looking up the 3-digitcodes in the CS. Clearly, the codeword and the fringe order were correctly restored despite the presence of noises. However, as shown in Fig. 6(f), the code, as well as the fringe order, was incorrect which could not be used for phase unwrapping.

Fig. 6. Simulations of the proposed method and conventional phase-coding method when the SNR = 20. (a) Quantized phase-coding fringe patterns, (b) conventional phase-coding fringe patterns, (c) coded phases of the two methods, (d) code of our method, (e) fringe order of our method, (f) fringe order of conventional phase-coding method.

4. Experiments

To verify the proposed method, a FPP system including a projector (DLP LightCrafter 4500) and a CMOS camera (IOI Flare 2M360-CL) was developed. The resolution of the projector is 1140 × 912, while that of the camera is 1280 × 1024. The distance between the projector and the camera is about 30 cm. The measured objects are two isolated sculptures and placed in front of the FPP system about 100cm. A flat board is used as the reference plane. Three sinusoidal and coded fringe patterns are generated by a computer, then projected onto the objects by the projector, and captured by the camera sequentially. The sinusoidal fringe period for each quantized phase is 20 pixels. Figure 7(a) shows the 100-th row cross section of the reference plane images, which depicts some noises on the quantized phase. The noises are too small to influence the code value. However, code errors maybe appear at some phase-jump areas because of defocus, and to remove them for corrected code map, morphological filters such as dilation and erosion are employed on the phase code map. Figure 7(b) shows the codes calculated by Eq. (5), which

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28621

shows some errors at the jump areas. Then we employed 5 × 5 matrices of ones for erosion and 7 × 7 matrices of ones for dilation to estimate these errors. Figure 7(c) shows the corrected codes. Figures 8(a)–7(c) show the sinusoidal fringe images, from which the wrapped phase can be calculated, as illustrated in Fig. 8(d). Figures 8(e)–8(g) show the coded phase-shift fringe images, from which the quantized phase can be calculated, as illustrated in Fig. 8(h). Figure 9 shows the phase code map with 3-digit-codes based on region labeling method introduced in Section 2.3. For example, the region labeled by ‘514’ satisfies the first case, and referring to the whole code sequence its fringe order is 9. The region labeled by ‘024’ satisfies the second case, while the latter region satisfies the first case with fringe order 5, so the current fringe order is 5-1 = 4. The region labeled by ‘130’ satisfies the third case, while the former region satisfies the first case with fringe order 14, so the current fringe order is 14 + 1 = 15. The region labeled by ‘010’ satisfies the fourth case, so we select a row that intersects the current region to generate a new 3-digit-code ‘510’. Then according to the former region which satisfies the first case with fringe order 13, the current fringe order is 13 + 1 = 14. Once all connected regions with different codes are labeled, with reference to the whole code sequence CS, the fringe order can be determined, as shown in Fig. 10(a). The absolute phase map calculated by Eq. (9) is shown in Fig. 10(b). Figure 11 shows the 3D reconstruction of the two isolated sculptures. The experimental results illustrate the capability of the proposed method.

Fig. 7. One cross section of the reference plane. (a) The wrapped phase and quantized phase, (b) the corresponding codes, (c) the corrected codes.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28622

Fig. 8. (a)–(c) Three sinusoidal fringe images, (d) wrapped phase map, (e)–(g) three coded fringe patterns, (h) quantized phase map.

Fig. 9. Region labeling method, where the green points denote the centroids of connected regions, the blue lines denote the rows of regions where their centroids located, the yellow points denote the left-most points, and the cyan points denote the right-most points.

Fig. 10. Phase retrieval of two isolated objects. (a) The fringe order, (b) the absolute phase map.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28623

Fig. 11. 3D reconstruction of two isolated sculptures.

Another experiment was also preformed to measure objects with different colors. We replaced the white sculpture in the right by a blue sculpture. Figure 12(a) shows the two objects with different colors used in this experiment. Figure 12(b) shows their phase code map with 3-digit-codes. Finally, the 3D reconstruction of the two sculptures can be realized, as shown in Fig. 12(c). From the result, it can be concluded that the method is robust to the different colors.

Fig. 12. Experiment to measure objects with different colors. (a) Tested objects with different colors, (b) Phase code map with 3-digit-codes, (c) 3D reconstruction of two isolated sculptures

5. Discussions

Compared to other absolute phase retrieval algorithms, we discuss the proposed method with the following aspects: Codewords number. Since our method employs three adjacent codes to identify the current fringe period, 3-digital-codes for the codewords essentially could encode

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28624

more fringes. The number of the unique codewords (3-digital-codes) depends on the quantized level of the coding phase, that is more quantized level means more unique codewords can be generated, but the quantized level is limited by the SNR of quantized phase map. In addition, it's also feasible for an extension of the technique with four or more digit codes, which also means more codewords could be generated, and more robust against noise, but it will also be more complex to compute the fringe orders. Number of coded fringe patterns. Generally, more codewords can be generated by using more coded patterns. However, this is not desirable in most cases, especially under motion conditions. This proposed method can generate enough unique codewords with only one group of fringe patterns (three fringe patterns), thus has potential for high-speed applications. Reliability of phase unwrapping for complex objects. Line-scanning unwrapping methods [15, 22] suffering from complex shapes, textures and noises, may lead to false unwrapping phase. This paper proposes 3-digit-codes for phase unwrapping processing based on connected regions, which is more robust for detecting the correct fringe order. Sensitivity to the objects with different colors. Since the proposed method uses the phase information for codewords encoding, it is insensitive to color, lighting and reflectivity. The experiment of two objects with different colors verifies the success of this method for measuring colorful objects. Computation cost for the 3D reconstruction. The calculation of the wrapped phase from the sinusoidal fringe patterns and the coded fringe patterns can be processed at the same time, which can accelerate the speed for 3D measurement obviously. The connected region labeling algorithm is time-consuming. However, parallel computing by GPU can significantly improve the computation time. Phase error. The proposed method still uses the conventional phase-shift algorithm to obtain the wrapped phase, thus it does not improve the phase error problem, which is actually associated with captured fringe quality. 6. Conclusion

In this paper, an absolute phase retrieval method based on quantized phase modulation and connected region labeling has been presented. Compared with conventional phase-coding methods, our method can achieve large-number codewords without reducing the differences between adjacent quantized phases or increasing the number of coded patterns. Meanwhile, fringe orders are evaluated by using connected region as unit, which is more robust than traditional line-scanning method. Experimental results of measuring multiple isolated objects verified the effectiveness of the proposed method. This technique has potential for highfrequency fringes and large-scale objects. Funding

National Natural Science Foundation of China (NSFC) (Grant Nos. 51605130, 61275011, 61603360, and 51405126).

Quantized phase coding and connected region labeling for absolute phase retrieval XIANGCHENG CHEN,1 YUWEI WANG,2,5 YAJUN WANG,3 MENGCHAO MA,4 1,6 AND CHUNNIAN ZENG 1

School of Automation, Wuhan University of Technology, Wuhan 430070, China Department of Precision Machinery and Precision Instrumentation, University of Science and Technology of China, Hefei 230026, China 3 Institute of Machinery Manufacturing Technology, China Academy of Engineering Physics, Mianyang 621900, China 4 Department of Instrument Science and Opto-electronics Engineering, Hefei University of Technology, Hefei 230088, China 5 [email protected] 6 [email protected] 2

Abstract: This paper proposes an absolute phase retrieval method for complex object measurement based on quantized phase-coding and connected region labeling. A specific code sequence is embedded into quantized phase of three coded fringes. Connected regions of different codes are labeled and assigned with 3-digit-codes combining the current period and its neighbors. Wrapped phase, more than 36 periods, can be restored with reference to the code sequence. Experimental results verify the capability of the proposed method to measure multiple isolated objects. © 2016 Optical Society of America OCIS codes: (100.5070) Phase retrieval; (150.6910) Three-dimensional sensing; (120.2650) Fringe analysis; (120.5050) Phase measurement.

References and links 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.

X. Su and Q. Zhang, “Dynamic 3-D shape measurement method: A review,” Opt. Lasers Eng. 48(2), 191–204 (2010). J. Geng, “Structured-light 3D surface imaging: a tutorial,” Adv. Opt. Photonics 3(2), 128–160 (2011). Z. H. Zhang, “Review of single-shot 3D shape measurement by phase calculation-based fringe projection techniques,” Opt. Lasers Eng. 50(8), 1097–1106 (2012). C. Quan, W. Chen, and C. Tay, “Phase-retrieval techniques in fringe-projection profilometry,” Opt. Lasers Eng. 48(2), 235–243 (2010). C. Zuo, L. Huang, M. L. Zhang, Q. Chen, and A. Asundi, “Temporal phase unwrapping algorithms for fringe projection profilometry: A comparative review,” Opt. Lasers Eng. 85, 84–103 (2016). M. Takeda and K. Mutoh, “Fourier transform profilometry for the automatic measurement of 3-D object shapes,” Appl. Opt. 22(24), 3977–3982 (1983). J. Zhong and J. Weng, “Spatial carrier-fringe pattern analysis by means of wavelet transform: wavelet transform profilometry,” Appl. Opt. 43(26), 4993–4998 (2004). V. Srinivasan, H. C. Liu, and M. Halioua, “Automated phase-measuring profilometry of 3-D diffuse objects,” Appl. Opt. 23(18), 3105–3108 (1984). Z. Zhang, Z. Jing, Z. Wang, and D. Kuang, “Comparison of Fourier transform, windowed Fourier transform, and wavelet transform methods for phase calculation at discontinuities in fringe projection profilometry,” Opt. Lasers Eng. 50(8), 1152–1160 (2012). T. Hoang, B. Pan, D. Nguyen, and Z. Wang, “Generic gamma correction for accuracy enhancement in fringeprojection profilometry,” Opt. Lett. 35(12), 1992–1994 (2010). Y. An, J.-S. Hyun, and S. Zhang, “Pixel-wise absolute phase unwrapping using geometric constraints of structured light system,” Opt. Express 24(16), 18445–18459 (2016). K. Creath, “Step height measurement using two-wavelength phase-shifting interferometry,” Appl. Opt. 26(14), 2810–2816 (1987). Y. Y. Cheng and J. C. Wyant, “Multiple-wavelength phase-shifting interferometry,” Appl. Opt. 24(6), 804–807 (1985). 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 (1999).

#278444 Journal © 2016

http://dx.doi.org/10.1364/OE.24.028613 Received 11 Oct 2016; revised 19 Nov 2016; accepted 23 Nov 2016; published 2 Dec 2016

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28614

15. W. H. Su, “Color-encoded fringe projection for 3D shape measurements,” Opt. Express 15(20), 13167–13181 (2007). 16. Y. Wang and S. Zhang, “Novel phase-coding method for absolute phase retrieval,” Opt. Lett. 37(11), 2067–2069 (2012). 17. F. Chen and X. Su, “Phase-unwrapping algorithm for the measurement of 3D object,” Optik (Stuttg.) 123(24), 2272–2275 (2012). 18. D. Zheng and F. Da, “Phase coding method for absolute phase retrieval with a large number of codewords,” Opt. Express 20(22), 24139–24150 (2012). 19. B. Li, Y. Fu, J. Zhang, H. Wu, and Z. Zeng, “Period correction method of phase coding fringe,” Opt. Rev. 22(5), 717–723 (2015). 20. Y. Xing, C. Quan, and C. Tay, “A modified phase-coding method for absolute phase retrieval,” Opt. Lasers Eng. 87, 97–102 (2016). 21. S. Zhang, “Phase unwrapping error reduction framework for a multiple-wavelength phase-shifting algorithm,” Opt. Eng. 48(10), 105601 (2009). 22. Y. Liu, X. Su, and Q. Zhang, “A novel encoded-phase technique for phase measuring profilometry,” Opt. Express 19(15), 14137–14144 (2011). 23. P. S. Huang and S. Zhang, “Fast three-step phase-shifting algorithm,” Appl. Opt. 45(21), 5086–5091 (2006). 24. L. He, Y. Chao, K. Suzuki, and K. Wu, “Fast connected-component labeling,” Pattern Recognit. 42(9), 1977– 1987 (2009).

1. Introduction Three-dimensional (3D) shape measurement has numerous applications ranging from scientific studies to industrial practices [1, 2]. Among all optical methods developed, fringe projection profilometry (FPP) has been broadly used due to its advantages of non-contact, high-resolution and high-speed [3–5]. In such FPP system, the project uint projects fringe pattens onto the measured objects, while the image acquisition unit records the deformed images of image patterns, then the processing/analysis unit calculates the phase modulation from the recorded images using a fringe analysis technique. The 3D shapes are reconstructed by mapping the unwrapped phase distributions to real 3D world coordinates. The phase extraction accuracy will directly influence the 3D reconstruction result of measurd objects. There are several techniques to extract wrapped phase from fringe images, such as Fourier transform [6], wavelet transform [7] and phase-shift [8] algorithms. Transform methods requiring single-shot measurement are propitious to inspect dynamic objects, yet cannot obtain correct phase at edges because of their global processing [9]. Phase-shift methods usually take more than three frames to evaluate wrapped phases pixel-by-pixel and are more suitable for measuring objects with complex shapes [10]. Unfortunately, both the three methods involve the arctangent operation that will result in wrapped phase ranging from [0,2π] with 2π jumps, and therefore phase unwrapping should be carried out for an absolute phase map before 3D reconstruction. However, for multiple objects with complex shapes or texture variations, how to implement rapidly and simultaneously absolute phase retrieval remains challenging. Numerous studies have been conducted for phase unwrapping during past decades, which can be generally classified into two principal groups: spatial phase unwrapping and temporal phase unwrapping [5]. Spatial phase unwrapping is a natural and straightforward way that detects 2π phase jumps from the wrapped phase map itself and removes them by adding or subtracting multiples of 2π. However, such spatial methods tend to fail if abrupt shapes introduce more than 2π phase changes from one pixel to its neighboring pixels [11]. Researchers pay more attention to temporal methods because they can avoid the error transferring between pixels and are more effective than spatial methods. The common temporal methods include two-wavelength [12], multiple-wavelength [13], gray-code [14], color-encoded [15] and phase-coding [16], and all of them require additional fringe patterns to provide extra information about the fringe orders. Rather than embedding codes into intensity or color images, phase-coding method is less sensitivity to surface contrast, ambient light and camera noises [16–20]. And this method has capability to measure multiple objects rapidly and simultaneously. For the traditional phase-coding method [16], two sets of phaseshift fringe patterns are employed, including the sinusoidal ones for the wrapped phase, and

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28615

the other coded ones for the fringe order. Specifically, when unwrapping the wrapped phase with N periods, N unique codewords need to be embedded into coding phase. The coding phase ranging from [0, 2π] is quantized into N levels in ascending order, and each quantized phase is used to denote one codeword. However, there are compromises between the number of codewords, difference between adjacent quantized phases and wavelength of sinusoidal fringes. If we quantify the coding phase into large levels for more codewords, the difference between adjacent quantized phases will be too small to guarantee the correct codewords because of the system non-linearity [20]. Conversely, if the number of codewords decreases, the larger wavelength of the sinusoidal fringes will result in larger phase error [21]. To address this problem, much more codewords can be generated by using two sets of coded patterns [18]. Nevertheless, more patterns mean that we need take more time to project and record their images, and it is not desirable especially under motion conditions. Unlike previous phase-coding methods, we propose a quantized phase-coding method to generate more than 36 different 3-digit-codes, without reducing the difference between adjacent quantized phases or increasing the number of coded patterns. The 3-digit-code is formed by three codes of the current period, the former period and the latter period. Each fringe period can be uniquely identified by looking up the position of the 3-digit-code in the whole code sequence, thus its fringe order can be correctly determined. In addition, traditional line-scanning methods [15, 22] suffer from complex shapes, textures and noises, which will result in false multi-digit-codes. Thus we extract the 3-digit-codes based on more robust connected regions. The rest of the paper is organized as follows. Section 2 describes the principle of the proposed method. Section 3 and Section 4 present the simulations and experiments. Section 5 shows the discussions, and Section 6 includes this paper. 2. Methods 2.1 Fringe Projection Profilometry(FPP) system

Fig. 1. Fringe projection profilometry(FPP) system.

Figure 1 illustrates a typical FPP system consisting of a projector, a camera and a computer. Fringe patterns are generated by software on the computer and then projected onto the measured object by the projector. The surface geometry of the object distorts and reflects the fringe patterns. The camera, positioned at a certain angle with respect to the projector, records the reflected fringe patterns. Thus the projector and the camera form a triangulation system. The captured images (six patterns: three sinusoidal fringes and three coded fringes) are sent to the computer. Phase wrapping and phase unwrapping algorithms are used to reconstruct the absolute phase map of the object. Finally, the 3-D information of the object can be achieved by a phase-to-height conversion algorithm based on triangulation.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28616

2.2 Coding scheme In the conventional phase-coding method [16], two sets of phase-shift fringe patterns (as shown in Fig. 2) are employed, including the sinusoidal ones for the wrapped phase, and the other coded ones for the fringe order. The method quantifies the coding phase with limited number in ascending order to generate unique codewords. The calculation of fringe orders just refers to the quantized phase of current period, without considering the phase information of adjacent periods. Therefore, in essence this method only employs 1-digital-code to determine the fringe order. As described previously, if we quantify the coding phase into more quantized levels for more unique codewords, the differences between adjacent quantized phases will be too small to guarantee the correct codewords because of the system non-linearity.

Fig. 2. Principle of conventional phase-coding method.

To solve the above problem, we propose a quantized phase-coding method that combines the current period and its adjacent periods to calculate the fringe order. It can generate more than 36 different 3-digit-codes, without reducing the differences between adjacent quantized phases or increasing the number of coded patterns. Rather than setting quantized phases in ascending order, the fringe orders are modulated by a specific code sequence, and the code sequence will be embedded into quantized phases of three coded fringe patterns. For convenience, this encoding method is referred as quantized phase-coding. Figure 3 shows the principle of the proposed quantized phase-coding scheme. The blue line plots the wrapped phase obtained from sinusoidal fringe patterns, and the red line plots the quantized phase extracted from the coded fringe patterns. Each quantized phase, treated as 1-digit-code, is assigned to one fringe period. Three continuous codes treated as one group are used to identify the current period. Figure 4 shows the procedure how to calculate the fringe order. For example, the 1th, 2th and 3th stripes in the red group are used to identify the 2th fringe period, the 5th, 6th and 7th stripes in the green group are used to identify the 6th fringe period, and the 11th, 12th and 13th stripes in the blue group are used to identify the 12th fringe period. In this way, all the fringe orders, except the leftmost and the rightmost periods on the boundary, can be determined. For the period on the boundary, its fringe order can be calculated by adding or subtracting one to that of its adjacent periods.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28617

Fig. 3. Principle of quantized phase-coding method. (a) The wrapped phase and quantized phase, (b) the corresponding codes.

Fig. 4. Procedure to calculate the fringe orders.

Next we will introduce the generation of the code sequence CS. In order to produce a large number of codewords, the quantized level M should be greater than 5, therefore the codes are integers less than or equal to M. Because of the height modulation of objects, the stripes with same codes may merge together, so any same codes in the CS should be separated by at least two other codes. Meanwhile, for unique identification of every fringe period, any 3-digit-codes in the CS should appear only once. To generate such CS, the codes are divided into two groups based on odd and even, then all possible 3-digit-codes consisting of odd codes and that of even codes are itemized, finally these 3-digit-codes are arranged by alternating with odd codes and even codes in a manner the CS can be obtained. In this paper we set quantized level M = 6 as an example, all possible 3-digit-codes consisting of odd number are '135', '153', '351', '315','513','531', and all possible 3-digit-codes consisting of odd number are '246', '264', '426', '462', '624', '642'. Then all 3-digit-codes can combine with each other to form one 36-digit code sequence. CS = "135246351462513624153642531426315264"

(1)

Searching for the fringe orders becomes positioning the 3-digit-codes in the CS. As an example, a 3-digit-code ‘635’ uniquely matches with CS (6,7,8), thus the fringe orders are 6, 7 and 8, respectively. Supposing the period of sinusoidal fringes projected by projector is T, and the unit is pixels. Then the conversion from the CS to the quantized phase φ Q ( x, y ) can be described as the following function:

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28618

φ Q ( x, y ) = CS floor ( x /T ) ∗ 2π /T

(2)

where floor ( x /T ) = k ( x, y ) is truncated integer representing the fringe order; CS(k) returns the k-th code of CS; T is the fringe pitch, or the number of pixels per period of the sinusoidal fringes. In general, phase-shift methods take more than three images to recover the phases and therefore are more suitable for measuring objects with complex shapes [15]. Without loss of generality, as three-step algorithm requires the minimum number of fringes among all phaseshift methods [23], so we put the quantized phases φ Q ( x, y ) into three coded phase-shift fringes:

I n = b( x, y ) + m( x, y ) cos φ Q ( x, y ) + 2π n /3

(3)

where n = 1, 2,3 , b( x, y ) is the average intensity, m( x, y ) is the intensity modulation. After capturing the coded fringe images, the quantized phase in range of [0, 2π ] can be calculated by solving Eq. (3).

φ Q ( x, y )= tan −1 3 ( I 2 − I1 ) / ( 2 I 3 − I1 − I 2 )

(4)

Then the phase code map can be obtained from the quantized phase according to Eq. (4). C ( x, y ) = round M φ Q ( x, y )/2π

(5)

where round ( x) returns the closest integer. 2.3 Connected region labeling

Fig. 5. Six binary masks created from the code map.

On the basis of code values, six binary masks are created from the code map, as shown in Fig. 5. 1, if C ( x, y ) = i Bi ( x, y ) = where i = 1, 2,3, 4,5, 6 0, otherwise

(6)

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28619

These binary masks are desirable to address the distribution of the regions with different codes. In the CS, one code may appear many times, thus there will be several stripes with same code and several connected regions within same binary mask. Obviously, all points within the same connected region have the same fringe order. So if the fringe order of one point is determined, all points within its region can also be determined. For the mask Bi , each connected region can be masked with a unique label value by use of labeling operation [24]. For a connected region Rij with code i and label j, its centroid ( xij , yij ) can be calculated as x , y xRij ( x, y ) ( xij , yij ) = , Rij ( x, y ) x, y

yRij ( x, y ) R ( x, y ) x , y ij

x, y

(7)

Let’s denote the left-most point of region Rij in row yij by ( xijL , yij ) , and the right-most point by ( xijR , yij ) . Since region Rij belongs to mask Bi , the fringe period corresponding to this region Rij has a phase code Ccurrent = i . Meanwhile, the code of its former strip should be C former = C ( xijL − 1, yij ) , and the latter one should be Clatter = C ( xijR + 1, yij ) . Then region Rij can

be labeled by a 3-digit-code C former Ccurrent Clatter . Since the presence of background and shadow, the C former and Clatter may be zero that cannot be used for fringe order determination. For example, if one point locates in the background or cannot be illuminated by the projector, its quantized phase as well as the code will be unavailable. In summary, there are four different cases that should be considered. Case 1: C former > 0 & Clatter > 0 .

This is the most common and intuitive case that both the former strip and latter strip can be illuminated by the projector. Such that both ( xijL − 1, yij ) and ( xijR + 1, yij ) have available codes. The fringe order k ( x, y ) equals the position index of 3-digitcode C former Ccurrent Clatter in the CS . Case 2: C former = 0 & Clatter > 0 .

If former strip locates in the background or cannot be illuminated by the projector, while latter strip has available code. The fringe order of current stripe can be obtained according to the fringe order k ( xijR + 1, yij ) of the next stripe. And the fringe order k ( x, y ) = k ( xijR + 1, yij ) − 1 . Case 3: C former > 0 & Clatter = 0 .

Similarly, latter strip locates in the background or cannot be illuminated by the projector, while former strip has available code. The fringe order of current stripe can be obtained according to the fringe order k ( xijL − 1, yij ) of the previous stripe. And the fringe order k ( x, y ) = k ( xijL − 1, yij ) + 1 . Case 4: C former = 0 & Clatter = 0 .

This case is relatively rare that both former strip and latter strip are unavailable. Therefore we need change the row yij into the other row which must intersect with the current region. Meanwhile, the first or the third code of the new 3-digit-code

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28620

must greater than zero. Then we can use the new 3-digit-code to find out the fringe order. Once the fringe order k ( x, y ) is determined, the absolute phase map can be obtained as Φ ( x, y ) = φ ( x, y ) + 2π k ( x, y )

(9)

3. Simulations

In order to compare the performance between the proposed method and conventional phasecoding method [16], simulations were performed to demonstrate the stability and superiority of our method. In the simulation, we employed these two methods to generate 36 codewords respectively. The coding phases were quantized into six levels for our method, and 36 levels for conventional method. Gaussian noises (SNR = 20) were also added to the phase encoded fringe patterns of the two methods. Figure 6(a) shows three quantized phase-coding fringe patterns, and Fig. 6(b) shows three conventional phase-coding fringe patterns. As can be seen from the intensity curves, the fringe patterns are noisy. Figure 6(c) shows the extracted coded phases of the two methods, which also depicts some noises on the coded phases. Figure 6(d) shows the code of our method, and Fig. 6(e) shows the fringe order by looking up the 3-digitcodes in the CS. Clearly, the codeword and the fringe order were correctly restored despite the presence of noises. However, as shown in Fig. 6(f), the code, as well as the fringe order, was incorrect which could not be used for phase unwrapping.

Fig. 6. Simulations of the proposed method and conventional phase-coding method when the SNR = 20. (a) Quantized phase-coding fringe patterns, (b) conventional phase-coding fringe patterns, (c) coded phases of the two methods, (d) code of our method, (e) fringe order of our method, (f) fringe order of conventional phase-coding method.

4. Experiments

To verify the proposed method, a FPP system including a projector (DLP LightCrafter 4500) and a CMOS camera (IOI Flare 2M360-CL) was developed. The resolution of the projector is 1140 × 912, while that of the camera is 1280 × 1024. The distance between the projector and the camera is about 30 cm. The measured objects are two isolated sculptures and placed in front of the FPP system about 100cm. A flat board is used as the reference plane. Three sinusoidal and coded fringe patterns are generated by a computer, then projected onto the objects by the projector, and captured by the camera sequentially. The sinusoidal fringe period for each quantized phase is 20 pixels. Figure 7(a) shows the 100-th row cross section of the reference plane images, which depicts some noises on the quantized phase. The noises are too small to influence the code value. However, code errors maybe appear at some phase-jump areas because of defocus, and to remove them for corrected code map, morphological filters such as dilation and erosion are employed on the phase code map. Figure 7(b) shows the codes calculated by Eq. (5), which

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28621

shows some errors at the jump areas. Then we employed 5 × 5 matrices of ones for erosion and 7 × 7 matrices of ones for dilation to estimate these errors. Figure 7(c) shows the corrected codes. Figures 8(a)–7(c) show the sinusoidal fringe images, from which the wrapped phase can be calculated, as illustrated in Fig. 8(d). Figures 8(e)–8(g) show the coded phase-shift fringe images, from which the quantized phase can be calculated, as illustrated in Fig. 8(h). Figure 9 shows the phase code map with 3-digit-codes based on region labeling method introduced in Section 2.3. For example, the region labeled by ‘514’ satisfies the first case, and referring to the whole code sequence its fringe order is 9. The region labeled by ‘024’ satisfies the second case, while the latter region satisfies the first case with fringe order 5, so the current fringe order is 5-1 = 4. The region labeled by ‘130’ satisfies the third case, while the former region satisfies the first case with fringe order 14, so the current fringe order is 14 + 1 = 15. The region labeled by ‘010’ satisfies the fourth case, so we select a row that intersects the current region to generate a new 3-digit-code ‘510’. Then according to the former region which satisfies the first case with fringe order 13, the current fringe order is 13 + 1 = 14. Once all connected regions with different codes are labeled, with reference to the whole code sequence CS, the fringe order can be determined, as shown in Fig. 10(a). The absolute phase map calculated by Eq. (9) is shown in Fig. 10(b). Figure 11 shows the 3D reconstruction of the two isolated sculptures. The experimental results illustrate the capability of the proposed method.

Fig. 7. One cross section of the reference plane. (a) The wrapped phase and quantized phase, (b) the corresponding codes, (c) the corrected codes.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28622

Fig. 8. (a)–(c) Three sinusoidal fringe images, (d) wrapped phase map, (e)–(g) three coded fringe patterns, (h) quantized phase map.

Fig. 9. Region labeling method, where the green points denote the centroids of connected regions, the blue lines denote the rows of regions where their centroids located, the yellow points denote the left-most points, and the cyan points denote the right-most points.

Fig. 10. Phase retrieval of two isolated objects. (a) The fringe order, (b) the absolute phase map.

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28623

Fig. 11. 3D reconstruction of two isolated sculptures.

Another experiment was also preformed to measure objects with different colors. We replaced the white sculpture in the right by a blue sculpture. Figure 12(a) shows the two objects with different colors used in this experiment. Figure 12(b) shows their phase code map with 3-digit-codes. Finally, the 3D reconstruction of the two sculptures can be realized, as shown in Fig. 12(c). From the result, it can be concluded that the method is robust to the different colors.

Fig. 12. Experiment to measure objects with different colors. (a) Tested objects with different colors, (b) Phase code map with 3-digit-codes, (c) 3D reconstruction of two isolated sculptures

5. Discussions

Compared to other absolute phase retrieval algorithms, we discuss the proposed method with the following aspects: Codewords number. Since our method employs three adjacent codes to identify the current fringe period, 3-digital-codes for the codewords essentially could encode

Vol. 24, No. 25 | 12 Dec 2016 | OPTICS EXPRESS 28624

more fringes. The number of the unique codewords (3-digital-codes) depends on the quantized level of the coding phase, that is more quantized level means more unique codewords can be generated, but the quantized level is limited by the SNR of quantized phase map. In addition, it's also feasible for an extension of the technique with four or more digit codes, which also means more codewords could be generated, and more robust against noise, but it will also be more complex to compute the fringe orders. Number of coded fringe patterns. Generally, more codewords can be generated by using more coded patterns. However, this is not desirable in most cases, especially under motion conditions. This proposed method can generate enough unique codewords with only one group of fringe patterns (three fringe patterns), thus has potential for high-speed applications. Reliability of phase unwrapping for complex objects. Line-scanning unwrapping methods [15, 22] suffering from complex shapes, textures and noises, may lead to false unwrapping phase. This paper proposes 3-digit-codes for phase unwrapping processing based on connected regions, which is more robust for detecting the correct fringe order. Sensitivity to the objects with different colors. Since the proposed method uses the phase information for codewords encoding, it is insensitive to color, lighting and reflectivity. The experiment of two objects with different colors verifies the success of this method for measuring colorful objects. Computation cost for the 3D reconstruction. The calculation of the wrapped phase from the sinusoidal fringe patterns and the coded fringe patterns can be processed at the same time, which can accelerate the speed for 3D measurement obviously. The connected region labeling algorithm is time-consuming. However, parallel computing by GPU can significantly improve the computation time. Phase error. The proposed method still uses the conventional phase-shift algorithm to obtain the wrapped phase, thus it does not improve the phase error problem, which is actually associated with captured fringe quality. 6. Conclusion

In this paper, an absolute phase retrieval method based on quantized phase modulation and connected region labeling has been presented. Compared with conventional phase-coding methods, our method can achieve large-number codewords without reducing the differences between adjacent quantized phases or increasing the number of coded patterns. Meanwhile, fringe orders are evaluated by using connected region as unit, which is more robust than traditional line-scanning method. Experimental results of measuring multiple isolated objects verified the effectiveness of the proposed method. This technique has potential for highfrequency fringes and large-scale objects. Funding

National Natural Science Foundation of China (NSFC) (Grant Nos. 51605130, 61275011, 61603360, and 51405126).