Professional Documents
Culture Documents
3D Transformation PDF
3D Transformation PDF
3D Transformation PDF
FIGURE C-5
XYZ and xyz right-handed three-dimensional
Since all the residuals have small magnitudes, the solution is deemed acceptable coordinate systems.
and the transformed coordinates of points 1,2, and 3 are then computed as follows:
where
The matrix M is commonly called the rotation matrix. The individual elements of
the rotation matrix are direction cosines which relate the two axis systems. These matrix
elements, expressed in terms of direction cosines, are
FIGURE C-9
cos xr' cos xyf cos .xzf
cos yx' cos yy' cos yz'
COS a' COS zyr COS zz' I (C-35)
In the above matrix, cos xr' is the direction cosine relating the x and x' axes, cos xy' re-
lates the x and y' axes, etc. Direction cosines are simply the cosines of the angles in
I\ Kappa rotation about the z2 axis.
space between the respective axes, the angles being taken between 0" and 180". It is an
important property that the sum of the squares of the three direction cosines in any row
o r in any column is unity. This property may be used to check the computed elements of
Factoring Eqs. (C-30) gives the rotation matrix for correctness.
The rotation matrix is an orthogonal matrix, which has the property that its in-
+
x = x' (cos 4 cos K) y' (sin w sin 4 cos K + cos o sin K) verse is equal to its transpose, or
+ zl(-cos o sin 4 cos K + sin w sin K)
y = x f ( - c o s 4 s i n ~ ) + y ' ( - S ~ ~ W ~ ~ ~ ~ ~ ~ ~ K + C O (C-31)
SWCOSK) By using this property, Eq. (C-34) may rewritten, expressing x'y'z' coordinates in terms
+ +
zl(cos w sin 4 sin K sin o cos K) of xyz coordinates as follows:
z = xl(sin 4 ) + yl(-sin w cos 4 ) + z' (cos o cos 4 ) X' = M ' X (C-37)
Substituting m's for the coefficients of x', y', and z' in Eqs. (C-31) gives In expanded form this equation is:
[:]
tives with respect to the indicated unknowns evaluated at the initial approximations; and
In Eq. (C-40), matrices M and X are as previously defined, s is the scale factor, and , dTy,and dT, are corrections to the initial approximations which will
ds, dw, d 4 , d ~dTx,
i = and T= [$] be computed during the solution. The units of dw, d 4 , and d~ are radians.
Substituting letters for partial derivative coefficients, adding residuals to make the
equations suitable for a least squares solution, and rearranging terms, the following
equations result.
In Eqs. (C-39), the nine m's are not independent of one another, but rather, as seen
in Eqs. (C-33), they are functions of the three rotation angles w, 4 , and K . In addition to
these three unknown angles, there are three unknown translations and one scale factor a,, ds + a,,dw + a,, d$ + a,, d~ + aZsdTx + aZ6dTY + a,, dTz = [Y, - (Y,),] + vyp
in Eqs. (C-39), for a total of seven unknowns. A unique solution is obtained for the un-
knowns if the x and y coordinates of two horizontal points and the z coordinates of three f l , ~ds a32 dw f fl3, d$ + a,, d~ + 035 dTx + fl,, dTy + a37 dTz = [Zp - (Zp),] f vzp
vertical points are known in both coordinate systems. If more than the minimum of (C-42)
seven coordinates are known in both systems, redundant equations may be written,
which makes possible an improved solution through least squares techniques. To clarify the coefficients of Eqs. (C-42), the partial derivative terms, which must be
Solution of the three-dimensional conformal coordinate transformation is more evaluated at the initial approximations, are as follows:
complex than that of the two-dimensional transformations presented earlier in this ap-
pendix. This added complexity is due to the fact that Eqs. (C-39) are nonlinear in terms
of the unknowns s, w ,4 , and K. While it is possible to directly compute values for the a,, = 0
translation factors since their terms exist in a linear form, it is more convenient to treat
them as if they appeared in a nonlinear form. To solve these equations, they are
a,, = [(-sin 4 cos K)xp + sin 4 sin K (yp) + cos 4 ( ~ p ) l s
linearized by using a Taylor series expansion including only the first-order terms. Ap- = (m21xP - mll~P)s
plication of Taylor's series requires that initial approximations be obtained for each of
the seven unknowns. Each point P contributes as many as three equations (two if the a,, = a,, = a,, = 1
point is horizontal only and one if the point has just vertical control) which are
a I 6 = a,, = az5 = a2, = = a36= 0
linearized as shown in Eqs. (C-41).
= m ~ 2 x+
~ n122y~+ m3zz~
02, = (-m,,xp - m23yp - m33zp)x
a2, = [(sin w cos + cos K)x, + (-sin w cos 4 sin K)y, + (sin w sin 4 ) zp]s
In a least squares solution, each point contributes up to three rows of coefficients to the
A matrix, as well as terms in the L and Vmatrices. In general, assuming points 1,2, . . . ,n
are three-dimensional control points, the following matrix equation results:
542 APPENDIX c APPENDIX C 543
where corrections get larger with each subsequent iteration instead of smaller), or the solu-
tion may converge to an erroneous set of transformation parameters. In cases involv-
ing stereomodels formed from near-vertical photography, o and 4 may be assumed to
be zero. An approximation for K may be determined from the difference in azimuths
of a common line in both systems, and an approximation for s may be determined
from the ratio of the lengths of a common line. Approximations for the translation
factors may then be found by rearranging Eqs. (C-39) so that T,, T,, and T, are iso-
lated on the left side. By using previously determined initial approximations for s, o,
4, and K , and the coordinates of a common point on the right-hand side, initial ap-
proximations for the translations may thus be determined. When the assumption of
near-vertical photography is invalid, such as when one is dealing with' terrestrial pho-
tography, an alternative method must be used. The reader may consult Dewitt (1996)
in the references for a description of this technique.