0% found this document useful (0 votes)
11 views14 pages

Digital Image Basics and Processing Techniques

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

Digital Image Basics and Processing Techniques

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UNIT 1

A. What is a Digital Image? Advantages & drawbacks.(page 2,3)


 A digital image is composed of picture elements called pixels. Pixels are the
smallest sample of an image, representing the brightness at one point.
Conversion of an analog image into a digital image
involves sampling and quantisation.
 Advantages :
1. The processing of images is faster and cost-effective.
2. Digital images can be effectively stored and efficiently transmitted.
3. When shooting a digital image, one can immediately see if the image is
good or not.
4. Copying a digital image is easy without quality degradation.
5. Reproduction of the image is both faster and cheaper.
6. Digital technology offers plenty of scope for versatile image manipulation.
 Drawbacks :
1. Misuse of copyright has become easier.
2. A digital file cannot be enlarged beyond a certain size without
compromising on quality.
3. The memory required to store and process good-quality digital images is
very high.
4. For real-time implementation, the processor has to be very fast because
the volume of data is very high.

B. What is meant by Sampling and Quantization?


1. Sampling (page 4-12):
 "Sampling is the process of measuring the brightness information only at a
discrete spatial location."
 The theory involves defining the analog image f (x , y ) and obtaining its
discrete version
 f (m ,n)=f (m Δ x , n Δ y ),
 where Δ x and Δ y are the sampling intervals.

2. Quantisation (page 13) :


 "Quantisation involves representing the sampled data by a finite number of
levels based on some criteria such as minimisation of quantiser distortion."
 It involves designing input decision levels and output representation levels.
Quantisers are classified into scalar and vector quantisers.
 ωₓₛ > 2ωₓ₀ and ωᵧₛ > 2ωᵧ₀

C. Define Resolution, Photopic and Scotopic vision, Brightness and Contrast.


1. Resolution (Page 13): "Resolution gives the degree of distinguishable details."
 Spatial Resolution: "The smallest discernible detail in an image... depends on the
number of pixels."
 Gray-level Resolution: "Refers to the smallest discernible change in the gray level...
depends on the number of gray levels."

2. Photopic and Scotopic Vision (Page 16):


 Scotopic Vision: "The rods are sensitive to very low illumination and are responsible
for scotopic vision."
 Photopic Vision: "The cones... are responsible for the most acute vision, photopic
vision... Colour vision, also known as photopic vision, is provided by the cones."

3. Brightness and Contrast (Page 15-16):


 Brightness: "Brightness is the psychological concept or sensation associated with the
amount of light stimulus."
 Contrast: "The term contrast is used to emphasise the difference in luminance of
objects. The perceived brightness of a surface depends upon the local background...
This phenomenon is termed ‘simultaneous contrast’."

4. Differentiate Raster and Vector Image.


Raster Image (Page 20): "A raster image file is generally defined as a rectangular
array of regularly sampled values known as pixels...
A raster image is resolution dependent because it contains a fixed number of pixels...
a raster image will lose its quality if it is enlarged."
Vector Image (Page 20): "A vector image is defined by objects which are made of
lines and curves that are mathematically defined...
Vector images are mathematically defined and hence, they are easily scalable... vector
images can be scaled by several factors without altering the resolution of the image."

5. List any 5 applications of Digital Image Processing. (page 42-43)


 Medicine: "Digital image processing techniques like image segmentation and
pattern recognition is used in digital mammography to identify tumours."
 Forensics: "Security can be enhanced by personal identification. Different
biometrics used... are face, fingerprint, iris, vein pattern, etc."
 Remote Sensing: "Remote sensing is being used increasingly to provide data
for diverse applications like planning, hydrology, agriculture, geology and
forestry."
 Communications: "Video conferencing helps the people in different locations
to interact lively. Effective image and video compression algorithms... help to
transmit the data effectively."
 Automotives: "The latest development in the automotive sector is 'night
vision system'... to avoid accidents."

6. What is the need for transforming the image (page 153)?


The need for Transform... The image transform is used to convert the image from one
domain to another for efficient computation of image processing algorithms. The
image transform provides an alternative representation for the image which could be
more suitable for a given application.
 Decorrelate image data and compact energy into fewer coefficients.
 Facilitate filtering, enhancement, and compression operations.
 Simplify mathematical analysis and noise reduction.
 Highlight key features like texture and edges.

7. Explain any 5 types of Image Transforms.


 Fourier Transform (Page 155-158): "The Fourier transform is the most
popular and widely used transform. It is used to transform the image from the
spatial domain to the frequency domain." It is used for analysis, filtering, and
restoration.
 Walsh Transform (Page 175): "The Walsh transform is a non-sinusoidal,
orthogonal transform... The forward and inverse Walsh kernel is a symmetric
matrix whose rows are obtained from the Walsh function. The Walsh
transform uses only real numbers +1 and -1."
 Hadamard Transform (Page 181): "The Hadamard transform is a linear,
orthogonal transform. It is a symmetric, unitary and real transform. The
Hadamard transform uses only real numbers +1 and -1."
 Discrete Cosine Transform (DCT) (Page 194): "The DCT has excellent
energy compaction for highly correlated data. The DCT is real and
orthogonal... The DCT is the heart of the international standard lossy image
and video compression algorithms."
 Karhunen-Loeve Transform (KLT) (Page 202): "The Karhunen-Loeve
transform (KLT) is also known as the Hotelling transform or the method of
principal components... The KLT is an optimal transform in the sense that it
completely decorrelates the input signal... It is a data dependent transform."

8. How can we represent the digital image? Explain neighbouring of a pixel.


 Digital Image Representation (Page 3): "A digital image is a two-
dimensional discrete signal. A digital image is also an N × N array of
elements. Each element in the array is a number which represents the sampled
intensity."
 Neighbouring of a Pixel (Page 3):
a. 4-neighbors: "A pixel will have four neighbours if the neighbours exist in
the EAST, WEST, NORTH and SOUTH direction."
b. 8-neighbors: "A pixel ' P' will have eight neighbours if the neighbours are
in eight directions such as EAST, WEST, NORTH, SOUTH, NORTH-
EAST (NE), NORTH-WEST (NW), SOUTH-EAST (SE) and SOUTH-
WEST (SW)."

UNIT 2
A. Perform the histogram equalisation of the image definition
[43444
54443
35553
34543
4 4 4 4 4 ] Page Number: 249-250

For understanding :
Step 1: Create the histogram (Number of pixels, n k)
The image has 6x4 = 24 pixels. The intensity levels range from 3 to 5.
 r 3=3: n3 =6
 r 4=4 : n 4=12
 r 5=5: n5 =6
Step 2: Calculate the Probability Density Function (PDF), pr (r k )
 pr (3)=6/24=0.25
 pr (4)=12/24=0.50
 pr (5)=6/24=0.25
Step 3: Calculate the Cumulative Density Function (CDF), sk
 s3=∑ p r (3)=0.25
 s4 =∑ pr (3)+ pr (4 )=0.25+0.50=0.75
 s5=∑ p r (3)+ pr (4)+ pr (5)=0.25+0.50+ 0.25=1.00
Step 4: Multiply CDF by (L-1) and round to get new intensity levels
Here, the maximum intensity level is 5, so L-1 = 5 - 1 = 4.
 s3=round(4 ×0.25)=round(1.00)=1
 s4 =round (4 × 0.75)=round (3.00)=3
 s5=round(4 ×1.00)=round(4.00)=4
Step 5: Map the original image to the new intensities using the transformation
function:
 Original 3 -> New 1
 Original 4 -> New 3
 Original 5 -> New 4

B. What is median filter? How are they find each pixel value of a processed image?
Page Number: 270
"The median filter is a non-linear spatial filter. The response of the filter is based on
ranking the pixels contained in the image area encompassed by the filter mask... The
value of the centre pixel is replaced by the median of the grey level values of the
pixels in the neighbourhood."
How each pixel value is determined:
 A filter mask (e.g., a 3x3 window) is placed over the pixel to be processed.
 All the pixel values covered by the mask are listed.
 These values are sorted in ascending or descending order.
 The median value (the middle value in the sorted list) is selected.
 The central pixel of the window in the processed image is replaced with this median
value.

C. Obtain the Huffman code for the word ‘COMMITTEE’. Page Number: 452-454
For understanding :
Step 1: Calculate Frequency of each symbol
COMITE
 C: 1
 O: 1
 M: 2
 I: 1
 T: 2
 E: 2
Step 2: Sort and Combine Symbols (Lowest to Highest Probability)
 (C:1) (O:1) (I:1) (M:2) (T:2) (E:2)
 Combine C and O -> Node (C,O:2). New list: (I:1) (C,O:2) (M:2) (T:2) (E:2)
 Combine I and (C,O:2) -> Node (I,C,O:3). New list: (M:2) (T:2) (E:2) (I,C,O:3)
 Combine M and T -> Node (M,T:4). New list: (E:2) (I,C,O:3) (M,T:4)
 Combine E and (I,C,O:3) -> Node (E,I,C,O:5). New list: (M,T:4) (E,I,C,O:5)
 Combine (M,T:4) and (E,I,C,O:5) -> Root Node (All:9)
Step 3: Assign Codes (Assign 0 to left branch, 1 to right branch)
Following the tree construction:
 M: 00
 T: 01
 E: 10
 I: 110
 C: 1110
 O: 1111

D. Explain the different spatial domain techniques of image enhancement. Page


Number: 273-274
"Image enhancement in the spatial domain is carried out by direct manipulation of the
pixels in an image." The techniques are broadly classified into:
1. Point Operation: The intensity of each pixel is modified based only on its own value.
o Gray-level Transformations: Linear (e.g., negative, identity) and Non-linear
(e.g., log, power-law).
o Histogram Processing: Histogram equalization and histogram specification.

o Bit-plane Slicing: Extracting bits from each pixel to highlight their


contribution.
2. Spatial Filtering / Neighbourhood Operation: The intensity of a pixel is modified
based on its own value and the values of the pixels in its neighbourhood.
o Smoothing Filters (Low-pass): Used for noise removal and blurring (e.g.,
mean filter, median filter).
o Sharpening Filters (High-pass): Used to highlight fine details and edges (e.g.,
Laplacian filter, gradient filters).

E. Explain the concept of spatial domain high-pass filtering or image sharpening of


an image enhancement. Page Number: 273-274

"Spatial domain high-pass filtering is used for image sharpening.


The main objective of image sharpening is to highlight fine details or
to enhance detail that has been blurred... The high-pass filtering can
be implemented using a mask which has a positive value at the
centre and negative values in the neighbourhood."
Concept: Blurring (smoothing) in an image is an averaging
operation, which is analogous to integration. Sharpening is the
opposite, achieved by differentiation. High-pass filters are derivative
filters that highlight regions of rapid intensity change (i.e., edges),
thereby sharpening the image.

Implementation: This is done by convolving the image with a high-


pass filter mask. These masks have a positive centre coefficient and
negative surrounding coefficients, and their sum is typically zero.
Common masks include:

F. Justify the statement “Median filter is an effective tool to minimise salt-and-


pepper noise” through the following simple [Link] Number: 304 – 306
For understanding :
The justification is demonstrated through a solved problem in the book. A 3x3 median
filter is applied to an image corrupted with salt-and-pepper noise (where noise pixels
have extreme minimum or maximum values).
Illustration:
1. A 3x3 window is placed over a noisy pixel (e.g., a value of 0 in a region where
neighbors are 52, 56, 59, etc.).
2. The values in the window are sorted: [0, 52, 56, 56, 57, 57, 59, 60, 60].
3. The median value (the 5th value in this sorted list of 9) is 57.
4. The noisy central pixel (0) is replaced by 57.
Justification: Because the salt (max value) or pepper (min value) noise pixels are
extreme, they always lie at the ends of the sorted list. The median value, taken from
the middle of the list, is therefore almost always a non-noisy pixel from the local
neighborhood. This effectively removes the isolated noisy pixels while preserving the
sharpness of edges, unlike a mean filter which would blur the edges.

G. What are the different types of noise in image? Explain. Page Number: 348– 349
Noise is any undesired information which contaminates the image. The different types
of noise in the image are classified based on the statistical properties of the noise."
 Gaussian Noise: "The probability density function is given by the Gaussian
distribution." It is characterized by its mean and variance and is a good model for
many natural noise processes.
 Rayleigh Noise
 Erlang (Gamma) Noise
 Exponential Noise
 Uniform Noise
 Impulse (Salt-and-Pepper) Noise: "The probability density function is given by... The
noisy pixels can take either the minimum value or the maximum value." It appears as
random black and white pixels.

H. Explain the concept of linear gray transformation of an image. Page Number:


252-253
"A linear grey level transformation is of the form s = T(r) = ar + b, where 'r' is the
input grey level, 's' is the output grey level and 'a', 'b' are constants."
Concept: It is a point processing operation where the relationship between input and
output pixel intensity is a straight line.
 Identity Transformation: If a=1 and b=0, the input image is unchanged.
 Negative Transformation: If a=-1 and b=L-1 (where L-1 is the maximum intensity),
the output is the photographic negative of the input.
 Contrast Stretching: If a>1, the contrast of the image is increased.
 Brightness Modification: If b>0 (with a=1), the overall brightness of the image is
increased.

I. Explain the concept of non-linear gray transformation of an image. Page


Number: 253-260
Non-linear grey level transformations are point processing operations defined by a
non-linear function.
1. Log Transformation: "The general form of the log transformation is s = c log(1 +
r)." This transformation expands the dark pixels in an image (low values of r) and
compresses the brighter pixels (high values of r). It is useful for displaying images
with a very wide range of intensity values.
2. Power-law (Gamma) Transformation: "The general form of the power-law
transformation is s = cr^γ." This transformation is used for a variety of device
corrections and contrast enhancements. By selecting different values of γ (gamma),
one can control the enhancement of dark or light regions.
o γ < 1: Enhances dark regions.

o γ = 1: Identity transformation.

o γ > 1: Enhances light regions.

J. What are the different techniques of image restoration? Explain. Page Number:
327– 328
"Image restoration techniques are classified into (i) deterministic and (ii) stochastic
methods."
1. Deterministic / Linear Restoration Techniques: These methods are based on a fixed
criterion that does not rely on random parameters.
o Inverse Filtering: A simple method that divides the Fourier transform of the
degraded image by the degradation function. It is very sensitive to noise.
o Wiener Filtering: A minimum mean square error filter that aims to reduce the
effect of noise while performing deconvolution. It is superior to inverse
filtering in the presence of noise.
2. Stochastic / Non-linear Restoration Techniques: These methods incorporate statistical
or random elements.
o Maximum Likelihood Estimation
o Maximum A Posteriori Estimation

o Blind Deconvolution: "The blind-deconvolution technique can be used


effectively when the point spread function (PSF) or the degradation function is
not known."

You might also like