“Image Transformation and Perspective Correction Using Matlab”

Hamna Malik

Content Writer
Copywriter
Google Drive
Microsoft Office 365
WordPress
Introduction
Image transformation is an important aspect in the area of image processing, which includes operations such as scaling, translation, rotation, and changes of perspective. These transformations find high applications in most computer graphics and electronic imaging, as well as some areas of machine vision. This paper presents how these transformations were applied to an image by the forward and inverse transformations.
Operations in Image Preparation
The project starts by loading an image and then pre-processing it. A colored image is chosen and then converted to a grey-level image for simplicity in processing. The grey level image helps in retention of the basic features while reducing the computational complexity involved in the processing of the image.
Transformation Parameters
The parameters governing the transformation are defined as:
• Scaling Factors: These are parameters that determine how much the image is to be scaled along the x and y axes. It considers scaling factors of new_sx = 1 and new_sy = 1 for this project, meaning there will be no scaling.
• Translation Values: It defines by how much the image should be shifted along the x and y axes. In this case, it has translation values of tr_x = 0 and tr_y = 0, indicating there will not be any translation.
• Rotation Angles: These arguments specify the angels to be used for rotation about the x, y, and z axes. These angles are specified to be alpha = 45 degrees for rotation about the x-axis, beta = 0 degrees for the y-axis, and gamma = 0 degrees for the z-axis respectively.
• Perspective Parameter: The perspective transformation makes use of the focal length f = 1000.
• Process of Transformation
• There are many steps in this transformation.
• Transformation Matrices: There may be defined conversion matrices for scaling, translation, rotation, and perspective. They are combined to form an affine transformation matrix.
• Affine Transformation Matrix: It can be calculated by multiplying the individual transformation matrices such as scaling, translation, and rotation.
• Perspective Projection Matrix: In the perspective projection, first a particular vantage point is chosen after which a perspective transformation matrix is used. It is basically simulating the effect of viewing the image from a certain vantage point.
• Inverse Transformation Matrix: The inverse of the final transformation matrix is also calculated to allow reversal of the transformation.
To apply these transformations
Transformation Function The transformation function applies the defined transformations to an image. It applies mapping for every pixel in the input image using the transformation matrix to its new location in the transformed image. It involves:
• Forward Transformation without Perspective: The image is forwarded for transformation using only the affine transformation matrix and does not involve perspective projection.
• Forward Transformation with Perspective: It involves image transformation using both the affine transformation matrix and the perspective projection matrix.
• Inverse Transformation: The image is inverse transformed using the inverse of the combined matrix of transformation to reverse the perspective transformation.
Results and Analysis
The obtained images are analyzed as shown below:
• Original Image: It is the gray scale image that should serve as a reference for all the other images.
• Transformed Image without Perspective: This image is transformed using scaling, translation, and rotation without applying the perspective projection. This change in transformation affects only the orientation and position of the image without perspective distortion.
• Transformation with perspective-L: This will be the result of applying the perspective projection to a transformed image. It gives a 3D effect on the image; an image showing as if it is being looked at from an angle.
• Inverse Transformed Image: The image obtained after applying an inverse transformation to the perspective-transformed image. This step is taken to ensure that the transformation process has been correct and the original image is recoverable.
Conclusion
This project evidently applies different image transformations through specified parameters and transformation matrices, which includes scaling, translation, rotation, and perspective projection. It looks at all ways in which these varying image transformations can individually or simultaneously affect an image. Thus, the fact that one is able to reverse this transformation adds weight to the validity of the process. These techniques stand at the base of many different applications and form the fo
Partner With Hamna
View Services

More Projects by Hamna