Image Processing Reference
In-Depth Information
which implies that
N
f
()
= 0
a
a
2 (
f
- (
f
xy
, , ))
a
(9.21)
i
i
i
i
=1
The solution is usually of the form
Ma
=
F
(9.22)
where
M
is a matrix of summations of products of the index
i
and
F
is a vector of
summations of products of the measurements and
i
. The solution, the best estimate of the
values of
a
, is then given by
ˆ
aMF
-1
(9.23)
By way of example, let us consider the problem of fitting a two-dimensional surface to a
set of data points. The surface is given by
f
(
x
,
y
,
a
) =
a
+
bx
+
cy
+
dxy
(9.24)
where the vector of parameters
a
= [
a
b
c
d
]
T
controls the shape of the surface, and (
x
,
y
) are the co-ordinates of a point on the surface. Given a set of (noisy) measurements of the
value of the surface at points with co-ordinates (
x
,
y
),
f
i
=
f
(
x
,
y
) +
v
i
, we seek to estimate
values for the parameters using the method of least squares. By Equation 9.19 we seek
=
N
ˆ
ˆ
a
ˆ
ˆ
T
2
= [
abcd
]
= min
(
f
- (
fx y
,
,
a
))
(9.25)
i
i
i
i
=1
By Equation 9.21 we require
N
fx y
a
a
(, , )
= 0
i
i
2
(
f
- ( +
a
bx
+
cy
+
dx y
))
(9.26)
i
i
i
i
i
i
=1
By differentiating
f
(
x
,
y
,
a
) with respect to each parameter we have
∂
fx y
a
(, )
= 1
i
i
(9.27)
fx y
b
(, )
=
i
i
x
(9.28)
fx y
c
(, )
=
i
i
(9.29)
y
and
fx y
d
(, )
=
i
i
xy
(9.30)
and by substitution of Equations 9.27, 9.28, 9.29 and 9.30 in Equation 9.26, we obtain four
simultaneous equations:
N
Σ
=
1
(
f
- ( +
a
bx
+
cy
+
dx y
))
1 = 0
(9.31)
i
i
i
i
i
i
N
=1
(
f
- ( +
a
bx
+
cy
+
dx y
))
x
= 0
(9.32)
i
i
i
i
i
i
i