Docsity

Adaptive Camera Calibration - Lecture Notes | E C E 801, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
Adaptive Camera Calibration
Hariprasad Kannan (mail: [email protected])
1Objective
Obtain the constant internal and external camera calibration parameters, using an
adaptive estimator. We will do that by moving a feature point in front of a camera
(or moving a camera about a Þxed feature point) and use the video measurements to
update the estimator.
2 Notation
We will use the following convention [5]: vectors are speciÞed as v
n
eb
,which signiÞes
the vector vof the bframe relative to the eframe and expressed in the nframe. A
rotation matrix is speciÞed as R
t
f
∈SO(3), which transforms coordinates deÞned
in the fframe to the tframe. For a variable v,bvdenotes its estimated value and
ev,v−bv, gives the estimator error.
3TheExperimentalSetup
Refer to Figure 1. The frames Þxed to the robot’s base, the robot’s end-effector and
the camera are denoted as B,Eand C, respectively. The Þxed camera system, has a
stationary camera looking at the feature on the end-effector and the robot is moved
about to get enough images of the feature at various positions and orientations. Also,
the current location of the feature with respect to Bis always known. Since, the robot
link lengths are known and the current joint angles can be measured, it is reasonable
to assume that the end-effector feature can be located. In the moving camera case,
the feature is stationary and the camera is moved about to record the images. We
assume that the feature is located at a known distance from B. This is a reasonable
assumption, too. Suppose we want to calibrate a camera Þxed to a robotic arm of a
space station. When the camera needs calibration, all that it has to do is turn back
at the space station and record images of some feature on the space station (like, a
corner). This location of the feature will be known because we know the dimensions
of the space station.
4 What is Camera Calibration?
The camera is a mapping between the 3D world (object space) and a 2D image.
Camera models are matrices with particular properties that represent the camera
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Adaptive Camera Calibration - Lecture Notes | E C E 801 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Adaptive Camera Calibration

Hariprasad Kannan (mail: [email protected])

1 Objective

Obtain the constant internal and external camera calibration parameters, using an

adaptive estimator. We will do that by moving a feature point in front of a camera

(or moving a camera about a fixed feature point) and use the video measurements to

update the estimator.

2 Notation

We will use the following convention [5]: vectors are specified as v

n

eb

, which signifies

the vector v of the b frame relative to the e frame and expressed in the n frame. A

rotation matrix is specified as R

t

f

∈ SO(3), which transforms coordinates defined

in the f frame to the t frame. For a variable v, bv denotes its estimated value and

ev , v − bv, gives the estimator error.

3 The Experimental Setup

Refer to Figure 1. The frames fixed to the robotís base, the robotís end-effector and

the camera are denoted as B, E and C, respectively. The fixed camera system, has a

stationary camera looking at the feature on the end-effector and the robot is moved

about to get enough images of the feature at various positions and orientations. Also,

the current location of the feature with respect to B is always known. Since, the robot

link lengths are known and the current joint angles can be measured, it is reasonable

to assume that the end-effector feature can be located. In the moving camera case,

the feature is stationary and the camera is moved about to record the images. We

assume that the feature is located at a known distance from B. This is a reasonable

assumption, too. Suppose we want to calibrate a camera fixed to a robotic arm of a

space station. When the camera needs calibration, all that it has to do is turn back

at the space station and record images of some feature on the space station (like, a

corner). This location of the feature will be known because we know the dimensions

of the space station.

4 What is Camera Calibration?

The camera is a mapping between the 3D world (object space) and a 2D image.

Camera models are matrices with particular properties that represent the camera

x

B

E

xc

P

C

CB

; R

B

C

C

Fixed Camera System

P

C

CE

; R

E

C

E

B

C

P

B

BF

; R

B

F

xc

x

Moving Camera System

Feature Point F

Figure 1: The two types of setups.

mapping. The simplest camera model is the pinhole camera model. Refer to Figure

  1. The following descriptions are for the fixed camera case but it is straightforward

to write down the moving camera equations. In Figure 2

y =

u

v

x =

X

Y

Z

x c

X

c

Y

c

Z

c

where x(t) ∈ R

3 and x c

(t) ∈ R

3 are the euclidean coordinates of the feature on the

robotís end effector (i.e., the object that is being captured) with respect to B and

C, respectively and y(t) ∈ R

2 is the image coordinates of the feature. It is seen that

l x

l y

mx

m y

Á Á

y -y sensor

-x sensor

; x

Figure 3: The usual shape of the sensor.

where Ω ∈ R

3 ◊ 3 , denotes the Intrinsic Calibration Matrix. We would also like to

know the position and orientation of the camera frame C with respect to robot base

frame B. Frame B is a convenient known fixed world frame in our setup, so if we can

get the transformation to C with respect to B , we know where the camera is in the

world. From Figure 1, x c

(t) is related to x(t) as follows

X

c

Yc

Z

c

R

C

B

P

C

CB

1 ◊ 3

X

Y

Z

T ,

R

C

B

P

C

CB

1 ◊ 3

where R

C

B

∈ SO(3) is the rotation matrix transforming coordinates from frame B to

frame C and P

C

CB

∈ R

3 is the position of frame B with respect to frame C expressed

in frame C and T ∈ R

4 ◊ 4 , denotes the Extrinsic Calibration Matrix, an homogeneous

transformation to the camera frame from a fixed world frame. Read [9] and refresh

your knowledge about these concepts. Combining equations 4 and 5 we get

y =

1

Zc

R

C

B

x + P

C

CB

f k u

−f k v

cot φ u 0

f kv

sin φ

v 0

and Zc = r

T

3

x + P 3

where r

T

3

∈ R

3

is the last row of R

C

B

and P 3

is the last element of P

C

CB

. This form of

Z

c

follows directly from 5.

To calibrate a camera is to find the individual parameters of the matrices Ω and

T , i.e., to find f, k u,

k v,

φ, u 0 ,

v 0 ,

R

C

B

and P

C

CB

. In the moving camera case finding

the location of the camera means to find the location of the camera with respect to

the end-effector (we know or can measure all the other distances and orientations in

the system), i.e., to find R

C

E

and P

C

CE

[1], [3], [4], [7] are good references. Have a look.

5 Estimator Design

Consider the following system

a 1

a 2

c ef

0 cd

b 1

b 2

where a 1 (t), a 2 (t), b 1 (t), b 2 (t) ∈ R

1

are measurable (known) variables and c, d, e,

f ∈ R

1 are unkown, constant system parameters. By multiplying out 7 we get the

following expression ∑

a 1

a 2

cb 1

  • ef b 2

cdb 2

The right hand side of 8 can be re-written in its Linear-parameterized form as follows

cb 1 + ef b 2

cdb 2

b 1 b 2 0

0 0 b 2

| {z }

W

c

ef

cd

| {z }

Θ

where W (t) ∈ R

2 ◊ 3 contains only known elements and Θ ∈ R

3 contains all the

unknown elements. Such a seperation of variables is not possible for all systems.

By taking sufficient measurements of the known variables, a good estimate of Θ

can be obtained. Observe that some of the unknowns appear multiplied together in

Θ and that is acceptable in many cases. This is because apart from the algebraic

relationships in Θ, there will be other conditions on the system which will impose more

conditions on these variables and we can end up finding all the variables seperately.

For example, in the above system c is estimated straightaway, from which d can

be estimated because we have an estimate of cd. To get e and f seperately, one

needs another algebraic relationship between e and f. Usually, there will be such

relationships. In our project the rotation matrix R has properties like its determinant

value is equal to 1 and its inverse is equal to its transpose. We will use these properties

to get the individual parameters.

In our system, y(t) in 6 can be written in the Linear-parameterized form as follows

y =

W Θ

1

2

yΠΘ 2

= W Θ

1

where ρ (X, Y, Z) ∈ R

1 is a positive function defined such that the condition in 16

always holds.

  1. Obtain the updated

b Θ(t) from

.

b Θ (t).

  1. Go back to step 2, until

e Θ(t) is very small.

5.1 Projection Algorithm

We ensure that Π

b Θ 2

(t) > 0 , by defining a projection operator on

.

b Θ (t) [6]. To

facilitate further development an auxiliary function is defined and its gradient is also

computed as follows

P(

b Θ) , ε − Π

b Θ 2

b Θ

P(

b Θ) =

p 1 ◊ 1

T

∇b Θ

P

T

(

b Θ) =

1 ◊p 1

where ε is defined in 11. Two convex sets based on the function P(

b Θ) are defined as

follows

R ,

n

b Θ ∈ R

p 1 + p 2

: P(

b Θ) ≤ 0

o

R

δ

n

b Θ ∈ R

p 1 + p 2

: P(

b Θ) ≤ δ

o

where δ ∈ R

1 , is a positive constant that is very close to zero. Let us denote the

boundary of a set R by ∂R and its interior by

∞

R.^ Given these definitions, the

projection of τ is defined as follows

Proj {τ } ,

τ

b Θ ∈

∞

R or^ ∇b Θ

P

T τ ≤ 0

I − c(

b Θ)Γ

∇b Θ

P∇ (^) b Θ

P

T

∇b Θ

P

T Γ∇b Θ

P

τ

b Θ ∈ R δ

\

∞

R and^ ∇b Θ

P

T τ > 0

c(

b Θ) , min

P(

b Θ)

δ

It is helpful to note that c(∂R ) = 0 and c(∂

∞

R) = 1.^ In the subsequent stability

analysis the following property of the projection operator is used (refer to [6] for the

proof)

e Θ

T

Γ

− 1

Proj {τ } ≤ −

e Θ

T

Γ

− 1

τ , ∀

b Θ ∈ R δ

, Θ ∈ R. (17)

6 Stability Analysis

Theorem 1 The update law defined in 15 ensures that

e Θ(t) → 0 as t → ∞ provided

the following persistent excitation condition [8] is satisfied

γ 1

I

n

Z

t 0 +T

t 0

W

T

(τ )W (τ )dτ ≤ γ 2

I

n

where γ 1

, γ 2

∈ R

1

are positive constants and In ∈ R

n◊n

is n ◊ n Identity Matrix.

Proof. We consider the following Lyapunov function

V =

e Θ

T

Γ

− 1 e Θ (19)

After taking the time derivative of 19 and substituting 14 and 15, we obtain the

following expression

.

V =^

e Θ

T

Γ

− 1

.

e Θ +

e Θ

T

d

dt

− 1

e Θ

e Θ

T

Γ

− 1

Proj {τ } +

e Θ

T

W

T

W

e Θ

Using 17 the expression can be upper bounded as follows

V ≤ −

e Θ

T

Γ

− 1

τ +

W

e Θ

T

W

e Θ

≤ −α

e Θ

T

Γ

− 1

ΓW

T

ye + (ΠΘ 2

2

ye

T

ey

= −α (ΠΘ 2

) ye

T

ey + (ΠΘ 2

2

ey

T

ey

2

) keyk

2

− ρ (ΠΘ 2

) keyk

2

  • (ΠΘ 2

2

kyek

2

Based on 16 and followed by 11,

V (t) can be further upper bounded as follows

.

V ≤^ −^ (ΠΘ 2 )^ keyk

2

.

V <^ −ε^ keyk

2

(20)

From 20 and 19 we can conclude that

Z

∞

0

ε keyk

2

dτ < V (0) − V (∞) (21)

From 21 and the fact that V (t) is non-negative, it can be concluded that V (t) <

V (0) for any t. Hence, V (t) ∈ L ∞

, i.e., V (t) is bounded. It can be concluded from 21

and V (t) ∈ L∞, that ye(t) ∈ L 2 ,i.e., the 2-norm of ye(t) is bounded. Hence, from 11 and

13 W (t)

e Θ(t) ∈ L 2

. Therefore, from 19

e Θ

T (t)Γ

− 1 (t)

e Θ(t) ∈ L ∞

, i.e.,

e Θ

T (t)Γ

− 1 (t)

e Θ(t)

is bounded. Since, Γ

− 1

(0) is positive definite and it is assumed that the persistent

excitation condition in 18 is satisfied, 14 can be used to show that Γ

− 1 (t) is always