Horje
Geometric Transformation in Image Processing

Image processing is performed using lots of mathematical tools. One such tool is geometric transformation. Geometric transformation in image transformation consists of two steps, namely spatial transformation of pixels or coordinates and intensity interpolation. Intensity interpolation is used to assign the intensity value of pixels after spatial transformation. The geometric (or spatial) transformation, T of an image is done on a pixel-by-pixel basis. The pixel having coordinate (x, y) will be moved to coordinate (x’, y’). That is, the coordinate (x’, y’) of the output image will have the intensity value of the coordinate (x, y) in the input image. The geometric transformation is given by the equation in matrix form:

[Tex]\begin{bmatrix} \\x’ \\y’ \end{bmatrix}= T\begin{bmatrix} \\x \\y \end{bmatrix}= \begin{bmatrix} \\a &b \\c& d \end{bmatrix}\begin{bmatrix} \\x \\y \end{bmatrix}[/Tex]

where, (x, y) is the input coordinate, (x’, y’) is the output coordinate, T is the geometric transformation matrix.

Thus, geometric transformations expounded upon via the use of mathematical operations through transformation matrices, serve as useful tools for image enhancement, restoration, and analysis and are therefore important in both practical and theoretical applications in the fields of image processing as well as computer vision.

Relation between Image Processing and Geometric Transformation

Geometric transformation is a mathematical tool used in image processing. Geometric transformation is used in an image to adjust its spatial arrangement of pixel. For example, in operations like scaling, rotation, and translation where pixel coordinates are changed, we use geometric transformations. Geometric transformations in image processing are also called rubber-sheet transformations. This is due to the fact that geometric transformation in image processing is equivalent to the operations performed on a rubber sheet containing the input image. The sheet can be stretched, sheared, rotated, and so on. When these operations are done, the image which is visible on the sheet is the output image.

Another important feature of images in Geometric Transformations is that the alteration of such image attributes is significant in image processing as it helps in changing the aspect of the image to fit the analysis or visualization requirements. These operations, changes in image geometry, generate better alignment of images, extraction of features, and improve image data for further process or analysis.

Different Types of Image Transformation Used in Image Processing

1. Translation

Translation displaces an image by a certain amount of pixels about the x and y axis. This operation translates the image in a way such that every pixel in the image will be shifted to a new position maintaining the shape and size of the image.

2. Rotation

Rotation is basically the process by which an image is simply rotated around the origin or an image center by a given angle. This one rotates the image or changes the orientation of an image depending on the angle it has been set to.

3. Scaling

Scaling enables one to make the image larger or smaller in size or as it is known as scaling it copies or reduces the image proportionately to the original size. Most scaling methods preserve aspect ratio, but the general scaling is achieved by changing the dimension on different axes unlike other methods.

4. Shearing (Skewing)

Except that Shearing displaces the pixel in one direction and as a result causes an inclined output to be produced. Identical to the rotation transformation, this transformation changes the angles between the axes of the image.

5. Affine Transformation

Affine transformation can be defined as translation, rotation, scaling, and shearing at once. It maintains the ‘perpendicularity’ of the pairs of lines and the ratio between points but not angles or lengths. The commonly used and known geometric transformation is the affine transformation. Affine transformation includes scaling, rotation, translation and shearing. In two dimensions, these transformations preserve points, straight lines and planes. This is the key characteristic of affine transformation. That is, the collinearity between points, parallelism between lines, and convexity of planes are not affected due to affine transformations.

All the affine transformations except translation, can be represented using a 2 X 2 matrix. But for representing translation, we require a 3 X 3 matrix. Hence, a 3 X 3 matrix, A (affine matrix) is used for affine transformation. An affine matrix has an important characteristic of being invertible. The affine transformation can also be expressed using linear equations of matrix and vectors of order 2. The affine transformation is given by the equations in matrix form:

[Tex]\begin{bmatrix} \\x’ \\y’ \\1 \end{bmatrix}=A\begin{bmatrix} \\x \\ y \\1 \end{bmatrix}= \begin{bmatrix} a &b &c \\ d&e &f \\ 0& 0 &1 \end{bmatrix}\begin{bmatrix} \\x \\y \\1 \end{bmatrix}[/Tex]

where, (x, y) is the input coordinate, (x’, y’) is the output coordinate, A is the affine transformation matrix.

6. Perspective Transformation

Parallax shifts the appearing image perspective until the parallel lines appear to be meeting at the vanishing points. Perspective transformation is also known as projective transformation and homograph. It is a geometric transformation where a point from one plane is mapped to another plane. This makes the object appear from different points of views or perspectives. Perspective transformation has application in the field of computer vision as it is involved in tasks like image stitching, camera calibration and 3-D reconstruction.

The perspective transformation is mathematically represented using a 3 X 3 matrix, H (homograph matrix). The affine transformation is given by the equations in matrix form:

[Tex]\begin{bmatrix} \\x’ \\ y’ \\w’ \end{bmatrix}=H\begin{bmatrix} \\x \\y \\1 \end{bmatrix}=\begin{bmatrix} a &b &c \\ d &e &f \\ g &h &i \end{bmatrix}\begin{bmatrix} \\x \\y \\1 \end{bmatrix}[/Tex]

Here,

w’x’ = ax + by + c

w’y’ = dx + ey + f

w’ = gx + hy + i

To find x’ and y’, we need to normalize them with respect to w’. Thus the coordinate equations for perspective transformation are:

[Tex]x’=\frac{ax+by+c}{gx+hy+i_{}} y’=\frac{dx+ey+f}{gx+hy+i}[/Tex]

Geometric Transformation in Image Processing

Geometric Transformation in Image Processing

Types of Affine Transformation

Geometric transformations are based on the mathematical transformations in which the operations on the coordinates of the points of an image are performed. Such operations are always depicted by transformation matrices. For example:

Translation

[Tex]\begin{bmatrix} x’ \\ y’ \end{bmatrix} = \begin{bmatrix} x + \Delta x \\ y + \Delta y \end{bmatrix} [/Tex]

Rotation

[Tex]\begin{bmatrix} x’ \\ y’ \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} [/Tex]

Scaling

[Tex]\begin{bmatrix} x’ \\ y’ \end{bmatrix} = \begin{bmatrix} s_x & 0 \\ 0 & s_y \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} [/Tex]

Shearing

[Tex]\begin{bmatrix} x’ \\ y’ \end{bmatrix} = \begin{bmatrix} 1 & k_y \\ k_x & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} [/Tex]

Perspective Transformation

What is Perspective Transformation?

Overview

Parallax is very much similar to perspective transformation where lines that are parallel are made to appear as though they are becoming joined at some certain now-where points called vanishes points. Since the perspective transformations do not map parallel lines to parallel lines or distances to distances, they are advantageous for obtaining 3D like effects in the images.

Characteristics

  • Vanishing Points: Projections of parallel lines on the scene intersect at a vanishing point in the image captured on the frame.
  • Depth Perception: This operation gives an impression of depth by changing the spatial position of the objects in the created image.

Mathematical Representation

Perspective transformation is some how related to a matrix of order 3*3 where co-ordinate points of the two planes can be transformed. The transformation is defined by:

[Tex]\begin{bmatrix} x’ \\ y’ \\ w’ \end{bmatrix} = \begin{bmatrix} h_{11} & h_{12} & h_{13} \\ h_{21} & h_{22} & h_{23} \\ h_{31} & h_{32} & h_{33} \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} [/Tex]

where (?′,?′) are the coordinates in the transformed image, and ?′ is the normalization factor.

Implementation

Geometric transformations require identification of the type of transformation to be done and its parameters, generation of the required transformation matrix, application of the matrix to the image coordinates, and use of interpolation methods to determine the intensity of the pixel at a new location.

Examples

Example 1: Translation

Translate an image by 50 pixels in the x-direction and 30 pixels in the y-direction.

[Tex]\begin{bmatrix} x’ \\ y’ \end{bmatrix} = \begin{bmatrix} x + 50 \\ y + 30 \end{bmatrix} [/Tex]

Example 2: Rotation

Rotate an image by 45 degrees counterclockwise.

[Tex]\begin{bmatrix} x’ \\ y’ \end{bmatrix} = \begin{bmatrix} \cos(45^\circ) & -\sin(45^\circ) \\ \sin(45^\circ) & \cos(45^\circ) \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} [/Tex]

Advantages and Disadvantages of Geometric Transformation in Image Processing

Advantages

  • Versatility: Applicable to most of the image processing problems.
  • Precision: Enables fine tuning of the image processing operations that are to be performed.
  • Combination: The given transformations are not mutually exclusive, which means that one can apply several of them simultaneously.
  • Restoration: Involve in image rectification the process of assembling images.
  • Animation: Helpful in preparing animations as well as simulations.

Disadvantages

  • Complexity: As with any other optimization problem can be mathematically complex.
  • Artifacts: May introduce artifacts when interpenetrating the signal.
  • Computational Cost: Can be very complex hence the computations may be very many thus taking a very long time to complete.
  • Accuracy: A precision may be lost in some transformations.
  • Implementation: Neat and should be very well done to ensure that no mistakes are made.

Applications of Geometric Transformation in Image Processing

  • Image Registration: Registering images from various views or from multiple sensors.
  • Object Recognition: Recognition of objects contained in a given picture.
  • Computer Vision: Improving media related to machine vision.
  • Medical Imaging: Registration and comparison of MR/CT images.
  • Remote Sensing: Geographical information system and analysis of satellite and aerial images.
  • Robotics: Navigation assistance of robots from the image analysis.
  • Augmented Reality: Putting digital content on real world views.
  • Cartography: Spatial changes and the altering of maps and geographic information.
  • Digital Art: Exploration in the generation and modification of a digital creation.
  • Video Processing: Stabilizing and transform frames in the captured video.

Conclusion

Image rotations and transformations are among the core facets of images as they provide generalized methods of managing and analyzing the images. They can also be easily and accurately rotated and scaled and reshaped and translated which make them useful in applications in areas such as medical imaging and remote sensing and computer vision. Although there may be some disadvantages such as computation and interpolation issues, their ability to improve image quality and to help with certain analyses outweighs the pros. Sustaining these transformations provides practitioners with the appropriate technology for formulating radical solutions and improvements in the image processing techniques.

Geometric Transformation in Image Processing – FAQs

What is the definition of a geometrical transformation in the context of digital image processing?

Geometric transformation is the modification of an image by applying geometric transformations that include movement, rotation, scaling, and skewing with intent of changing the place, direction, size or form of the image without any regard on the content of the image.

A transformation matrix is used in geometric transformations through the following way.

A transformation matrix specifically describes a set of mathematical values that when incorporated with the coordinates of the pixels when implementing an image reshaping process, it achieves the desired result. It is notable that different matrices call for different transformations like translation, rotation, and scale.

That is describing the interpolation styles that are commonly used in geometric transformations.

The interpolation methods most frequently used are nearest neighbor method, bilinear and bicubic interpolation. These methods were further used to obtain quadratic interpolation in order to estimate non-integer pixel values, coming out from the transformation process, to give smooth and exact output images.

In what areas can geometric transformations be used?

Geometric transformations are applied in image registration, object recognition, computer vision, medical imaging, remote sensing, robotics, augmented reality, cartography, digital art and video processing.

What are the main challenges of geometric transformations?

Lamidi’s and Eakins (2003) and Robinson and Sinton (2004) were identified major issues which includes computational complexity, prediction errors caused by interference, precision issues, which impede the image manipulation and analysis.




Reffered: https://www.geeksforgeeks.org


Electronics Engineering

Related
Applications of Photodiode Applications of Photodiode
Difference Between Static CMOS and Dynamic CMOS Difference Between Static CMOS and Dynamic CMOS
Binary Image Binary Image
Applications of Full Wave Rectifier Applications of Full Wave Rectifier
Difference Between VLSI and Embedded Systems Difference Between VLSI and Embedded Systems

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
20