Monday, August 17, 2009

Activity 13. Correcting Geometric Distortions


An image of a grid line was downloaded from the internet. The image of the grid line exhibited distortion. The dimension of the portion of the grid with no distortion were taken and used to compute and generate the ideal grid. The distorted image is shown in Figure 1.


Figure1. Distorted image

Now, the ideal vertex points can be derived from the distorted image considering Figure 2 and the following equations.

Figure2. Distorted and ideal image





Using the diagram, given equations and the vertices of the distorted image, the ideal grid vertex points were generated using Scilab. The vertices was obtained using the locate function in Scilab. The ideal grid points are shown in Figure 3.


Figure3. Ideal vertex points

The ideal grid was then generated using two methods: the nearest neighbor technique and the bilinear interpolation. The equations shown below were used in generating the ideal grid or image.






The ideal images generated using the two techniques are shown in Figure 4 and Figure 5.


Figure4. Bilinear Interpolation



Figure5. Nearest Neighbor Technique

As seen in the presented images, there is only a slight change on the distorted image after subjecting it to bilinear interpolation and nearest neighbor technique. There are only subtle differences between the images generated using the two techniques but, as expected, the image generated using bilinear interpolation exhibits a less distorted image than the image generated using the other technique. The lines in the image produced using bilinear interpolation is straighter and the gaps between squares are more uniform compared to the lines and spacing of the image generated using the nearest neighbor technique.

In summary, a distorted image was fixed using two different techniques: the bilinear interpolation and nearest neighbor technique. The results showed that the ideal image generated using bilinear interpolation is better than the image generated using nearest neighbor technique.


I will give myself 9/10 for this activity.

***Gilbert helped a lot in fixing the source code for this activity.

No comments:

Post a Comment