3D Modelling with Structured Light Gamma Calibration

. Structured light method is one of the non-contact measurement methods used for high resolution and high sensitive 3D modeling. In this method, a projector, camera and computer are used. Projector projects patterns that are generated with speciﬁc coding strategies onto the object that will be 3D modeled. Camera receives these patterns. By processing the images received by the camera, object is 3D modeled. Light intensity that is emitted from the projector generally not a linear function of the signal input. This causes brightness problems in the patterns projected. Thus, images received from the camera needs to the gamma corrected. In this study, gamma calibration method is proposed to overcome this problem. Test results show that proposed calibration system improves the accuracy and quality of the 3D modeling.


Introduction
With 3D modelling systems, complex surfaced objects can be realistically modelled and be shown on electronic systems with a high sense of reality [1].Because of these features the need for 3D modelling systems is increasing.One of the 3D modeling systems used in this field is structured light.Using this system, it is possible to produce 3D models of objects with high quality and high sensitivity [2].
A structured light method uses a projector and a camera as seen in Fig. 1.Projector projects specially formed structured light patterns onto the object.Camera transfers the pictures of the scene to the computer.These scene pictures are processed by the computer and 3D model is obtained [3].
Projected structured light pattern is distorted depending on the amount of depth of the object.Distortion of the structured light increases with the increase of the depth of the surface [4].3D model is obtained by using the distortions in the structured light.
In order for to work properly of 3D modeling system, it needs to be calibrated [5], [6].Calibration steps that are needed to be applied are gamma calibration, camera calibration, projector calibration, etc. [7].Among these, gamma calibration is very important.In this study, a structured light 3D modeling system is designed, and gamma calibration method is tested on this system.In the designed system, three phase shifting algorithm is used.This algorithm is chosen because it can provide high quality and high sensitive 3D modeling compared to other algorithms.
In the literature, there are various work on gamma calibration.Song Zhang et al. [8] suggested an error compensation method for a 3D measurement system working on phase shifting method.Study suggests that the main source of error is the nonlinearity of the gamma of the image produced by a projector.This error causes problems in sinusoidal signal and 3D model.With the proposed method problems in sinusoidal signals are corrected, problems in fringe images are reduced, studies performed for another source of errors caused by projectors gamma.
Li et al. [9] used gamma correction to reduce phase errors.Study conducted investigation on gammadistorted fringe images.Also study investigated phase errors, gamma distortion and defocusing-phase error and defocusing-gamma.
Wang et al. [1] proposed a 4 step application that can be used in fringe projection profilometry.At the first step, gamma correction of digital protection is applied.Second step included setting up system components.In the third step, a phase unwrapping is applied.At the last step, the system is calibrated by least-square inverse approach.
In this study by reducing the unnecessary process steps in the calibration, gamma calibration process is accelerated.Projection sourced gamma problems are corrected by calibration process, and an ideal 3D modelling is achieved.
Rest of the paper is organized as follows.Section 2 describes the working principle of 3D modeling system.Section 3 discusses Gama Calibration.Section 4 contains experimental results and section 5 is the concluding remarks.

Working Principle of 3D Modelling System
Flow diagram of a three-step phase-shifting algorithm is provided in Fig. 2. In the beginning, a calibration is performed for the system to work properly.Gamma calibration is one the most important one among these.
After calibration, projector projects first, second and third phase patterns onto the object in the given order.
Step II in Fig. 2 contains three phase patterns.Brightness signal formulations of these phase patterns are given in Eq. ( 1), Eq. ( 2), Eq. ( 3) respectively [10], [11], [12]: where I (x, y) is the average intensity, I (x, y) is intensity modulation.I is the intensity value that corresponds to x, y coordinates.Figure 3 shows the fringe pictures that correspond to sinusoidal signals.
Three different fringe patterns are projected onto the person to be modeled and these Pictures are taken.
Step III in Fig. 2 shows the pictures obtained after this process.Phase matrix is obtained with Eq. ( 4) by using I 1 , I 2 and I 3 intensity values of the phase pictures taken by camera [13], [14], [15].Phase: Wrapped phase matrix is obtained by applying phase wrapping to the phase matrix.The wrapped phase matrix is used to obtain depth matrix.Wrapped phase matrix Picture is shown in step IV of Fig. 2. Unwrap process is applied in step V.This process produces the depth map that contains the 3D modeling information.Figure of the depth map is shown in step V of Fig 2 .At the last step, 3D model is produced using all the depth maps that are produced in step V.

Gamma Calibration
Intensity of light produced by a physical device is not a linear function of the signal fed into the input of the device [16], [17].Examples of this phenomenon can be distortion of the brightness level of the light produced by a projector.Gamma correction can be formulated as in Eq. ( 5), [1].In the equation, I in is the signal at the input of the projector, I out is the signal at the output and γ is the gamma level of projector: Images projected by projectors have nonlinear functions.γ parameter, which is shown in Eq. ( 5), of the projectors has values in the range of 2.2 to 4.6 [1].This causes problems in projecting ideal fringe patterns.Thus, gamma calibration becomes a necessity.Gamma correction is performed through Eq. ( 6): where ImageIn is the input image, ImageOut is gamma corrected image and γcp is gamma correction parameter.
Ideal phase patterns of a system that models using structured light are shown in Fig. 4. For the analysis, top 5 horizontal strips are turned vertical and intensity produces a sinusoidal signal.Brightness analysis on each strip of this phase pattern results in a sinusoidal signal.This is shown in Fig. 4.This sinusoidal oscillates within the ideal boundaries.I max is the maximum Intensity value that Fringe Pattern gets and I min is the minimum intensity value.
Figure 5(a) shows the brightness curve when the contrast and brightness level of projector is low.Figure 5(b) shows the case where these levels are high.As it can be seen from both figures, gamma curve does not oscillate within ideal boundaries.Gamma calibration can overcome possible 3D modelling problems by taking problematic gamma curves into the ideal boundaries [1], [18].
Figure 6 shows the flow diagram of the designed Gamma calibration method.In the beginning, fringe pattern is projected onto the scene.In the second step, by analyzing the projected ideal brightness curve and obtained brightness curve is compared.In the fourth step, the brightness curve is taken to the ideal limit with appropriate gamma correction parameter.At the last step, this adjusted fringe pattern is projected.

Experimental Results
We performed several tests to see the effects of Gamma Calibration on the system.In these tests, by choosing different values of gamma correction parameter shown in step 4 of Fig. 6, resulting effects on 3D modeling performance are tested.
At first 3D modeling is performed with low gamma correction parameter (0.4).Resulting phase pictures and modeling results are shown in Fig. 7.As it can be seen from Fig. 7(c), number of points that generates the 3D model is reduced and ruptures occurred in 3D model.In the second step, 3D modeling is performed with high gamma correction parameter (1.2).Resulting phase and modeling pictures are shown in Fig. 8.As it can be seen from Fig. 8(c) there is a rupture around the neck of the model and this region is also misaligned.In the third step, 3D modeling is performed with ideal gamma correction parameter (0.8). Figure 9 shows the phase pictures and 3D modeling results for the ideal gamma correction value.As it can be seen from Fig. 9(c) an ideal 3D model is a result in the end.

Conclusion
In this paper, gamma calibration method is proposed for three-step phase-shifting method based structured light system.In the 3D modeling system, fringe patterns projected onto the subject can have faulty brightness levels.In order for the system to perform correct 3D modeling these fringe patterns need to go through gamma calibration process.Test results Show that gamma calibration enhances the correctness and quality of the 3D modeling.Trakya University Journal of Engineering Sciences.2012, vol.13, iss.2, pp.121-141.ISSN 1305-7766.

( a )
Fringe pattern obtained from low-level contrast and brightness projector.(b)Fringe pattern obtained from high-level contrast and brightness projector.