Stair phase-coding fringe plus phase-shifting used in 3D measuring profilometry

As the number of codewords adopted in phase-coding fringes increases, the solution of fringe orders leads to many mistakes. Consequently, errors of the unwrapped phase occur. Thus, increasing the codeword approach in a phase-coding fringe remains a challenge. In this paper, a modified stair phase-coding fringe is designed, and a new phase unwrapping algorithm based on shifting fringe order is presented. The main idea of this method is that the width ratio between the sinusoidal fringe and each stair phase of phase-coding fringe is set to 1: n. The fringe order retrieved from the phase-coding fringe can be multiplied by the shift itself, thereby assisting phase unwrapping. This method adopts fewer codewords to replace the usual large number. As such, the approach gains two merits. One is that it guarantees a high measurement accuracy. The other is that it allows the measurement of isolated objects with complicated shapes. The experiments demonstrate that the proposed method is simple but effective.


Background
With the rapidly development of computer technology, optical and optoelectronic technology, threedimensional measurement theory and technology based on structured light has been rapid developed.Many methods have been proposed to recover 3D surface geometry using different principles [1].Those methods characterized by non-contact operation, full-field acquisition and fast data processing has been widely used in industrial inspection, quality control, reverse engineering, micro-fabrication and other fields [2][3][4][5][6].
Many methods have been utilized to measure complex surfaces.Zhao et al. [7] used two phase images with different precision in unwrapping.Considering the numerous images required in Zhao's method, Li et al. [8] proposed two-frequency grating profilometry, which entails only one grating instead of changing gratings with different equivalent wavelengths.Zhang et al. [9] presented a phase unwrapping algorithm based on multi-frequency fringe projection.The method of combined fringes is also used in 3D measurement.Zhang et al. [10] suggested a method that embeds a speckle-like signal in three sinusoidal fringe patterns to eliminate phase ambiguity.Basing from this technique, Feng et al. [11] proposed a novel speckle-embedded fringe projection method using a graphics processing unit to process data in real time.The Gray code plus phase-shifting method determines the codewords from image intensity [12][13][14].However, the measurement resolution is limited by the errors derived from gray-level quantization and noise.Meanwhile, the codewords are less robust for measuring high-contrast surfaces and limited to 2 m (where m is regarded as the number of Gray code patterns).Liu et al. [15] developed a novel encoded-phase technique for phase measuring profilometry, in which the differentially wrapped phases are regarded as codewords.This method is suitable for capturing dynamic scenes, but it is influenced by object texture and noise.Wang et al. [16] presented a novel absolute phase recovery technique with a phase-coding fringe.This technique not only produces more codewords but also receives more robust measurement results for different fringe image brightness levels compared with Gray code techniques.Fu et al. [17] followed Wang's theory and measured a blade with a complex shape.However, the measurement accuracy was reduced when numerous codewords were adopted.Different from the method proposed by Wang, Zheng et al. [18] introduced a technique wherein two sets of phase-coding fringes are projected to address the difficulty in judging the fringe order.Basing from Zheng's foundation, Zhou et al. [19] developed a color fringe coding method to hasten the measurement speed.However, this technique was required to handle the color crosstalk.Chen [20] added a correction method to stabilize the phase-unwrapping algorithm.Meanwhile, Xu et al. [21] proposed an encoding strategy that increases the range of unique phase distribution to 10π.This method is capable of reconstructing holes, steps, and other complicated shapes.
We propose the use of phase shifting algorithms to codify the codewords, which could be used for unwrapping procedure.In general, we need to project two sets of fringes: the first one set consists of a sequence of sinusoidal fringe patterns used to determine the profile of the object under test, and the second is a sequence of stair phase-coding fringes used for determining the fringe orders.Moreover, two issues must be clarified.First, basing from Zhou's method [19] shown in Fig. 1a, we design a modified stair phase-coding fringe that exactly retrieves the codewords.Second, the width ratio between the sinusoidal fringe and each stair phase of phase-coding fringe is set to 1: n.To facilitate the narrative, we use n = 2 as an example (Fig. 1b).In specific, each stair codeword corresponds to two wrapped phases.The width of each stair phase can be doubled by shifting itself.Then, the width of each stair phase and wrapped phase can be equal, and phase unwrapping can be achieved.
The paper is organized as follows.Section Methods describes the principles of the proposed method.Section Experiments and Results presents the experiments and results.Section Discussion discusses how to generate good measurement results.Finally, Section Conclusion provides the conclusion.

Measurement system
The measurement system based on triangulation is shown in Fig. 2. The optical center of the Digital Light Processing (DLP) and the Charge-Coupled-Device (CCD) camera are Point E and C, respectively.The optical axis of the projector and that of the CCD camera intersect at origin point O.The fringe is projected onto the measured object.The deformed fringe pattern is captured by the CCD camera.The height of the measured object can be expressed as follows [22]: Where l 0 is the distance between the entrance pupil of the CCD camera and the reference plane, and d is the distance between the entrance pupil of the CCD camera and the exit pupil of the projector.f 0 is the spatial frequency of the sinusoidal fringe pattern on the reference plane.Δϕ is the phase difference between the corresponding point on the object and reference plane.The parameters l 0 , d and f 0 are obtained by calibration.The verticality and parallel of the system are calibrated by the method of reference [23].

Four-step phase-shifting algorithm
Phase-shifting method had been extensively adopted in optical metrology because of its measurement speed and accuracy.Over the years, a variety of phaseshifting algorithms have been developed, that include three-step, four-step, and lease-square algorithms [24].Four-step phase-shifting algorithm can avoid the 1-th and 2-th non-linearity of the measurement system [25].In consideration of the measurement speed and accuracy, four-step phase-shifting algorithm is adopted in this paper.
In general, a four-step phase-shifting algorithm with equal phase shifts can be described as: Here, A(x, y) is the average intensity, B(x, y) is the intensity modulation and Φ(x, y) is the phase to be solved for.Simultaneously, solving Eqs. ( 2)-( 5) leads to The phase obtained in Eq. ( 6) ranges from − π to π with 2π discontinuities.A phase-unwrapping algorithm should be used to obtain continuous phase.

Algorithm of the designed stair phase-coding fringe
The following steps comprise the process of a modified stair phase-coding fringe.(1)Embed the codeword into the phase φ′(x, y) with the following stair phase function: where floor[x] is the largest integer not greater than x, mod(x, y) is the remainder after the division of x by y, p is the number of pixels per stair phase, and N is the step number in one rising stair phase.We define S = 1024/(p × N) as the sub-period number that corresponds to the segment number of φ′(x, y).In this section, p = 64, N = 4, and S = 4.The phase φ′(x, y) is denoted as a red dash-and-dot line in Fig. 3.
(2)Normalize the phase φ′(x, y) as follows: where φ(x, y) is the coding phase ranging from −3.13 to 3.13, max(x) is the maximum value of x, and min(φ′) is the minimum value of φ′.The coding phase φ(x, y) is represented by a solid blue line in Fig. 3.
(3)Put the coding phase into four-step phase-shifting fringe patterns: Fig. 5 One cross section of coding phase and segmented fringe order where k = 1, 2, 3, 4. The phase-shifting fringe I c 4 is displayed in Fig. 4.

New phase unwrapping algorithm
(1)Calculate coding phase φ(x, y) with the phase-shifting algorithm: As shown in Fig. 5, the blue line means one cross section of coding phase φ(x, y).(2)Quantize the decimal coding phase φ(x, y) into the segmented integer fringe order k 00 (x, y): The segmented integer fringe order k 00 (x, y) is represented by a red dash-and-dot line in Fig. 5. (3)Generate a contrary fringe order k 01 (x, y): The contrary fringe order k 01 (x, y) is denoted as a black line in Fig. 6. (4)Find the jump pixel point in the segmented fringe order as follows: Fig. 7 One cross section of new fringe order Fig. 8 One cross section of wrapped phase and fringe order In Fig. 6a, b, and c denote the jump pixel points in the pixel axis.When the two segmented fringe orders satisfy Eq. ( 13), the pixels are saved in the jump pixel points matrix [a, b, c] x × 3 .( 5)Connect the segmented fringe order to a continuous fringe order k 1 (x, y) as follows: where s is the total pixels in each row, and s = 1024.( 6)Create a new fringe order by the shift half frequency of k 1 as shown below: where k 2 (x,y) is the shifted fringe order and k(x, y) is the new fringe order.Additional details are provided in the magnifying frame in Fig. 7.
(7)Obtain the continue phase Ψ(x, y) as follows: In Fig. 8, the blue line denotes the wrapped phase, and the red line represents the fringe order k(x, y).

Measurement of a long strip
A contrasting experiment of a long strip is first carried out to demonstrate the effectiveness of the proposed method.The width of sinusoidal fringe is 16 pixels.One group possesses a the width ratio between the sinusoidal fringe and each stair phase of phase-coding fringe of 1:1 (Fig. 9(a)).In this case, p = 16, N = 8 and S = 8.The other group involves a corresponding ratio of 1:2 (Fig. 9b), in which p = 32, N = 8 and S = 4.
The reconstructed 3D results of the long strip with two strategies are shown in Fig. 10. Figure 10a, b correspond to width ratios of 1:1 and 1:2, respectively.The errors in Fig. 10a can be attributed to incorrect fringe order.Figure 10b displays accurate results after using the proposed method.

Measurement of a foam holder
A foam holder with two large holes was also employed to compare experimental results using four methods, including Wang's, Zheng's, and Zhou's methods, as well as the proposed approach.The width of sinusoidal fringe is 32 pixels.Figure 11a shows a phase-coding fringe that uses Wang's method.Figure 11b displays a set of phasecoding fringes that adopts Zheng's technique.Figure 11c reveals a phase-coding fringe in gray-scale mode that employs Zhou's approach, and Fig. 11d shows a set of phase-coding fringes that utilizes the proposed method.The reconstructed 3D results are exhibited in Fig. 12a-d, the 3D shape result of the proposed method overmatches that of the others.The RMSs of the height errors in Fig. 12a-d are 0.066, 0.049, 0.043 and 0.035 mm respectively.

Measurement of isolated objects
Another experiment that includes a complex face model and a computer mouse was provided to demonstrate that the proposed method can measure isolated objects with complicated shapes.The object modulated by sinusoidal fringes is shown in Fig. 13a, the width of sinusoidal fringe is 16 pixels, and the object modulated by phase-coding fringes is shown in Fig. 13b.The 3D result with phase error compensation [26] is presented in Fig. 14.

Measurement of a standard gauge block
Four standard gauge blocks with different heights were measured using the proposed method to verify further the measurement accuracy.The measured area was approximately 500 mm × 800 mm.The width of sinusoidal fringe is 32 pixels, Fig. 15a, b show the four standard gauge blocks modulated by sinusoidal and phase-coding fringes, respectively.Figure 16 displays the 3D shape of the four standard gauge blocks obtained using the proposed method.Table 1 lists the absolute and RMS errors for each standard gauge block.The maximum absolute error is 0.041 mm, and the maximum RMS error is 0.033 mm.The quantitative analysis reveals the accuracy of the proposed method.

Discussion
To show when the proposed method have a better measurement result, the relationship between the stair and sub-period numbers are extensively analyzed.The long strip was measured again in this part, and the width of sinusoidal fringe is 21.33 pixels (Fig. 17a-d), and the period numbers while using the phase-coding fringe are 48, 24, 16, and 12.That is to say, the fringe frequency ratios are 1:1, 1:2, 1:3, and 1:4, respectively.The sub-period number of the phase-coding fringe is (S=) 4 for all.The stair number in a sub-period number of the phase-coding fringe is given by (N=) 12, 6, 4, and 3, respectively.Figure 18 shows the corresponding 3D results.From the results, two conclusions are noted.
One is that at the case of the different width ratio between the sinusoidal fringe and each stair phase of phase-coding fringe, the measurement achieves a better result when S is close to N. This finding is easily understood because the fringe order is readily identified correctly when N is small.The other is that the method can achieve measurement, although the phase-coding fringe intensity is lower.This condition is allowed because this fringe based on phase code is resistant to surface contrast variations, ambient light, and camera noises.The phase-coding fringe in Fig. 17d is presented as an illustration.

Conclusion
A modified stair phase-coding fringe was designed, and a new phase unwrapping algorithm based on stair phase-coding fringe was presented.This method used a large number of codewords as much as the resolution ratio of CCD allows, it can correctly judge the fringe order, achieving accurate phase unwrapping.The width ratio between the sinusoidal fringe and each stair phase of phase-coding fringe is set to 1: n.Compared with other methods, the proposed method adopts a lower number instead of numerous codewords.Therefore, the proposed approach gains two merits.One is that it can improve the measurement accuracy, the other is that it can measure isolated objects with complicated shapes.In our future work, two issues remain to be addressed: correction of the non-uniformity of the stair phasecoding fringe during large-scene measurements and encoding of a composite color pattern for the dynamic scene.

Fig. 3
Fig. 3 One cross section of the stair phase

Table 1
Experimental results on standard gauge blocks (Unit: mm)