Image Processing Reference
In-Depth Information
h · x
h
a 1 · x + a 2 · y + a 3
c 1 · x + c 2 · y +
x =
=
(10.13)
1
y
h
h
·
b 1 ·
x
+
b 2 ·
y
+
b 3
y =
=
(10.14)
c 1 ·
x
+
c 2 ·
y
+
1
Rewriting into matrix form we have
x
y
xy 1000
x
x
x
·
y
·
· d
=
(10.15)
y
y
000 xy 1
x
·
y
·
T .
In order to find the values of the coefficients we need to know the positions of
four points in both coordinate systems, i.e., eight equations with eight unknowns.
We could for example send out four points from the projector and then find their
positions (automatic or manual) in the image, see Fig. 10.6 (b). Then we would have
the positions of four corresponding points in both coordinate systems:
d
where
=[
a 1 ,a 2 ,a 3 ,b 1 ,b 2 ,b 3 ,c 1 ,c 2 ]
(x 1 ,y 1 ) x 2 ,y 2 )
(x 2 ,y 2 ) x 3 ,y 3 )
(x 3 ,y 3 )
(x 1 ,y 1 )
(x 4 ,y 4 )
(x 4 ,y 4 )
(10.16)
If we enter these points into the equations we end up with the following linear
system
K d :
e
=
x 1
y 1
x 2
y 2
x 3
y 3
x 4
y 4
x 1
x 1
x 1
y 1
10 00
x 1 ·
y 1 ·
a 1
a 2
a 3
b 1
b 2
b 3
c 1
c 2
y 1
y 1
000 x 1
y 1
1
x 1 ·
y 1 ·
x 2
x 2
x 2
y 2
10 00
x 2 ·
y 2 ·
y 2
y 2
000 x 2
y 2
1
x 2 ·
y 2 ·
=
·
(10.17)
x 3
x 3
x 3 ·
y 3 ·
x 3
y 3
10 00
y 3
y 3
x 3 ·
y 3 ·
000 x 3
y 3
1
x 4
x 4
x 4
y 4
10 00
x 4 ·
y 4 ·
x 4 · y 4
y 4 · y 4
000 x 4
y 4
1
d
K 1
=
e , which is
solved using linear algebra, see Appendix B. So, what we end up with are values for
the coefficients a 1 , a 2 etc. If we insert these into Eqs. 10.13 and 10.14 we can insert
a point (x, y) and calculate where that point will end up in the other coordinate
system, i.e., (x ,y ) . If we want to reverse the mapping, so we can go from (x ,y )
to (x, y) , we simply reverse the four points so that x 1 become x 1 , x 2 become x 2 etc.
These new points are inserted into Eq. 10.17 and we can find the coefficients of the
reverse mapping. 2
The coefficients of the transformation are now found as
2 In Chaps. 12 and 13 homography is used in two concrete examples.
Search WWH ::

Custom Search