EFFECT OF DIGITAL FRINGE PROJECTION PARAMETERS ON 3 D RECONSTRUCTION ACCURACY

3D reconstruction has been already one of the most interesting research areas among photogrammetry and computer vision researchers. This thesis aims to evaluate digital fringe projection method in reconstruction of small objects with complicated shape. Digital fringe projection method is a novel method in structured light technique which integrates interferometric and triangulation methods. In this method, a digital projector projects a series of sinusoidal fringe patterns onto the object surface. Then, a camera from a different point of view captures images of patterns that are deformed due to object’s surface topography. Afterward, the captured images will be processed and the depth related phase would be calculated. Due to using arctangent function in the process of phase extraction, the computed phase ranges from –pi to +pi, so a phase unwrapping step is necessary. Finally, the unwrapped phase map would be converted to depth map with some mathematical models. This method has many advantages like high speed, high accuracy, low cost hardware, high resolution (each pixel will have a depth at end), and simple computations. This paper aims to evaluate different parameters which affect the accuracy of the final results. For this purpose, some test were designed and implemented. These tests assess the number of phase shifts, spatial frequency of the fringe pattern, light condition, noise level of images, and the color and material of target objects on the quality of resulted phase map. The evaluation results demonstrate that digital fringe projection method is capable of obtaining depth map of complicated object with high accuracy. The contrast test results showed that this method is able to work under different ambient light condition; although at places with high light condition will not work properly. The results of implementation on different objects with various materials, color and shapes demonstrate the high capability of this method of 3D reconstruction. * Corresponding author.


INTRODUCTION
As computer technology evolves, more and more methods for three dimensional sensing like laser triangulation, time of flight (TOF), structured light, shape from x, Digital Fringe Projection (DFP) and so on are developed.Digital Fringe Projection shape measurement is one of the most widely used techniques in practical applications of threedimensional (3D) shape measurements, including object detection, digital model generation, object replication, reverse engineering, rapid prototyping, product inspection, quality control, etc. (Gorthi et al. 2010).Digital fringe projection technique uses phase information to obtain height/depth information of free form surfaces.The system consists of a camera and a projector.Figure 1 illustrates a diagram of a 3D shape measurement based on digital fringe projection.A series of digital fringe patterns composing of vertical straight sinusoidal stripes are generated by computer.These sinusoidal stripes then are sent to a digital video projector.Digital projector projects fringe patterns on the surface of object.The object distorts the fringe images due to its surface topography, so that the vertical straight stripes are deformed.Next, a camera captures the distorted fringe images into the computer.The image of a projected pattern can be written as:  the phase to be solved for at pixel ) , ( y x .As we can see, equation (1) has three unknown parameters.Therefore to solve it, we need at least three similar equations.So, by generating three fringe patterns with similar characteristics except known shifted initial phase, we can solve them and obtain phase map.
Now, the computer analyses the fringe images to obtain wrapped phase map.Using above equations, the phase ) , ( y x  can be obtained as: It is called wrapped phase map because obtained phases are between   and   .This phase map is ambiguous and must become unwrapped.As it is shown in equation ( 5), to obtain phase map we used an arctangent function.Due to its nature, the results are real numbers between   and   .The phase calculated in this step is called wrapped phase because of ambiguities in number of  2 discontinuities.The process of determining the unknown integral multiple of  2 to be added at each pixel of the wrapped phase map to make it continuous by removing the artificial  2 discontinuities is referred to as phase unwrapping.Spatial phase unwrapping is carried out by comparing the phase at neighbouring pixels and adding or subtracting  2 to bring the relative phase between the two pixels into the range of   to   (Peng 2006).Thus, phase unwrapping is a trivial task if the wrapped phase map is ideal.However, in real measurements, the presence of shadows, low fringe modulations, non-uniform reflectivity of the object surface, fringe discontinuities, noise etc. (Gorthi et al. 2010).To overcome these shortcomings, the absolute phase value could be determined using additional code patterns.In the other word, we can search each pixels neighbourhood in time domain, rather than space domain.This method is called Temporal Phase Unwrapping.This paper aims to compare conventional Spatial and Temporal Phase Unwrapping Algorithms characteristics and overview advantages and disadvantages.Finally, depth information of each pixel can be computed based on interferometric approaches.The height information of the measured object is modulated in the measured phase, which can be extracted by using a phase to height conversion algorithm.This method calculates relative depth of each pixel with respect to a reference plane.The relative depth calculation approach does not need to know any calibration parameters.Besides, the speed of computation is much more than absolute method.
In order to convert phase to height, the relationship between the height and phase has to be established.A on the reference plane are imaged on the same pixel.By subtracting the reference phase map from the object phase map, we obtained the phase difference at this specific pixel:

P and
I are designed to be on the same plane with a distance l to the reference plane and have a fixed distance d between them, and reference plane is parallel to the device. Thus,

PID 
and CAD  are similar, the height of point D on the object surface relative to reference plane DB can be related to the distance between points A and B , or AC : AC for real measurement, this equation can be simplified as: Where, p is the fringe pitch on the reference plane in pixel.
Therefore, a proportional relationship between the phase map and the surface height can be derived.A simple calibration standard with a known height is used to determine the phase height conversion constant K (Zhang 2005).We use a step height with known height.First, we put it on the reference plane and project fringe patterns and capture images.Next, the absolute phase of step height is computed.Then, by subtracting phase of step height and reference plane, the phase difference for the known step height is determined.Finally, the K constant is calculated by dividing height of step height to phase difference.

TUNING PARAMETERS OF DIGITAL FRINGE PROJECTION SYSTEM
As fully-described in previous section, to get 3D model from DFP, there are four main steps.First, a sinusoidal pattern is projected on target object surface.Then, the image of these patterns that are deformed due to object surface topography, are captured by a camera.Afterward, these images are processed to extract phase map.This phase map contains information about depth of object.Finally, using some mathematical equations this phase map is converted to depth map.Although many researches have focused on different stages of digital fringe projection, there are some serious questions that are not responded, yet.This paper aims to investigate and evaluate the effect of different parameters used in a conventional DFP system.These parameters are the number of phase shifts, spatial frequency of the fringe pattern, light condition, noise level of images, and the color and material of target objects on the quality of resulted phase map (Babaei, 2012).For this purpose, four tests designed.First test, evaluates the effect of noise level of the captured image of deformed patterns.
In this test the frequency and spatial shift are kept constant.The phase map is then calculated in four scenarios using four sets of images with different SNR.This test was repeated for four different spatial frequencies and results got compared.
Second test investigates the relation between the number of phase shifts and quality of resulted phase map.In this test the phase maps whit four image sets with various number of phase shifts for two different spatial frequencies are computed.The resulted phase maps then compared to the reference phase map.
Next test aims to evaluate the effect of spatial frequency of fringe pattern on phase map.For this purpose six set of fringe patterns with different spatial frequency (per pixel frequency) and constant number of phase shift designed.The computed phase map of each set compared to the reference phase map.
The last test assesses the light condition on quality of phase map.Changing light condition in known and precise intervals is not practical, so we decided to change the contrast of fringe patterns.It can be interpreted as changing light condition.The Phase map calculated using four sets of patterns with different contrasts, and the results were compared.Next section will detail these tests and results.

TESTS AND RESULTS
In this section four tests which examine different parameters of a DFP system are stated in details and results are shown.

Noise Level
First test, evaluates the effect of noise level of the captured image of deformed patterns.In this test the frequency and spatial shift kept constant.The phase map is calculated in four scenarios using four sets of images with different SNR.The images with different SNR were computed averaging same image two, three and four times.Also, this test was repeated for two different spatial frequencies, 1/64 pixel and 1/1024 pixel.
Figure 2 illustrates a row in the phase map.As shown, the phase map computed from images with best SNR has lower variations.
Besides, the phase map with greater spatial frequency has variations than the smaller spatial frequency.The results showed in high spatial frequency the effect of SNR on phase map is very small and negligible, while in lower spatial frequencies the SNR degrades resulted phase map quality.

Number of Phase Shifts
A Second test investigates the relation between the number of phase shifts and quality of resulted phase map.(Liu, 2010) proved that increasing the number of shifts, the effect of noise and gamma decreases.To examine this, the phase maps whit four image sets with three phase shifts, five phase shifts, seven phase shifts and 10 phase shifts and 1/128pixel spatial frequency were computed.The resulted phase maps then compared to the reference phase map which was created by a set of 50 fringe images.As expected, the results show that increasing the number of phase shifts increases the quality of phase map.This test repeated for a 1/2048 pixel spatial frequency.
Comparing these results revealed that in high spatial frequency, the amount of error is much less than the same condition in lower spatial frequencies, which means using the high spatial frequency with fewer fringe shift works as using a lot of number of shifts in lower spatial frequency.Table 1 shows the average phase error (difference with reference phase map) for various phase shifts for two spatial frequencies.This point is already observable in some parts of phase map.For example, a dark target stuck to the statue is demonstrated in figure 3.As shown, the target is flat and there is no variation in depth in target and it's around.So it is expected that it does not exist any anomaly in phase map.Contrarily, in the phase map calculated with 3 shifts, there is a phase variation between target and around.Increasing the number of phase shifts, these variations tend to disappear.
Figure 3. Phase maps of a dark target with 3 shifts (left), 5 shifts (middle) and 10 shifts (right)

Spatial Frequency
Next test is done to evaluate the effect of spatial frequency of fringe pattern on phase map.For this purpose six set of fringe patterns with 1/64, 1/128, 1/256, 1/512, 1/1024 and 1/2048 per pixel frequency and constant number of phase shift designed.
The computed phase map of each set compared to the reference phase map.Table 2 shows phase error (difference with the reference phase map which was computed with 50 fringe image).
From the table 2, it can be inferred that increasing spatial frequency would increase the gray value differences in pattern images and decrease errors.To illustrate this, the phase map of a dark region that is computed from two series of images with 1/64 pixel and 1/2048 pixel spatial frequency has showed in figure 4. It is observable that the target is in a flat area, but because of its color, in the lower spatial frequency phase map it has anomaly, while in phase map of 1/64 pixel spatial frequency there is no obvious error.The results showed that there is no meaningful change in quality of phase map for three first sets, but in the last set of fringe patterns with contrast of 50, the error was 0.0354 radians and it was not negligible.

Target Object
The drawback of many 3D capturing systems including structured light systems and laser profilers is the type of the material and colour of the targets.Many of systems fail in dark coloured object, colourful objects and objects with specular surface like metal and fiberglass.To evaluate effectiveness of Digital Fringe Projection System, three objects with different material and colour were captured.A specular ceramic test field, a white plaster sculptor and a black fiberglass detailed sculptor were reconstructed.The results of reconstruction are shown in figures 5. As demonstrated in figures, even in a very detailed and dark coloured object, this method successfully reconstructed all the details.
Figure 5. target objects with different material and colours and their 3D reconstructions

CONCLUSION
This paper aimed to evaluate effective parameters on accuracy of a digital fringe projection system and the amount of these influence.For this purpose five tests were implemented to assess this parameters, namely, noise level, spatial frequency, number of phase shifts, lighting condition and target object condition (material type and colour).First test, evaluates the effect of noise level of the captured image of deformed patterns.The results showed in high spatial frequency the effect of SNR on phase map is very small and negligible, while in lower spatial frequencies the SNR degrades resulted phase map quality.
Second test investigated the relation between the number of phase shifts and quality of resulted phase map.In this test the phase maps whit four image sets with three phase shifts, five phase shifts, seven phase shifts and 10 phase shifts for two different spatial frequencies are computed.The results show that increasing the number of phase shifts increases the quality of phase map.The other result is that in high spatial frequency, the amount of error is much less than the same condition in lower spatial frequencies.Next test evaluated the effect of spatial frequency of fringe pattern on phase map.The results revealed increasing spatial frequency reduces the effect of noise and other errors.The mean error of highest frequency (1/64) was about 0.0072 radians while the lowest frequency (1/2048) has a mean error of 0.0623 radians.The last test assesses the light condition on quality of phase map.It was assumed that changing the contrast of fringe patterns can be interpreted as changing lighting.The Phase map calculated using four sets of patterns with different contrasts.The results showed that there is no meaningful change in quality of phase map for three first sets, but in the last set of fringe patterns with contrast of 50, the error was 0.0354 radians and it was not negligible.The final test evaluated effectiveness of DFP method to different objects with various material and color.The reconstructed 3D models showed that this method can capture 3D model of a white plaster sculptor models as well as a highly detailed black fiberglass object.Concluding, the Digital Fringe Projection Method is a powerful and capable method which can overcome many drawbacks of other methods of 3D capturing and modeling.Although, there are many other aspects which need to be studied more.

Figure 1 .
Figure 1.Schematic diagram of DFP systemThe schematic diagram of the system is illustrated in Figure1.Points P and I are the perspective centres of the DLP projector and that of the CCD camera, respectively.The optical axes of the projector and the camera coincide at point O .After the system has been set up, a flat reference plane is measured first whose phase map is used as the reference for subsequent measurements.The height of the object surface is measured relative to this plane(Zhang 2005).From the point view of the camera, point D on the object surface has the same phase value as point C on the reference plane,

Figure 2 .
Figure 2. a row of phase map with 1/64 pixel(up) and 1/1024 pixel (down) spatial frequency with different SNR in different colors

Table 2 .
Comparison of phase errors with different spatial frequenciesThe results revealed increasing spatial frequency reduces the effect of noise and other errors.The mean error of highest frequency (1/64) was about 0.0072 radians while the lowest frequency (1/2048) has a mean error of 0.0623 radians.

Table 3 .
Phase error due to different lighting condition.