I SEM 2012-13

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI,
DUBAI CAMPUS, DUBAI INTERNATIONAL ACADEMIC CITY DUBAI
I SEM 2012-2013
IMAGE PROCESSING EA C443 (ELECTIVE)
COMPREHENSIVE EXAMINATION
WEIGHTAGE 40% , MAX MARKS 40, TIME 3 HOURS, DATE 10-01-2013
Note : Answer all the questions
Q.1 Exponentials of the form e
αr 2
, with α positive constant, are useful for
9M
constructing smooth intensity transformation functions. Start with this basic
function and construct transformations having the general shapes shown in the
following figures. The constant shown are input parameters, and your proposed
transformation must include them in their specifications.
Q.2 Explain the following
i. Histogram equalization
ii. Contrast stretching
6M
Q.3 Given following 4x4 image ,
10M
8
6
8
1
4
8
6
6
4
2
5
5
5
2
4
3
Apply unsharp masking and high boost filtering on the image.
Q.4 Explain following properties of 2D Discrete Fourier Transform
i.
Seperability property
ii.
Shifting property
4M
Q.5 Apply Harmonic mean filter on the following 3x3 image.
5M
2
1
3
2
25
2
1
2
2
Q.6 What is Fourier slice theorem? Explain
6M
BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI,
DUBAI CAMPUS, DUBAI INTERNATIONAL ACADEMIC CITY DUBAI
I SEM 2012-2013
IMAGE PROCESSING EA C443 (ELECTIVE)
COMPREHENSIVE EXAMINATION
WEIGHTAGE 40% , MAX MARKS 40, TIME 3 HOURS, DATE 10-01-2013
Q.
1
Q.
2
8
Explain the following
i. Histogram equalization
4
ii. Contrast stretching
Q.
3
Steps involved in unsharp masking and highboost filtering is
1. Blur the original image
2. Subtract the blurred image from the original to get a image called as mask image
3. Add the mask to the original.
Blurred image is given by
3 4 3 1
4 6 4 2
4 5 5 2
2 3 3 2
Mask=original image – blurred image
5 0 1 4
2 2 -2 0
4 1 0 2
-1 3 2 1
Resulting image=original image + K*mask
K=1 , it is unsharp masking
13
8
12
0
4
10
7
9
5
0
5
7
9
2
6
4
For high boost filtering k>1 , let k=2
18
10
16
-1
Q.
4
4
12
8
12
6
-2
5
9
16
2
8
5
Harmonic mean filter is given by
mn
f
( s ,t )
1
g( s , t )
Q.
5
Note : Answer all the questions
ID No.
Name:
BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI,
DUBAI CAMPUS, DUBAI INTERNATIONAL ACADEMIC CITY DUBAI
I SEM 2012-2013
EA C443 IMAGE PROCESSING (ELECTIVE)
QUIZ 1 (CLOSED BOOK)
WEIGHTAGE 3% , MAX MARKS 6, TIME 10 MINUTES
Note : Answer all the questions
1. Following 2x2 , 4 bit image segment is given, sketch the second bit plane
5 8
ans :
12 15
2. Given following 4 histograms, identify the nature of its image.
Ans :
[1M]
[2M]
Ans :
Ans :
Ans :
3. Following 8x8 image need to be median filtered, find (5,5) , (6,5) pixels of the median
filtered image.
[1M]
6 7 8 9 5 6 8 2
5 6 7 8 1 2 3 4
5 6 7 8 8 7 1 4
2 5 6 7 8 6 6 7
4 8 5 5 8 3 9 3
8 9 7 8 9 8 9 7
7 8 4 4 5 1 0 2
3 5 7 9 7 8 9 8
4. Given following 2x2, image find the 2D DFT
4 5
3 2
[2M]
BITS PILANI DUBAI CAMPUS
MATLAB IMPLEMENTATION OF IMAGE PROCESSING ALGORITHMS
EA C443 IMAGE PROCESSING (ELECTIVE)
MAX MARKS : 8 , PERCENTAGE WEIGHTAGE : 8% ; Time 30 Minutes
Q. No. 1) Write a MATLAB program to read an image and do the following. (04)
1. get the negative of the image
2. display the histogram and equalize it
3. Intensity level slicing
4. bit level slicing
Note : Use case statement to do the selection among all the above choices
Q. No 2) enhance the following image to better image , use more than one image
enhancement techniques.
(04)
BITS PILANI DUBAI CAMPUS
MATLAB IMPLEMENTATION 2 OF IMAGE PROCESSING ALGORITHMS
EA C443 IMAGE PROCESSING (ELECTIVE)
MAX MARKS : 7 , PERCENTAGE WEIGHTAGE : 7% ; Time 30 Minutes
Given an image file with hidden text into it,write a MATLAB
program to extract the message from the image.
Note: Image file is already available in the share directory of
the system
clc;
clear all;
close all;
data3=imread('watimage1.bmp');
[row col]=size(data3);
imshow(data3);
alldata=[];
n=1;
for k=1:9,
% if (k==row)
%
col=colend;
% else
%
col=len3;
% end
for m=1:col,
alldata(n)=data3(k,m);
n=n+1;
end
end
for i=1:n-1,
alldata(i)=bitand(alldata(i),1);
end
alldata=double(alldata);
alldata=alldata;
len1=length(alldata);
%get the 8bit data by selecting every 8 bits
a_text=[];
in1=1;in2=7;
for cnt=1:len1-1,
a_text=[a_text ; alldata(in1:in2)];
in1=in2+1;
in2=in2+7;
end
% Reconstruct the text
a_text=48+a_text;
c_text=char(a_text);
btd_text=bin2dec(c_text);
text2=btd_text';
text2=char(text2);
disp('Extracted text');
text2
Results
Extracted text
text2 =
BITS PILANI DUBAI CAMPUS
IMAGE PROCESSING ELECTIVE
QUIZ 2/MATLAB IMPLEMENTATION ON 05-11-2012
BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI,
DUBAI CAMPUS, DUBAI INTERNATIONAL ACADEMIC CITY DUBAI
I SEM 2012-2013
IMAGE PROCESSING EA C443 (ELECTIVE)
TEST 1 (CLOSED BOOK) ANSWERING SCHEME
WEIGHTAGE 25% , MAX MARKS 25, TIME 50 MINUTES, DATE 07-11-2012
Q.1 Given following 4x4 image, perform the second derivative on the same
6
5
4
2
8
6
6
3
9
8
7
5
3
2
8
6
Answering scheme:
The mask for the second order derivative on the image is given by
0 1 0
1 -4 1
0 1 0
2M
When we implement the spatial filtering using above filter mask , we get the
second derivative of the image.
-11
-4
-3
-1
-11
3
-4
1
-17
-8
-1
-4
-1
11
-17
-11
3M
Q.2 Explain the following
i.
Grey level slicing
Output
Intensity
Output
Intensity
2M
Input Intensity
Input Intensity
These work on ranges of intensity levels by highlighting a specific range
of grey levels in an image by brightening the levels in the area of interest.
Used to enhance the features of an image in satellite imagery, and
enhancing floors in x-ray images
ii.
Contrast stretching
Produce an image of higher contrast than the original by
darkening/lightning levels below/above
2M
Output
Intensity
Input Intensity
iii.
Bit plane slicing
2M
In terms of bit-plane extraction for an 8-bit image, it is not difficult to show that the (binary) image
for bit-plane 7 can be obtained by processing the input image with a thresholding gray-level
transformation function that (1) maps all levels in the image between 0 and 127 to one level (for
example, 0); and (2) maps all levels between 129 and 255 to another (for example, 255). The binary
image for bit-plane 7 in Fig.
Q.3 Given following 8x8 image which is having 16 grey levels, draw the histogram of
the image and perform histogram equalization.
9
7
8
10
7
10
9
8
9
7
8
10
9
9
7
8
9
9
8
8
10
7
10
10
10
7
8
8
9
7
9
7
9
8
10
9
10
10
8
9
7
7
9
9
8
10
9
9
10
10
9
7
7
10
7
8
Histogram of the image is
18
16
14
12
10
8
6
4
2
0
0
2
4
6
8
10
12
14
16
18
20
7
10
9
9
8
7
9
7
Histogram equalization.
q
symb
s0
s1
s2
s3
s4
s5
s6
s7
s8
s9
s10
s11
s12
s13
s14
s15
freq
0
0
0
0
0
0
0
16
13
20
15
0
0
0
0
0
Pr(rk)
0
0
0
0
0
0
0
0.25
0.20
0.31
0.24
0
0
0
0
0
G(zq)
0
0
0
0
0
0
0
3.75
6.75
11.4
15
15
15
15
15
15
G(z)
0
0
0
0
0
0
0
4
7
11
15
15
15
15
15
15
G ( zq )
( L 1)
pz (zi )
i 0
0
G ( z0 ) 15
p z ( zi )
0
i 0
Resulting histogram after the equalization is
18
16
14
12
10
8
6
4
2
0
0
2
4
6
8
10
12
Q.4 Given following 3x3 image
0 8 0
1 8 0
0 8 0
and the filter mask
-1 2 -1
-1 2 -1
-1 2 -1
perform the filter operation
-14 31 -16
-22 47 -24
-14 31 -16
14
16
18
20
5M
Q.5 Write the equation for 2D DFT and its inverse? Explain its seperability property
N 1N 1
F(u, v)
f ( x, y) exp
x 0 y 0
j
2 (ux vy )
N
N 1N 1
j2πux vy
1
N
f(x,y) N.N
F(u,v)e
u 0v 0
1
1
The two dimensional DFT is separable into two one dimensional DFTs which
can be implemented with an FFT algorithm
2
BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI,
DUBAI CAMPUS, DUBAI INTERNATIONAL ACADEMIC CITY DUBAI
I SEM 2012-2013
IMAGE PROCESSING EA C443 (ELECTIVE)
TEST 1 (CLOSED BOOK)
WEIGHTAGE 25% , MAX MARKS 25, TIME 50 MINUTES, DATE 07-11-2012
Note : Answer all the questions
Q.1 Given following 4x4 image, perform the second derivative on the same
6
5
4
2
8
6
6
3
9
8
7
5
5M
3
2
8
6
Q.2 Explain the following
i.
Grey level slicing
ii.
Contrast stretching
iii.
Bit plane slicing
6M
Q.3 Given following 8x8 image which is having 16 grey levels, draw the histogram of
the image and perform histogram equalization.
5M
9
7
8
10
7
10
9
8
9
7
8
10
9
9
7
8
9
9
8
8
10
7
10
10
10
7
8
8
9
7
9
7
9
8
10
9
10
10
8
9
7
7
9
9
8
10
9
9
10
10
9
7
7
10
7
8
7
10
9
9
8
7
9
7
Q.4 Given following 3x3 image
0 8 0
1 8 0
0 8 0
and the filter mask
-1 2 -1
-1 2 -1
-1 2 -1
perform the filter operation
5M
Q.5 Write the equation for 2D DFT and its inverse? Explain its seperability property
4M
BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI,
DUBAI CAMPUS, DUBAI INTERNATIONAL ACADEMIC CITY DUBAI
I SEM 2012-2013
IMAGE PROCESSING EA C443 (ELECTIVE)
TEST 2 (OPEN BOOK)
WEIGHTAGE 20% , MAX MARKS 20, TIME 50 MINUTES, DATE 19-12-2012
Note : Answer all the questions
Q.1 A blur filter is given by
6M
h(m, n)
0
0.05 0.05
0
0.15 0.1 0.1 0.15
0
0.1 0.1
0
0
0.1 0.1
0
find the deblur filter using Weiner filter approach with σx2=200 and σw2=100
Weiner filter is given by
H * (u, v)
G (u, v)
H (u, v)
2
2
w
2
x
Q.2 Given following 8x8, 3 bit image,
3
0
1
0
1
1
3
0
7
7
3
3
2
7
2
0
6
3
1
3
0
1
7
7
6M
2
6
3
7
1
2
1
1
6
4
4
1
6
4
2
4
4
0
1
2
6
0
0
1
5
5
5
3
4
2
5
1
5
1
2
5
6
0
7
6
Find
i.
ii.
iii.
Entropy of the image
Compress the image using Huffman coding
Compute the compression achieved and the effectiveness of the Huffman coding
Page 1 of 2
Q.3 Consider following figure
5
a) Explain why the Hough mapping of point 1 in above figure, is a straight line
b) Is this only point that produce that result? Explain
c) Explain the reflective adjacency relationship illustrated in the following figure.
Q.4 What is Radon transform? Explain
3
Page 2 of 2