Lect 5
Lect 5
• Properties:
• Preserves shape and size: The image content is not distorted.
• 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
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: