Have you ever observed bent lines that should actually look straight in images? Image distortions are introduced by the spherical lens used in capturing the image. There are two common kind of image distortion: barrel and pincushion. In barrel distortion, the image seems bloated in the middle and pinches at the sides where as in pincushion distortion, the image seems pinched in the middle and expanded in the boundaries [1]. Figure 1 shows an image of the Petronas Twin tower that exhibits barrel distortion.
Figure 1. http://www.photos-of-the-year.com/barrel-distortion/1.jpg
In this activity, we corrected distortions found in images. To be able to do the correction, the pixel locations and grayscale values of the image would be altered.
The first step in generating the undistorted image is to find the ideal pixel locations of the grids.
The first step in generating the undistorted image is to find the ideal pixel locations of the grids.
Let g(x,y) be the function describing the distorted image while the undistorted image is represented by the function f(x,y) . The transformation from the distorted to the undistorted image can be expressed by the equations,
From this equations, the distorted pixel locations is expressed by,
To be able to calculate the values of all the c's, four points are needed. These points should be near one another (corner points). Thus a set of c's for each set of corner points should be calculated.
After looking for ideal pixel locations, gray level interpolation techniques should be applied. For this purpose, we used the bilinear interpolation. In this method, the graylevel v at an arbitrary location (x, y) in the ditorted image can be found using the equation,
The four equations needed to compute for the four constants (a, b, c, d) maybe formed using the four nearest neighbor pixels encompassing the pixel point (x, y).
For this activity, we use the distorted image of a grid,
From this equations, the distorted pixel locations is expressed by,
To be able to calculate the values of all the c's, four points are needed. These points should be near one another (corner points). Thus a set of c's for each set of corner points should be calculated.
After looking for ideal pixel locations, gray level interpolation techniques should be applied. For this purpose, we used the bilinear interpolation. In this method, the graylevel v at an arbitrary location (x, y) in the ditorted image can be found using the equation,
The four equations needed to compute for the four constants (a, b, c, d) maybe formed using the four nearest neighbor pixels encompassing the pixel point (x, y).
For this activity, we use the distorted image of a grid,
image taken from: http://images.trustedreviews.com/images/article/inline/7690-FujiJ10barrel.jpg
The ideal grid point of this image was calculated using one of the grids that seems to be undistorted. Using the dimensions of this grid, the ideal grid points were recovered.
Applying the algorithm discussed above, the undistorted image was recovered.
The undistorted image still seems a little bit distorted. This maybe due to the fact that the corners(four neighbor points) used for the computation are relatively far from one another. In this case, the corner points of one hollow block compose a set.
For this activity I give myself a grade of 9.3. This is because I was able to recover the undistorted image. However it seems like the recovered undistorted image still have a little distortion.
I thank Jaya Combinido, Thirdy Buno, Miguel Sison and Jica Monsanto for useful discussions.
References:
[1] Activity 13: Correcting Geometric Distortion Manual
Applying the algorithm discussed above, the undistorted image was recovered.
The undistorted image still seems a little bit distorted. This maybe due to the fact that the corners(four neighbor points) used for the computation are relatively far from one another. In this case, the corner points of one hollow block compose a set.
For this activity I give myself a grade of 9.3. This is because I was able to recover the undistorted image. However it seems like the recovered undistorted image still have a little distortion.
I thank Jaya Combinido, Thirdy Buno, Miguel Sison and Jica Monsanto for useful discussions.
References:
[1] Activity 13: Correcting Geometric Distortion Manual
No comments:
Post a Comment