7 Shape Measurement by Phase-Stepping Method Using Multi-Line LEDs

Three-dimensional shape measurement is used in various fields such as robotics and inspection of industry production. It is requested to measure shape with high speed and high accuracy. It is also requested to make the system compact and low-cost. It is, however, difficult to satisfy these requests simultaneously for 3D shape measurement. In order to measure shape in real-time, Kato et al. proposed a method using phase-shifting electronic moiré pattern (Kato et al., 1997). The authors developed integrated phase-shifting method for real-time shape measurement by a grating projection method using phase-shifting (Morimoto et al., 1999, Fujigaki & Morimoto, 2003). However, they showed only the phase distribution of the contour lines.


Introduction
Three-dimensional shape measurement is used in various fields such as robotics and inspection of industry production. It is requested to measure shape with high speed and high accuracy. It is also requested to make the system compact and low-cost. It is, however, difficult to satisfy these requests simultaneously for 3D shape measurement. In order to measure shape in real-time, Kato et al. proposed a method using phase-shifting electronic moiré pattern (Kato et al., 1997). The authors developed integrated phase-shifting method for real-time shape measurement by a grating projection method using phase-shifting (Morimoto et al., 1999, Fujigaki & Morimoto, 2003. However, they showed only the phase distribution of the contour lines.
In almost all conventional shape measurement methods, the optical systems are modelled and the parameters of the model are obtained with a calibration process using calculation of the geometrical parameters of optical devices such as positions of lens centres of a camera and a projector. However, the model cannot contain all of the information of the optical system such as lens distortion, intensity error of a projected grating, brightness linearity of a projector and a camera, etc. The less information causes measurement errors. Furthermore, it is time-consuming to calculate the spatial coordinates using the parameters.
In order to obtain a 3D-shape with grating projection method, the authors previously proposed whole-space tabulation method (WSTM) (Fujigaki & Morimoto, 2008a, Fujigaki et al., 2008b. The relationship between the coordinates and the phase of the grating recorded at each pixel of a camera is obtained as calibration tables in a three-dimensional space by experiment beforehand. Therefore the analysis is very fast because of looking at the calibration tables from the phase information at the pixel without any complex calculation. It provides fine resolution even when the phase distribution of the grating is not linear. The tabulation method is extended to a case of inaccurate phase-shifting of a grating by a projector using five-line light emitted diode (LED) light sources (Morimoto et al., 2010a(Morimoto et al., , 2010b. In this paper, a grating projector with nine-line LED light sources is newly developed. The phase-shifting usually uses a grating projector with a high resolution stage or a liquid www.intechopen.com Applied Measurement Systems 138 crystal display (LCD) projector. It is expensive and limits the speed of phase-shifting. The light-power efficiency of an LED is very high. The size of the light source is very small. It is easy and very fast to control the power and the switch on/off timing. The nine-line LED light sources are set in front of a grating. The switch for each LED line of the light sources is 'switch on'. The phase of the grating shadow is shifted by changing the switches for LEDs into 'on/off' in synchronization with the phase-shifting and the recording with the camera sequentially. Using the LED light sources for a grating projector, it is possible to make phase-shifting without any moving devices. The projector is low cost and high-speed. The authors call the method 'phase-stepping method using multi-line LEDs.' Even when the positions of the LED light sources are not so accurate, the error is almost cancelled by using the calibration tables obtained by the WSTM with the same experimental setup. This method will satisfy for shape measurement system high-speed, high accuracy, compact and low-cost.
In this paper, the theory and the system of shape measurement using the WSTM and the phase analysis methods using multi-line LED light-sources are explained. Furthermore, some experimental results of shape measurements using the system are shown.

Grating projection method
Figure 1 shows a schematic system for grating projection method. A grating with a cosinusoidal brightness distribution is projected by a projector. The grating projected on an object is deformed according to the shape of the object. The deformed grating is recorded by a camera and analyzed the deformed grating to obtain the shape. As analysis method of the deformed grating, phase shifting method which is the most popular accurate method, is used as mentioned next section.

Phase-shifting method
In shape measurement using grating projection method, phase analysis of the projected grating provides accurate results. In order to analyze the phase, there are many methods (Takeda & Mutoh, 1983, Asundi & Zhou., 1999, Sitnik & Kujawinska, 2002. Phaseshifting method is the most popular method. Let us explain the phase-shifting method. Figure 2(a) shows phase-shifted grating patterns projected onto an object. Figure 2(b) shows the brightness (intensity) distributions along the horizontal center line of Fig. 2(a). The intensity distribution is almost cosinusoidal. When a grating with a cosinusoidal brightness distribution is projected or displayed on a reference plane or an object, and the phase of the grating is shifted N times for one cycle, the k-th phase-shifted grating images can be expressed as follows: where I b (x, y) represents the background brightness in the image, which is insensitive to the change in phase. I a (x, y) represents the amplitude of the grating brightness and (x, y) is the www.intechopen.com Applied Measurement Systems 140 initial phase value. The phase distribution of the grating pattern can be obtained as follows (Srinivasan et al., 1984(Srinivasan et al., , 1985.
Usually N is selected as 3 or 4. If the number N of the phase-shifted moiré patterns is larger, the phase analysis becomes more accurate. In this study, N =4 and 6 are selected.

Whole-Space Tabulation Method (WSTM) (Fujigaki et al., 2008a, 2008b, 2009, Morimoto et al., 2009)
In grating projection method, the coordinates of a point on an object is usually calculated using the geometric positions of the lenses of a camera and a projector. If the distortion of lenses is considered, the calculation is complex and time-consuming. Therefore several methods using a reference plane or reference planes were proposed for accurate shape measurement (Zhou & Su, 1994, Asundi & Wensen, 1999, Su et al., 2004, Ha et al., 2004, Yen et al., 2006. For real-time shape measurement, it is required to calculate spatial coordinates from the phase values of the projected grating in short time. The authors previously proposed the calibration methods which used two or multiple reference planes (Fujigaki & Morimoto, 1996, Shinke et al., 2001, Ri et al., 2005. The calibration method was extended to a very large number of planes. All the relationships between the phase of the projected grating and the spatial coordinates can be obtained as calibration tables for each pixel of the camera. The method is called 'whole-space tabulation method' (WSTM). Let us explain the method.
Figure 1 also shows a schematic view of a shape measurement system by grating projection method and explanation of the principle of the calibration method using multiple reference planes. An LCD panel as a reference plane is set on a linear stage. The LCD panel is covered with a scattered film. The scattered film functions as a screen when a grating pattern is projected from the projector onto the reference plane. It is used to make calibration tables on the relationship between the phase and the z coordinate. The scattered film also functions as a backward screen when a grating patterns are displayed on the LCD panel to determine the x and y coordinates.
The LCD reference plane is set vertically to the z-direction. It is translated in the z-direction step by step. A camera and a projector are arranged and fixed in front of the reference plane. The grating is projected on the reference plane at first, and it is also projected on an object to be measured later. By translating the reference plane along the z-axis, a pixel of the camera records the intensities as images at the points P 0 , P 1 , P 2 …. and P N , on the reference planes R 0 , R 1 , R 2 …. and R N , respectively. And also, by recording the phase-shifted grating images, the phase distribution along the visual line L of a pixel of the camera is obtained.
In order to obtain the x and y coordinates on the reference plane, the phase-shifted gratings displayed on the LCD panel are taken by the camera. From these phase-shifted images, the calibration tables are formed to obtain the x, y and z coordinates from the phase at each pixel as shown in Figs. 3 and 4.  In the measurement procedure, an object is placed between the reference planes R 0 and R N . Phase-shifted gratings are projected onto the object and the phase distributions of the grating are analyzed from the phase-shifted grating images. The 3-D coordinates at each pixel are obtained from the phase value in high-speed by referring the calibration tables for each pixel.
This method is called the WSTM as mentioned already. It excludes the effect of lens distortion and intensity error of the projected grating in measurement results theoretically. Tabulation makes short-time measurement possible because the 3D coordinates are obtained by looking at the calibration tables from the phase at each pixel point of the camera and it does not require any time-consuming complex calculation.

Geometrical relationship among phase, phase-stepping amount and intensity of projected grating
Let us explain the principle of the phase-stepping method using multi-line LED light sources. Figure 5 shows that a grating is projected from the light sources. This figure shows in the case of four line LED light sources. If each line LED light source is switched on and off one by one sequentially, the shadow of the grating is moved. The equations of the geometric relationship among light sources, a grating and an object are derived using Fig. 6. In this figure, five line LED light sources are shown as an example. Now, the subscript number n is given to each line LED light source L, and the n-th line light source is set to L n (n=0, 1, 2, 3, 4). The light sources are mutually parallel and the five lines have regular intervals with the pitch l. The plane including the five LED line light sources is Fig. 6. Schematic of grating projection system and object in shape measurement system using five line LED light sources called an LED plane where z=0 with the field (x, y). The position of the first LED line L 0 is the origin O of the x, y, and z coordinates. In the LED plane, the x direction is normal to the LED lines, and the y-direction is the parallel to the LED lines. The z-direction is normal to the LED plane. The brightness distributions of the five line LEDs are assumed as uniform and equal in the x-and y-directions in the observation region at fixed z.
A grating plane is parallel to the LED plane, and the distance between the LED plane and the grating plane is d. The grating lines with pitch p drawn on the grating plane are parallel to the LED lines. The intersection of the grating plane and the z-axis is set to C and the distance between C and the origin E, i.e., the center E of the first grating line is set to e.
The transmissivity intensity distribution of the grating at z=d is denoted by the following equation.
where  is the phase, a g is the amplitude, b g is the intensity of background, x g is the xdirectional coordinate at the grating plane, that is, x g is the x-directional distance from the point C.
When the light source L 0 is switched on and the shadow of the grating is projected at the position S(x, y, z), the intensity at the position S(x, y, z) is expressed by the following equation. where it is considered that the intensity at a point is inversely proportional to the square of the distance z. As shown in Fig. 6, the point G of the grating is projected at the point S on the object. Only the n-th line LED light source L n is switched on one by one, and it is considered that the shadow of the grating is projected on the object.
The intensity distribution of the shadow projected through the grating from the light source L n has the following distribution shown at z.

Relationship among phase, phase-shift amount and height
When the shift amount  is obtained, the z-coordinate is determined using Eq. (9) as follows.
When the phase  is obtained, the z-coordinate is determined using Eq. (8) as follows.

Phase analysis by phase-stepping method by changing light sources
As shown in the case of and in Fig. 5, there are the positions where the phase shift amounts are 2/N (N is an integer). At the positions, the phase analysis becomes possible using Eq. (2). At the other positions, there are some errors in the phase value obtained using Eq. (2). However, if the relationship between the calculated phase  and z is a single-valued function at some region, the phase determination is possible in the region by combining the WSTM. The height is exactly obtained by looking up the tables of the WSTM even if the phase shifting method has a little error.

www.intechopen.com
Shape Measurement by Phase-Stepping Method Using Multi-Line LEDs 145 5. Experiment

Experimental setup
In this study, some experiments are performed to confirm the performance of the phasestepping method using line LED light sources. Figure 7 shows the schematic optical system of the experiment. Figure 8 shows the photograph of the LED board with 9 line LED light sources we developed. The LED has nine lines perpendicular to an x-axis, and slanting six lines. Here, the perpendicular lines are used. The pitch l of the LED lines is 0.5 mm. One line has 30 LED tips of a 0.35-mm square. A Ronchi grating is used as a grating. The pitch p of the grating is 0.5 mm. The interval d between the LED plane and the grating plane is 30 mm. The experiments are performed where the base level of z is 180 mm.

Experimental results
The experimental results were shown in Figs. 9 to 14. Figure 9 shows the intensity distributions in the x direction in the center of the y direction of the grating projected on the reference plane when the lighting line LED light sources were changed. In this figure, only five distributions are shown. .Although there is some random noise, the intensity distributions are almost cosinusoidal and the phase shift is also performed at equal intervals. Although this random noise is decreased by time averaging, any averaging is not used in this study to confirm the performance.
At first, only the first four lines of LED were used for the phase-stepping method and the phases are calculated using N= 4 in Eq.
(2). The phase distribution along the x-axis on the reference plane at z=180mm is shown in Fig. 10(a). Although the phase distribution is repeated from - to several times, the relationship between z and phase at a point of the reference plane for a 2 phase interval is shown in Fig. 10(b). The relationship is considerably curved although the relationship is almost straight line in theoretical treatment. However, by combining the WSTM, the errors will be cancelled by using the same optical system when the tables are used. Then the measurement is performed during a 2 phase interval without unwrapping of phase.
In the same manner, the phase distribution in the case of N=6 using the first six lines of LED is shown in Fig. 11. In both of the distributions in the x-direction and the z-direction, the relationships are almost linear. Thus, the linearity is different according to the value N. Next, height measurement was performed. As the specimen, the reference plane was used.
The results are shown in Figs. 12 and 13 and Tables 1 and 2. The average errors are less than 5 m, and the standard deviations are 11~19 m. Although the standard deviation in the case of N=6 is better than the one in the case of N=4, both have good accuracy.
As an example of shape measurement, the result of shape measurement of a face model cast is shown in Fig. 14. Although the measurement value shows unusual values in the edge part in small areas, almost all over the object is measured by the proposed method.

Conclusions
A new shape measurement method called phase-stepping method using multi-line LED light sources is proposed. A special LED array with nine line LEDs was developed. By using whole-space tabulation method (WSTM), a system using the multi-line LED light sources was developed. It could shift the phase of the projected grating easily. The principle and a system of the shape measurement using the phase stepping method using LEDs were shown. It was applied to three-dimensional shape measurement, and height has been measured with sufficient accuracy less than 20 m. It is possible to make a high speed, high precision, low cost, small size and wide-dynamic range system. It also excludes lens distortion and intensity error of the projected grating in measurement results theoretically.

Acknowledgments
This study was supported by Hyogo COE Program Promotion Project financially. We appreciate the support.