Professional Documents
Culture Documents
Unit - I
Unit - I
1/50
FUNDAMENTALS OF
IMAGE PROCESSING &
IMAGE TRANSFORMS
Text Books:
Digital Image Processing – Gonzalez & Woods, 3rd Edition
Fundamentals of Digital Image Processing – Anil K Jain
Wavelet Transforms – Raghuveer
2/50
CONTENTS
Introduction
Basic Steps of Image Processing System
Sampling and Quantization of an Image
Basic Relationship Between Pixels
Image Transforms
2D – Discrete Fourier Transform
2D – Discrete Cosine Transform
Wavelet Transform
• Continuous Wavelet Transform
• Discrete Wavelet Transform
3/50
INTRODUCTION
Image is a 2 – Dimensional Function
Represented by f(x, y)
x and y are the Spatial Coordinates
Amplitude of f at any pair of coordinates (x, y) is Intensity or
Gray Level of the Image at that point
If x and y are finite and f is a discrete quantity, the image is
called as Digital Image
Processing of digital images by means of a digital computer
refers to Digital Image Processing
Contd …
4/50
Digital Image is composed of a finite number of elements,
each has a particular location & value
These elements are named as Pixels or Pels or Picture
Elements or Image Elements
Pixel is the most widely used term to denote the elements of
a digital image
5/50
BASIC STEPS OF IMAGE PROCESSING SYSTEM
Contd …
6/50
Fundamental Steps in Digital Image Processing Contd …
7/50
Digital Image Processing System has been classified into
two basis steps
The first step has images as its input and output
The second step has images as its input and the outputs are
the attributes extracted from these images
Every process is not applied to an image
All these methodologies can be applied to images for
different purposes and for different objectives
Contd …
8/50
Image Acquisition
Used to acquire a digital image
Image Sensor Equipment which have ability to digitize the
signal produced by the sensor is required
Image Sensor can be either TV Camera or Line Scan Camera
Image Enhancement
Manipulates the image
So that the result is more suitable than the original for a
specific application
Increasing the contrast of an image for better vision
Contd …
9/50
Image Restoration
Improves the appearance of an image
Restoration techniques are based on mathematical methods
or probabilistic methods of image degradation
Color Image Processing
An area that has been gaining importance due to its significant
increase in the use of digital images over the internet
Used to restore the natural characteristics of an image and to
preserve the color information associated with an image
Contd …
10/50
Wavelets
Represents the images in various degrees of resolution
Used for data compression & for pyramidal representation,
where images are sub-dived into smaller regions
Compression
Technique for reducing the storage required to save an image
or bandwidth required to transmit
Most important application over internet
Contd …
11/50
Morphological Processing
Deals with tools for extracting the image components that
are
useful in the representation and description of shape
Segmentation
Partitions an image into its constituent parts or objects
Helps to distinguish different objects in an image
Eg – Traffic Control
Key role of segmentation in the character recognition is to
extract individual characters or words from the background
Contd …
12/50
Representation & Description
A process which transforms raw data into a form suitable
for subsequent computer processing
Representation can done in two different ways
1. Boundary Representation is used when the details of
external shape characteristics are important
(Eg – Corners)
2. Regional Representation is used when the internal
properties are important
(Eg – Texture)
Contd …
13/50
Description is also referred as feature selection
Deals with extracting the attributes which results in same
quantitative information
Also a base for differentiating one class of object from
another
Object Recognition
Process that assigns label to an object based on its description
& the recognized object is interpreted by assigning a meaning
to it
Contd …
14/50
Knowledge Base
Function is guide the operation of each processing module
and to control the interaction between them
A feedback request through the knowledge base to the
segmentation is an example of knowledge utilization in
performing image processing tasks
15/50
SAMPLING AND QUANTIZATION OF AN IMAGE
Contd …
16/50
The process of digitizing the coordinate values (both x & y)
is known as ‘Sampling’
Sampling converts the image points into pixels
The process of digitizing the amplitude values is known as
‘Quantization’
Contd …
17/50
Generating a Digital Image Contd …
18/50
The fig – a shows a Continuous Image
The 1 – D function in fig – b is a plot of intensity values of
the continuous image along the line segment AB
The random variations are due to noise
To sample this function, the equally spaced samples along
the line AB are shown in fig – c
The spatial locations of each sample are indicated by a
vertical tick mark in the bottom part of the figure
Contd …
19/50
The samples are shown as small white squares superimposed
on the function
The values of the samples still have a continuous range of
intensity values
In order to form a digital function, the intensity values also
must be converted into discrete quantities
The fig – d shows the intensity scale divided into 8 discrete
intervals ranging from black to white
Contd …
20/50
The vertical tick marks indicate specific value assigned to
each of the eight intensity intervals
The continuous intensity levels are quantized by assigning
one of the eight values to each sample
Assignment is made depending on the vertical proximity of
of a sample to a vertical tick mark
Digital samples resulting from both sampling &
quantization
are shown in fig – d
Contd …
21/50
Starting at the top of the image & carrying out this procedure
line by line produces a 2 – D digital image
In addition to the no. of discrete levels used, the accuracy
achieved in quantization is highly dependent on the noise
content of the sampled signal
22/50
BASIC RELATIONSHIP BETWEEN PIXELS
Contd …
23/50
Neighbors of a Pixel – 4 Neighbors
Diagonal Neighbors
8 Neighbors
Adjacency – 4 Adjacent
8 Adjacent
M Adjacent (or) Mixed Adjacent
Distances Measures – Euclidean Distance
City Block Distance (or) D4 Distance
Contd …
24/50
A pixel p with coordinates (x, y) has four horizontal and
vertical neighbors whose coordinates are
(x+1, y), (x-1, y), (x, y+1), (x, y-1)
This set of pixels is named as the “4-Neighbors” of p
The 4-Neighbors of p is denoted by N4(p)
Each pixel is a unit distance from (x, y)
Some of the neighbor locations of p lie outside the digital
image if (x, y) is on the border of the image
Contd …
25/50
A pixel p with coordinates (x, y) has four diagonal neighbors
whose coordinates are
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
This set of pixels is named as the “Diagonal-Neighbors” of p
The Diagonal-Neighbors of p is denoted by ND(p)
The Diagonal Neighbors along with 4-Neighbors of p are
called as “8-Neighbors” of p
Contd …
26/50
Two pixels p and q with values from V are “4-Adjacent” if
q is in the set N4(p)
Two pixels p and q with values from V are “8-Adjacent” if
q is in the set N8(p)
Two pixels p and q with values from V are “m-Adjacent”
if
(i) q is in the set N4(p) or
(ii) Q is in the set ND(p) and the set N4(p) ND(p) has no
pixels whose values are from V
Contd …
27/50
For pixels p, q and z with coordinates (x, y), (s, t) and (v, w)
respectively, D is a “Distance Measure” or Distance
Function
or Distance Metric if
(i) D(p, q) ≥ 0, D(p, q) = 0 if p = q
(ii) D(p, q) = D(q, p)
(iii) D(p, z) ≤ D(p, q) + D(p, z)
Contd …
28/50
The “Euclidian Distance” between p and q is defined as
De(p, q) = ((x-s)2 + (y-t)2)1/2
The “City Block Distance” between p and q is defined as
D4(p, q) = │x-s│ + │y-t│
The “Chess Board Distance” between p and q is defined as
D4(p, q) = max(│x-s│ + │y-t│)
29/50
IMAGE TRANSFORMS
Contd …
30/50
The various types of Image Transforms are –
1. Discrete Fourier Transform
2. Discrete Cosine Transform
3. Sine Transform
4. Hadamard Transform
5. Haar Transform
6. Slant Transform
7. Walsh Transform
8. Wavelet Transform
9. Unitary Transform
10. KL Transform
Contd …
31/50
The 2 – D Discrete Fourier Transform of an image is given by
Contd …
32/50
The N X N Cosine Transform matrix C = c(k, n) also called
as the Discrete Cosine Transform and is given by
Contd …
33/50
Properties
1.The Cosine Transform is real and orthogonal
C = C* , For Real
C-1 = CT , For Orthogonal
2.The Cosine Transform is not the real part of the unitary DFT
3. The Cosine Transform is a fast transform
4.The Cosine Transform of a vector of N elements can be
calculated in O(N*log2N) operations via an N – point FFT
5.The Cosine Transform has an excellent energy compaction for
highly correlated data
Contd …
34/50
The elements of the basis vector of the Hadamard
Transform
take only +1 or -1
The Hadamard Transform matrices, Hn are N X N matrices,
where, N = 2n , n = 1, 2, 3, …….
The Hadamard Transform matrix for n =1 is given by
H1 = (1/2)1/2 1 1
1 -1
Contd …
35/50
The Hadamard Transform matrix is given by
Hn = (1/2)1/2 Hn-1 Hn-1
Hn-1 - Hn-1
The Hadamard Transform of an N X 1 vector u is given by
v = Hu
The Inverse Hadamard Transform is given by
u = Hv, where H = Hn , n = log2N
The Hadamard Transform pair is given by
Contd …
36/50
Properties
1.The Hadamard Transform is real, Symmetric and orthogonal
For Real
For Orthogonal
For Symmetric
Thus, the forward ans inverse Sine Transforms are identical
2.The Sine Transform is a fast transform
Contd …
37/50
3. The 1 – D Transformation can be implemented in
O(N*log2N) additions and subtractions
4. It has good to very good energy compaction for highly
correlated images
Contd …
38/50
The Haar Functions are defined on a continuous interval,
X € (0, 1) and for k = 0 to N -1, where N = 2n
The integer k is given by K = 2p + q - 1
where, 0 ≤ p ≤ n – 1
q = 0, 1 for p = 0 & 1 ≤ q ≤ 2p for p ≠ 0
The Haar Function is defined as
H0(x) = h0, 0(x) = (1/N)½ , x € [0, 1]
Contd …
40/50
The N X N Slant Transform matrix is defined by
1 0 1 0
0 0 Sn-1 0
an b n -an bn
-bn an bn an
0 I(N/2)-2 0 -I(N/2)-2
Where, N = 2n
I – Identity Matrix
Contd …
41/50
42/50
Properties
1.The Slant Transform is real and orthogonal
For Real
For Orthogonal
2.The Slant Transform is a fast transform which can be
implemented in O(N*log2N) operations on an N X 1 vector
3.It is very good to excellent energy compaction for images.
4.The basis vectors of Slant Transform are not sequency
ordered for n ≥ 3
Contd …
43/50
Walsh
Contd …
44/50
45/50
Wavelet
Contd …
46/50
47/50
Hotelling
Contd …
48/50
49/50
50/50