0% found this document useful (0 votes)
15 views10 pages

Lect 5

ai

Uploaded by

AVINASH GAWAI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

Lect 5

ai

Uploaded by

AVINASH GAWAI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Image transformation

• Image transformation refers to the process of applying mathematical


operations to an image to change its appearance, geometry, or
structure.

• This can involve modifying the image's position, orientation, size,


shape, or pixel values to achieve specific effects or to prepare the
image for analysis or further processing.
Translation

• Translation: Shifting an image horizontally, vertically, or both. This is


achieved by adding a fixed value to the coordinates of each pixel.

• Properties:
• Preserves shape and size: The image content is not distorted.

• No change in orientation: The image retains its original direction.


Rotation
• Image rotation is a geometric transformation that changes the orientation
of an image by rotating it around a specific point, typically the image's
center.

• This process involves shifting the position of the pixels in the image in such
a way that it appears as if the image has been turned around a central axis.
Rotation is commonly used in various applications like image editing,
computer vision, and image analysis.
Key Concepts of Image Rotation
1.Rotation Angle:
1. The degree by which the image is rotated, measured in degrees.
2. Positive values usually indicate a counterclockwise rotation, while negative values indicate a
clockwise rotation.

2.Center of Rotation:
1. The point around which the image is rotated.
2. By default, this is the center of the image, but it can be any point in the coordinate system.

3.Interpolation:
1. When rotating an image, the new pixel positions may not align perfectly with the original grid.
2. Interpolation methods like nearest-neighbor, bilinear, or bicubic are used to calculate the new
pixel values.
Mathematical Representation
• The rotation of a point (x,y
• around the origin by an angle θ can be represented using the
following transformation matrix:

Where:
• (x′,y′) are the coordinates of the rotated point.
• θ is the rotation angle.
Scaling

• Image scaling is the process of resizing an image by changing its


dimensions.

• This operation can involve enlarging or reducing the image's width


and height, and it is commonly used in various applications like image
editing, computer vision, and graphic design.
Key Aspects of Image Scaling
1. Scaling Factors:
1. Uniform Scaling: The same factor is applied to both the width and height,
preserving the image's aspect ratio. For example, doubling both dimensions
will maintain the proportions of the image but make it twice as large.

2. Non-Uniform Scaling: Different factors are applied to width and height,


which alters the aspect ratio. For example, scaling the width by 2 and the
height by 0.5 will stretch the image horizontally and compress it vertically.
2. Aspect Ratio:
• The ratio of the image's width to its height. Uniform scaling preserves
this ratio, while non-uniform scaling changes it, potentially distorting
the image.

3. Interpolation Methods:
• When scaling an image, especially when enlarging it, new pixel values
are computed based on existing pixels. Different interpolation
methods are used to estimate these values:
• Nearest-Neighbor Interpolation: Assigns the value of the nearest pixel. It is
fast but can produce blocky artifacts.
• Bilinear Interpolation: Averages the values of the four nearest pixels to
produce smoother results than nearest-neighbor.
• Bicubic Interpolation: Uses the closest sixteen pixels to produce very smooth
results, often preferred for high-quality scaling.
Mathematical Representation
• Scaling can be represented by a scaling matrix SSS. For uniform
scaling with a scaling factor sss:

• For non-uniform scaling with scaling factors sxs_xsx​ and sys_ysy​ for
the x and y directions:

You might also like