Docsity

Optical Flow and Stereo Vision: Problems and Solutions, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
Homework 4
I. PROBLEM 1
Let’s attach the co-ordinate system to the camera. We can now equivalently think of the plane moving towards the camera
with velocity −W. Let (X, Y, Z )be the 3D coordinates. The velocity of the point is given by V= ( ˙
X, ˙
Y , ˙
Z)T= (0,0,−W)T.
The image point (x, y)is given by x=fX/Z and y=fY /Z.
•(a) The optical flow (u, v)is given by
u= ˙x
=fX d
dt
1
Z
=−fX ˙
Z
Z2
=fX W
Z2(1)
=xW
Zsincex=f X
Z
Similarly, we can show that v=yW
Z.
•(b) To compute stationarity we compute ˙u=du
dt and ˙v=dv
dt .
˙u=du
dt
=d
dt
fXW
Z2(from equation(1)) (2)
=−2fXW ˙
Z
Z3
=2f XW 2
Z3
=2xW 2
Z26= 0
Similarly we can show that ˙v=2yW 2
Z26= 0.
•(c) Laplacian of the flow is given by
∇2u=∇2(xW
Z) = 0.(3)
Similarly ∇2v= 0.
•(d) Time to impact Tis given
T=W
Z
=u
x
=v
y
Thus, time to impact can be computed from the optical-flow without the need to actually recover the true 3D velocity of
distance.
II. PROBLEM 2
A rigid body rotates about an axis through the origin. The axis of rotation is parallel to the vector ω, while the angular velocity
is given by the magnitude of this vector. The coordinates of the 3D world point ris denoted by (x, y, z ). Its corresponding
image point is denoted by (X, Y ). Under orthographic projection, we have X=x, Y =y. The optical flow is given by
(u, v) = ( ˙
X, ˙
Y) = (˙x, ˙y). The 3D velocity vector is given by V=−t−ω×r. In our case, t= 0. Using the relation
V= ( ˙x, ˙y, ˙z), we can write
pf3

Partial preview of the text

Download Optical Flow and Stereo Vision: Problems and Solutions and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

Homework 4

I. PROBLEM 1

Let’s attach the co-ordinate system to the camera. We can now equivalently think of the plane moving towards the camera with velocity −W. Let (X, Y, Z) be the 3D coordinates. The velocity of the point is given by V = ( X,˙ Y ,˙ Z˙)T^ = (0, 0 , −W )T^. The image point (x, y) is given by x = f X/Z and y = f Y /Z.

  • (a) The optical flow (u, v) is given by u = ˙x

= f X

d dt

Z

= −f X

Z˙

Z^2

= f X

W

Z^2

= x

W

Z

since x =

f X Z Similarly, we can show that v = y W Z.

  • (b) To compute stationarity we compute u˙ = du dt and v˙ = dv dt.

u ˙ =

du dt =

d dt

f XW Z^2

(from equation(1)) (2)

2 f XW Z˙ Z^3 =

2 f XW 2 Z^3 =

2 xW 2 Z^2

Similarly we can show that v˙ = 2 yW^

2 Z^2 6 = 0.

  • (c) Laplacian of the flow is given by

∇^2 u = ∇^2 (

xW Z

Similarly ∇^2 v = 0.

  • (d) Time to impact T is given

T =

W

Z

u x =

v y Thus, time to impact can be computed from the optical-flow without the need to actually recover the true 3D velocity of distance.

II. PROBLEM 2

A rigid body rotates about an axis through the origin. The axis of rotation is parallel to the vector ω, while the angular velocity is given by the magnitude of this vector. The coordinates of the 3D world point r is denoted by (x, y, z). Its corresponding image point is denoted by (X, Y ). Under orthographic projection, we have X = x, Y = y. The optical flow is given by (u, v) = ( X,˙ Y˙ ) = ( ˙x, y˙). The 3D velocity vector is given by V = −t − ω × r. In our case, t = 0. Using the relation V = ( ˙x, y,˙ z˙), we can write

x ˙ = γy − βz y ˙ = αz − γx Thus, the optical flow is given by (u, v) = (γy − βz, αz − γx). To measure smoothness of the optical flow, we compute ∇^2 u and ∇^2 v. From the above relations,

∇^2 u = γ∇^2 y − β∇^2 z = −β∇^2 z ∇^2 v = α∇^2 z − γ∇^2 x = α∇^2 z Thus, we see that the smoothness of flow is directly related to the smoothness of the surface (∇^2 z). At the silhouette or the occluding boundary, there is an abrupt change in scene depth. Hence, ∇^2 z becomes infinite. This causes the estimates of optical flow at the boundary to have large errors.

III. PROBLEM 3

Fig. 1. Figure for Problem 3

  • (a) From the figure above, tan θl = h x and tan(π − θr ) = (^) b−hx. It is easy to eliminate x from these two relations and obtain

h = b sinθr sinθl sin(θr − θl)

  • (b) Now we are told that we measure θˆl = θl + dθl and θˆr = θr + dθr , where dθl and dθr are random variables with variance σ^2. Now

ˆh = h + dh

= h +

∂h ∂θl

dθl +

∂h ∂θr

dθr

var(ˆh) = var(dh)

=

∂h ∂θl

σ^2 +

∂h ∂θr

σ^2

Now, ∂h ∂θl

= b

sinθr cosθl sin(θr − θl)

  • b

sinθr sinθlcos(θr − θl) sin^2 (θr − θl)

= b

sinθr sin^2 (θr − θl)

(cosθlsin(θr − θl) + sinθlcos(θr − θl))

= b

sinθr sin^2 (θr − θl)

sin(θl + θr − θl)

= b

sin^2 θr sin^2 (θr − θl)

=

h^2 bsin^2 θl