Monday, August 17, 2009

Act 13: Correcting Geometric Distortion

In this activity, we correct a barrel distortion in a given image, in this case a grid, using two methods: bilinear interpolation and nearest neighbor method. The image to be reconstructed is shown below:

We compare the image with an ideal grid constructed computationally in Scilab, which shall serve as the reference image.

The vertices of the grid will serve as reference points for the reconstruction. Firstly, the most undistorted image was located from the image, and the number of pixels down and across one box was counted. For each box, c1 to c8 was computed from the four corner points of the box, which is given by the equation below.

which is in matrix-vector notation

Since we are looking for the coefficients, we manipulate the above equation to

We then determine the location of those points in the ideal rectangle using


The locations of the distorted image were found using Scilab's locate function. The results were also rounded off so that they become integer-valued.

Using nearest neighbor method, the reconstructed image looks like this:

while using bilinear interpolation yields the image below.

As expected, the bilinear interpolation has better quality as compared to the grid reconstructed using nearest neighbor method.

For this activity, I will give myself a grade of 10/10 for accomplishing this activity. I would like to thank Gilbert for his tremendous help in this activity.

No comments:

Post a Comment