0% found this document useful (0 votes)
2 views

hw1_solution

The document contains homework problems related to image processing and optics, including calculations involving similar triangles, camera resolution, and image intensity quantization. It also includes MATLAB tasks for image interpolation using different methods such as nearest neighbor, bilinear, and bicubic interpolation. The problems cover theoretical concepts as well as practical applications in image analysis.

Uploaded by

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

hw1_solution

The document contains homework problems related to image processing and optics, including calculations involving similar triangles, camera resolution, and image intensity quantization. It also includes MATLAB tasks for image interpolation using different methods such as nearest neighbor, bilinear, and bicubic interpolation. The problems cover theoretical concepts as well as practical applications in image analysis.

Uploaded by

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

Homework # 1

CH. 2
Problem 1.

Using similar triangles,


(𝑑/2) (𝑥/2)
= 0.014
0.3

→ 𝑥 = 0.0467𝑑
The number of the cones in the region of the highest acuity in eye ≈ 337,000 (from the
discussion in section 2.11)
→ Array size = 580 × 580 elements
Assuming equal spacing between elements
→ 580 elements and 579 spaces on a line 1.5 mm long
1.5 𝑚𝑚
∴ The size of each element = = 1.3 × 10−6
1159

The eye will not detect a dot if its diameter, 𝑑, is such that, 0.467𝑑 < 1.3 × 10−6
→ 𝑑 < 27.83 × 10−6
Problem 5.
See the Fig. 2.3.
14𝑚𝑚 𝑧
= 500𝑚𝑚
35𝑚𝑚

→ 𝑧 = 200 𝑚𝑚: The target size


2048
→ Resolution of one line = ≈ 10 elements/mm
200
10
∴ The camera will be able to resolve = 5 lines/mm
2

(for line pairs, divided by 2)

Problem 7.
From eq.2.3-2,
𝑓(𝑥, 𝑦) = 𝑖(𝑥, 𝑦) ∙ 𝑟(𝑥, 𝑦)
2 2
= 𝑘𝑒 −[(𝑥−𝑥0) +(𝑦−𝑦0) ] ∙ 𝑟(𝑥, 𝑦)
Reflectance = 1.0, k = 255, The maximum intensity = 255
If the intensity is quantized using 𝑛 bits,
256
(Resolution) ∆= 2𝑘
256
Since the abrupt change of four level is assumed to be detectable by the eye, ∆= 4 =
2𝑘

→ 𝑘 = 6 bits
𝑘 ≤ 6 bits will produce false contouring

Problem 11.
Let p and q be as shown in the figure at the left side.
(a) S1 and S2 are NOT 4-connected as q is not in the set N4(p)
(b) S1 and S2 are 8-connected as q is in the set N8(p)
(c) S1 and S2 are m-connected as (1) q is in ND(p) and (2)
the set N4(p)∩ N4(q) is empty.
CH. 3
Problem 1.
Let f denote the original image. First subtract the minimum value of f denote fmin from f to yield
a function whose minimum value is 0:
𝑔1 = 𝑓 − 𝑓𝑚𝑖𝑛
Next divide g1 by its maximum value to yield a function in the range [0,1] and multiply the
result by L-1-C to yield a function with values in the range [0, L-1-C]
𝐿−1−𝐶
𝑔= (𝑓 − 𝑓𝑚𝑖𝑛 )
max (𝑓 − 𝑓𝑚𝑖𝑛 )
Finally add C to yield a function in the range [C, L-1]
𝐿−1−𝐶
𝑔= (𝑓 − 𝑓𝑚𝑖𝑛 ) + 𝐶
max(𝑓 − 𝑓𝑚𝑖𝑛 )

Problem 2.
2
(a) General form: 𝑠 = 𝑇(𝑟) = 𝑒 −𝛼𝑟
If 𝑟 = 0, then 𝑠 = 𝐴
→ 𝐴=1
If 𝑟 = 𝐿0 , then 𝑠 = 𝐴/3
𝐴 2
→ = 𝑒 −𝛼𝐿0
3
𝐴 1
𝑙𝑛( ) 𝑙𝑛( ) 1.098
3 3
𝛼=− =− =
𝐿20 𝐿20 𝐿20

1.098 2
− 𝑟
𝐿2
∴ 𝑠 = 𝑇(𝑟) = 𝑒 0

2
(b) General form: 𝑠 = 𝑇(𝑟) = 𝐵(1 − 𝑒 −𝛼𝑟 )
If 𝑟 = 0, then 𝑠 = 0
If 𝑟 = 𝐿0 , then 𝑠 = 𝐵/4
𝐵 2
→ = 𝐵(1 − 𝑒 −𝛼𝐿0 )
4
3
𝑙𝑛( ) 0.288
4
𝛼=− =
𝐿20 𝐿20

0.288 2
− 𝑟
𝐿2
∴ 𝑠 = 𝑇(𝑟) = B(1 − 𝑒 0 )
2
(c) 𝑠 = 𝑇(𝑟) = (𝐷 − 𝐶)(1 − 𝑒 −𝛼𝑟 ) + 𝐶
Problem 3.
1
(a) 𝑠 = 𝑇(𝑟) = 1+(𝑚/𝑟)𝐸

(b)

0, 𝑟 ≤ 𝑚 − 1
(c) 𝑠 = 𝑇(𝑟) = { 0.5, 𝑟 = 𝑚
1, 𝑟 ≥ 𝑚 + 1
If C is the smallest positive number representable in the computer, then any value of
s (> 0) less than C/2 will be called 0 by the computer.
Solve the following equation for E using 𝑚 = 128
1 𝐶
𝐸 <
𝑚 2
1 + [𝑚 − 1]
MATLAB task

% read the PGM image into MATLAB


clear; close all;
x=imread('fl_orig.pgm');
% display the image
figure, imshow(x, []);
% convert image to double format
x=double(x);
whos x

% read the instruction of interp2


help interp2

% zero-order interpolation (replication)


y0=interp2(x,'nearest');

% display interpolated image


figure, imshow(y0,[]);

% check replication property


x(1:4,1:4)
y0(1:9,1:9)

% repeat the process for linear and cubic interpolation


% perform interpolation and show its property

% first-order interpolation (bilinear interpolation)


y1=interp2(x, 'linear');

% display interpolated image


figure, imshow(y1, []);

% check bilinear property


x(1:4, 1:4)
y1(1:9, 1:9)

% bicubic interpolation
y2=interp2(x, 'cubic');

% display interpolated image


figure, imshow(y2, []);

% check cubic property


x(1:4, 1:4)
y1(1:9, 1:9)

You might also like