We are given this image of a capiz window:note that it has somewhat of a "fishbowl effect" where the lines are curved around the middle.
Procedure:
**An undistorted portion of the grid is chosen (where the window is parallel to the camera's optical plane), here I've chosen the upper left portion of the window.
**The dimensions of a square in this "ideal" part is measured in pixels (pixel-counting).
** The coordinates of the ideal grid vertex points are then generated, and these were used to compute for c1 to c8 in the following equations:
Procedure:
**An undistorted portion of the grid is chosen (where the window is parallel to the camera's optical plane), here I've chosen the upper left portion of the window.
**The dimensions of a square in this "ideal" part is measured in pixels (pixel-counting).
** The coordinates of the ideal grid vertex points are then generated, and these were used to compute for c1 to c8 in the following equations:
easier to treat in matrix form: and
where: and .
**If the resulting coordinate is integer-valued, the [greyscale] value is copied from the corresponding pixel of the distorted image onto the blank pixel. Otherwise, the interpolated greyscale value is computed using:
counting the top right capiz shell grid as (0,0), i chose capiz shells (1,3), (2,3), (1,4), (2,4), (1,5) and (2,5) because they seemed the least distorted to me.
the final "fixed" image is shown below:
There's still some distortion, but it is (to me) not as bad as the original image.
i give myself a grade of 9 for this activity. for although the distortion was fixed for the most part, there still some apparent distortion in some parts.thank you to jeric tugaff and cole fabros.
No comments:
Post a Comment