Friday, March 5, 2010

Activity 8. Gray-Code Illumination Technique in Rendering 3D Objects

Gray Code Illumination Technique

Gray-code illumination is usually used in rendering 3D shapes and structures. Unlike other methods that render 3D objects, e.g. photometric stereo and stereometry, this method requires only one surface view of the objects. Another good thing about this method is non-invasive.

Methods
The detailed method used in this activity is completely adapted and thus can be seen from the work of K. Vergel and M. Soriano [1] and this method is used with the help of K. Vergel.

Gray-code illumination uses binary patterns that are projected along the Y-axis. In our activity, we used black and white stripes with respective logical values of 0 and 1. n patterns result to 2^n unique code sequence. Patterns with higher stripe frequency result to a more accurate 3D reconstruction.
Figure1. Bit planes and bit-plane stack.

Figure 1 demonstrates how this method works. Three stripe patterns (called bit plane) are projected one at a time, and stacked together (bit plane stack) as shown. For n=3, we have 8 unique code sequence (see Table). Each row corresponds to a pattern while each column corresponds to a single light plane. If a line is drawn (blue line) through the stack of planes, we see that that line has a unique label provided by the logical value of the patterns. This label is the unique code sequence for that plane (column) which enables a one-to-one correspondence betweem the image location and points on the object plane.

Figure 2. The experimental set-up.

Figure 2, shows how the object's dimensions are computed using this method. First, the stripe patterns fromo the projector P are projected unto the Q plane. Lines PU and PK are imaged by the camera C into U'(i, j) and V'(i, j), respectively. The camera will record the images of the stripe patterns without any distortion and this is our 'control' for our activity. After which, the 3D object with height z(x,y) is placed on plane Q. This time, the previous projection of lines PU and PK are now represented by new points G and F. These new points are now projected in the camera as U'(i, j) and V'(i, j*). The shift in the pixel (or line distortion of the patterns) are measured as
From Figure 2, the height of the image can now be computed using the following equation.

In this activity, we tried to render a pyramid using eight stripe patterns. The setup is calibrated by K.Vergel, and the processing is done using the ever useful Matlab.

Results

Figure 3. Stripe patterns on plane Q.

Figure 4. Distorted stripe patterns projected unto a pyramid.

Shown in Figures 3 and 4 are the patterns projected unto plane Q and unto the pyramid object. Figure 5(a,b) shows the reconstructed 3D object viewed from two different angles.


(a)

(b)

For finishing touches, the median filter is used for smoothened surface shown in the figure below.
For this activity, I give 10+ 2 points since I put in a lot of effort and finished it well. (wink*) Kaye, ayos tong thesis mo. :)

Thanks to Irene, and Kaye! The best kau. (ehem... Thirdy, oo na, kaw na pinakamagaling sa kanila sa matlab. hehe)

References:
[1] K. Vergel, M. Soriano. Volume estimation from partial view through gray-code illumination technique. Proceedings of the Samahang Pisika ng Pilipinas, Oct 2008.

No comments:

Post a Comment