Wednesday, March 10, 2010

3D Reconstruction using Gray Code Illumination

Introduction

Gray code illumination (GCI) is one of the many techniques in rendering a 3D reconstruction of an object. It is a non-invasive technique, where only images of object are taken, under different pattern projection conditions. Another advantage is that it is insensitive to ambient illumination.
GCI works on the idea that patterns illuminated against a flat background will be distorted by objects placed against the background. These distortions are the cues to the shape of the object.

Gray code patterns
The patterns projected are a series of black and white stripes in the Gray code pattern. Each pattern has a bit weight, which is multiplied to the pattern itself. When these weighted patterns are summed, we now have what is called the bit plane stack (BPS). Each column in the BPS has a unique number. The distortion of this BPS due to the object is what we will keep track. Without the object, we have a background bit plane stack (BBPS). With the object, we have the OBPS.


Figure 1. Making the bit plane stack by summing the gray code patterns multiplied by the corresponding bit weights.

Methodology

Gray code patterns (Figure 2) are projected against a white background. Their images are taken, which will serve as the references for the distortion. The 3D object to be reconstructed is placed against the same white background. Several images of black and white patterns in the Gray Code configuration is projected onto the 3D object. For each gray code pattern, two images are taken. One is for when the object is present, and one is for background, in the absence of the object.


Figure 2. Object and background illuminated by different gray code patterns.

The images are then binarized. Each binarized image (from the background and object) is multipled by its corresponding bit weight, and added to make the background bit plane stack and object bit plane stack (Figure 3).



Figure 3. Left: Object bit plane stack. Right: Background bit plane stack


In the bit plane stacks, each stripe or color is a unique number. The shape of the object manifests in the distortion of the object bit plane stack. For each color, the displacement of the stripe is taken by subtracting the right-side edges. The differences are now the height of the object. The resulting 3D surface is plotted below (before and after median filtering).


Results


Reconstruction of the 3D surface 3 levels, which correspond to the levels of the pyramid. However, noise is still present, seen as sharp peaks in the height reconstruction (Figure 4a). This is remedied by applying median filtering. The resulting surface reconstruction is now smoother (Figure 4b).


The heights of each level are not the same, with the lowest level being the thickest.



(a) (b)

Figure 4. Left: Reconstruction before median filtering. Right: Reconstruction after median filtering.



To summarize, different patterns in Gray code configurations were used to successfully reconstruct a 3D surface. Several noise filtering methods were applied in the intermediate steps of the whole process. I give myself 10 points for this activity.


Many many thanks to Kaye for guidance in implementing the algorithms for this activity.

0 comments:

Post a Comment