Image Transformation
Dr. Ansuman Mahapatra
Assistant Professor
Dept. of CSE, NIT Puducherry
What is image transformation?
• Image transformation refers to the process of applying various
operations or functions to an image to change its appearance,
structure, or representation.
Application of Image Transformation
• Image Enhancement
• Improving contrast and brightness
• Reducing noise
• Sharpening details
• Image Compression
• Reducing file size for storage and transmission
• Lossy and lossless compression techniques
• Geometric Transformations:
• Translation: Moving an image from one location to another within the coordinate
system.
• Rotation: Rotating an image around a specified point, usually the center.
• Scaling: Changing the size of an image, either enlarging or reducing it.
• Shearing: Shifting one part of an image in a particular direction while the other part
remains fixed.
Application of Image Transformation
• Affine Transformations: These are combinations of linear
transformations (translation, rotation, scaling, and shearing) that
preserve points, straight lines, and planes.
• Perspective Transformations: Changing the perspective of an image
to simulate a change in the viewpoint from which the image is seen.
• Intensity Transformations:
• Brightness Adjustment: Changing the overall lightness or darkness of an
image.
• Contrast Adjustment: Changing the difference in color and brightness in
different parts of an image.
• Histogram Equalization: Improving the contrast of an image by stretching out
the intensity range.
Application of Image Transformation
• Filtering and Convolution:
• Blurring: Smoothing an image to reduce noise and detail.
• Sharpening: Enhancing the edges within an image to make it appear clearer.
• Edge Detection: Identifying the boundaries within an image.
• Color Transformations:
• Grayscale Conversion: Converting a color image to a grayscale image.
• Color Space Conversion: Changing an image from one color space (e.g., RGB) to
another (e.g., HSV).
• Morphological Transformations:
• Dilation: Expanding the boundaries of objects in an image.
• Erosion: Shrinking the boundaries of objects in an image.
• Opening and Closing: Combining dilation and erosion to remove noise or small
objects.
Application of Image Transformation
• Fourier Transform: Converting an image from the spatial domain to
the frequency domain, which is useful for analyzing the frequency
components of the image.
Fourier Transform
• Transforms a function or signal from its original domain (often time or
space) into the frequency domain.
• This transformation reveals the frequency components that make up
the original signal.
• Time Domain vs. Frequency Domain: In the time domain, a signal is
represented as a function of time (or space for images). In the
frequency domain, the same signal is represented as a function of
frequency, showing how much of each frequency is present in the
original signal.
• Complex Exponentials: The Fourier Transform expresses a signal as a
sum of complex exponentials (sines and cosines), each with a specific
amplitude and phase.
Fourier Transform - Mathematical Definition
• For a continuous function f(t), the continuous Fourier Transform F(ω)
is defined as:
Fourier Transform - Mathematical Definition
• The inverse Fourier Transform, which transforms from the frequency
domain back to the time domain, is defined as:
Discrete Fourier Transform (DFT)
Mathematics Basics
Fast Fourier Transformation (FFT)
• It is an efficient algorithm for computing the Discrete Fourier Transform (DFT)
and its inverse.
• The FFT significantly reduces the computational complexity of calculating the
DFT from O(N^2) to O(NlogN), where N is the number of samples. This
efficiency makes it feasible to perform Fourier analysis on large datasets.
Shifting the zero frequency component
The phase of the Fourier transform
FFT
We can see that the DC-value is by far the largest component of the image.
Apply a logarithmic transformation to the image
FFT
Image contains components of all frequencies, but that their magnitude gets smaller for higher frequencies.
FFT
Low frequencies contain more image information than the higher ones. There are two dominating directions in the Fourier
image, one passing vertically and one horizontally through the center. These originate from the regular pattern of
background of the original image.
FFT
The value of each point determines the phase of the corresponding frequency. As in the magnitude image, we can identify
the vertical and horizontal lines corresponding to the patterns in the original image. The phase image does not yield much
new information about the structure of the spatial domain image. Phase information is crucial to reconstruct the correct
2 pixel wide vertical stripes.
It contains 3 main values: the DC-value and, since the Fourier image is symmetrical
to its center, two points corresponding to the frequency of the stripes in the original
image.
Note that the two points lie on a horizontal line through the image center, because
the image intensity in the spatial domain changes the most if we go along it
horizontally.
2 pixel wide vertical stripes.
The main components of the transformed image are the DC-value and
the two points corresponding to the frequency of the stripes.
2 pixel wide vertical stripes.
Logarithmic transform of the Fourier Transform, shows that now the
image contains many minor frequencies.
Image Enhancement in Frequency Domain
•When the Fourier Transform is applied to images, seemingly
random noise or patterns in the frequency domain may
provide important information about the image.
•By analyzing the frequency domain, we can identify and
enhance specific patterns or artifacts in the image, which can
lead to significant improvements in image quality.
•This is achieved by removing or reducing the high-frequency
components that correspond to noise or unwanted details in
the image.
Frequency Domain Filters and its Types
• Low-Pass Filters (LPF)
• High-Pass Filter (HPF)
• Band-Pass Filters (BPF)
• Band-Stop Filters (BSF) or Notch Filters
Low-Pass Filters (LPF)
• Purpose: Allow low-frequency components to
pass while attenuating high-frequency
components.
• Applications: Smoothing or blurring an image,
noise reduction.
• Example: A filter that allows frequencies below
a certain cutoff frequency to pass.
Low Pass Filters
It has a circular region of ones (passband) centered at the origin with radius D0,
and zeros outside this region (stopband).
Low Pass Filters
The filter shows a gradual transition from one to zero, with the steepness of the
transition depending on the order n.
Low Pass Filters
The filter has a Gaussian-shaped curve centered at the
origin, smoothly decreasing as the distance from the origin
increases.
Perspective plots of low
pass filters using: (a) ideal,
(c) Butterworth, and (e)
Gaussian transfer
functions. (b),(d), and (f)
Corresponding images.
Ideal, Butterworth and Gaussian low pass filters and corresponding
image effects.
High-Pass Filters (HPF)
• Purpose: Allow high-frequency components to
pass while attenuating low-frequency
components.
• Applications: Sharpening an image, edge
detection.
• Example: A filter that allows frequencies above
a certain cutoff frequency to pass.
High-Pass Filter
High-Pass Filter
High-Pass Filter
High-Pass Filter
High-Pass Filter
Other High-Pass Filters
Other High-Pass Filters
Other High-Pass Filters
Other High-Pass Filters
Other High-Pass Filters
Other High-Pass Filters
Laplacian Operator
Laplacian Operator
Laplacian Operator
Laplacian Operator
Laplacian Operator
New value=0×10+(−1)×20+0×10+(−1)×20+4×30+(−1)×20+0×10+(−1)×20+0×10=30
Band-Pass Filters (BPF)
•Purpose: Allow a specific range of frequencies
to pass while attenuating frequencies outside
this range.
•Applications: Extracting features or specific
details within a certain frequency range.
•Example: A filter that allows frequencies within
a certain range (band) to pass.
Band-Pass Filter (BPF)
Band-Stop Filters (BSF) or Notch Filters
•Purpose: Attenuate a specific range of
frequencies while allowing frequencies outside
this range to pass.
•Applications: Removing unwanted frequency
components, such as power line interference in
signals.
•Example: A filter that removes frequencies
within a narrow band.