Beruflich Dokumente
Kultur Dokumente
(MBE 4032)
Assignment 2
Question 1
N
0 0 0 0 0 0
0 0 0 0
n
0 0
1 1 1 1 1 1 1
1 1
1 1
1 1 1 n N
1 1
1 1
1 1 1 1 1 1 1
0 0
0 0 0 0
0 0 0 0 0 0
Question 2
The Sobel Operators are:
Gx Gy Given image:
-1 -2 -1 -1 0 1
0 0 0 -2 0 2 a b c
1 2 1 -1 0 1 d e f
g h i
Gy = 0 0 0 1 Gy = 3
0 0 0 0 0
G=0 0 0 1 G=4 1 1 1 1 1 1 1
0 0 0 1 1
8) 0 0 0 Gx = 3 1 1
2) 0 0 0 Gx = 1 Gy = 3
0 1 1
0 0 0 Gy = 1 G=6 1 1 1
0 1 1
0 0 1 G=2
1 1
3) 0 0 0 Gx = 3 14) 1 1 1 Gx = 0 1 1
1 1 1 1 1 1 1
0 0 0 Gy = 1 1 1 1 Gy = 0 0 0
0 1 1 G=4 1 1 1 G=0 0 0 0 0
0 0 0 0 0 0
26) 1 0 0 Gx = -1
0 0 0 Gy = -1 26 cases in total
0 0 0 G=2
Question 2
N
0 0 0 0 0 0
0 0 n 0 0
0 2 4 4 4 4 4 2 0
4 6 4 4 4 4 4 6 4
4 4 0 0 0 4 4
4 4
4 4 0 0 0 4 4 n N
4 4
4 4 0 0 0 4 4
4 6 4 4 4 4 4 6 4
0 2 4 4 4 4 4 2 0
0 0 0 0
0 0 0 0 0 0
Question 3
N/2 N/2
LA LA LB LB
LA LA LB LB
LA LA LB LB
N
LA LA LB LB
Question 3
Gray-scale wedge:
N/2 N/2
0 K
Gray Level
K/2
N/2 N
Question 3
Image: N/2 N/2
LA LA LA LA LB LB LB LB
Level
LA
LB
N/2 N
Operation: 0 K
LA LA LA LA LB LB LB LB
Question 3
Case 1: LA < 2LB 0.5KLA < KLB
Level
LA LA LA LA LA LB LB LB LB
LB
0.5KLA
0.5KLB Number of Pixels
N/2 N P
P/2
Histogram:
0.5KLB 0.5KLA KLB Gray Level
Question 3
Case 2: LA > 2LB 0.5KLA > KLB
Level
LA
LA LA LA LA LB LB LB LB
LB
KLB
0.5KLB Number of Pixels
N/2 N P
P/2
Histogram:
0.5KLB KLB 0.5KLA Gray Level
Question 4
1
1
2 0
0 0 0 Chain Code: 000332123211
2
3
First Difference: 1 10 = 3
1 3 2 00 = 0
2
1 3 1 3 300303311330
Shape Number: 300303311330 smallest
2 2 003033113303 number
030331133030
= 003033113303
Question 5
c PRTwc
Rotation(s) required to align the Translation required to align the
camera frame with the world frame camera frame with the world frame
Question 5
a) Rotation about the x-axis by a = 135o is performed by using this transformation
1 0 0 0 1 0 0 0 1 0 0 0
0 cos a sin a 0 0 cos(135) sin(135) 0 0 2 / 2 2/2 0
Ra , 135
0 sin a cos a 0 0 sin( 135) cos(135) 0 0 2 / 2 2 / 2 0
0 0 0 1 0 0 0 1 0 0 0 1
Rotation about the z-axis by q = 135o is performed by using this transformation
cos q sin q 0 0 cos(135) sin(135) 0 0 2/2 2/2 0 0
sin q
cos q 0 0 sin(135) cos(135) 0 0 2 / 2 2 / 2 0 0
Rq , 135
0 0 1 0 0 0 1 0 0 0 1 0
0 0 0 1 0 0 0 1 0 0 0 1
For the Rotation Transformation Matrix, R = Ra x Rq:
1 0 0 0 2/2 2/2 0 0 2 / 2 2/2 0 0
0 2 / 2
2/2 0 2 / 2 2 / 2 0 0 1 / 2 1/ 2 2 / 2 0
R
0 2 / 2 2 / 2 0 0 0 1 0 1 / 2 1/ 2 2 / 2 0
0 0 0 1 0 0 0 1 0 0 0 1
b) The displacement (X0, Y0, Z0) is (0, 0, 2) and the following is the Translation
Transformation Matrix (to bring the camera back to the world origin)
1 0 0 X 0 1 0 0 0
0 1 0 Y0 0 1 0 0
T
0 0 1 Z 0 0 0 1 2
0 0 0 1 0 0 0 1
Question 5
c) For the Perspective Transformation Matrix, l=50mm=0.05m
1 0 0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 0 1 0 0
p
0 0 1 0 0 0 1 0 0 0 1 0
0 0 1/ l 1 0 0 1 / 0.05 1 0 0 20 1
d) For the point in the world coordinate (X,Y,Z)= (1/2, 1/2, 2/2)
X 1/ 2
Y 1 / 2
wc
Z 2 / 2
1 1