Sei sulla pagina 1di 8

-

Spatial Similarity Transformation

By:

Ahmad Yousef
Barragán William
Linag Zhang

June, 2005
-

Spatial Similarity Transformation


The main purpose of this report is to summarize how to develop a direct solution for a
spatial similarity transformation (absolute orientation).

Introduction

Coordinate transformations are required when you need to register different sets of
coordinates for objects in the same area that may have come from maps of different
(and sometimes unknown) projections ,transformations may conveniently be
performed using matrix arithmetic. For each transformation, there is a transformation
matrix R such that Qb = RQa, where Qa is a vector in the first coordinate system, and
Qb is the same vector in the second coordinate system. The transformation is thus
described by the nine components of the matrix R.

Usually the main component of transformation form system to another one contains
the following :

• Translations

Objects are usually defined relative to their own


coordinate system. We can translate points in
space to new positions by adding offsets to their
coordinates.

• Rotations

Rotations in three-dimensions are considerably more complicated than two-


dimensional rotations. In general, rotations are specified by a rotation axis and an
angle. In two-dimensions there is only one choice of a rotation axis that leaves
points in the plane.

-2-
-

• Scaling

Scaling also is important from system to system, since it maybe small or large one.

General Three dimensional Rotations

A rotation matrix for any axis that does not coincide with a coordinate axis can be set
up as a composite transformation involving combination of translations and the
coordinate-axes rotations.

There are 7 unknown required to transfer system to another system they are:
o Shift [ Xo, Yo & Zo ]
o Rotation [ omga, phi & kappa ]
o Scale

So get there unknown parameter the min number of ground control points required are
three as minimum, the matrix below show the relation between all there unknown
parameter

Where
X, Y & Z are Ground Coordinates
Xo, Yo & Zo are Coordinates Shift
λ is Scale Factor
R is Rotation Matrix
x, y & z are Model Coordinates

To solve a spatial similarity problem direct and iterative solutions have been worked
our, here we describe the direct solution for absolute orientation.

-3-
-

Mathematical and algorithmic formulation

• Reduce the coordinates in both coordinates systems to the center of


gravity; in this case the shift parameters are eliminated, as shown the
center of gravity for each system equal to the sum divided by number of
points.

• Calculate the average distance of the points to its center of gravity in both
coordinate systems, in this case the scale can be calculated.

After Appling the scale factor the final form will be as shown

Where
X” = λ . X’
Y” = λ . Y’
Z” = λ . Z’

-4-
-

• Estimate the rotation parameters between the centered and scale adapted
point coordinates of both coordinate systems.

As shown to find the value of a, b and c we use the least square method, also it is
possible to find the standard deviation which represent the error in our results.

-5-
-

As a, b and c are found, using the equations above to find the S value and then
calculate the rotation matrix, which represents the rotation in the three dimensions (X,
Y and Z), as shown omega, phi and kappa can be calculated ( here the results are in
Radian).

From the above we know till now the scale factor and the Rotation matrix, we still
looking to find the shift between the two coordinates, here we can use the COG as a
given point using the original transformation matrix to find the shift (Xo, Yo and Zo)
between the two systems.

The last step now is to use the calculated 7 parameters to transfer any given points, as
shown above the solution for given (x,y,z) point.

Summary of MatLab Code

SST is the Running program, the main purpose of this file is to insert the coordinate
that we need to transfer it and to get the final results which include the 7 unknown
parameters ( Shift, Rotation and Scale, [+ sigma]) and the transfer points coordinates.

-6-
-

Spatail_similarity is the main function which get the given unknown ground control
points coordinated and then it calculate the 7 parameter and send it to the SST file.

To check our code we crate another code which crate a 7 parameter randomly and
another 10 ground control points in the first system, which then transform by the
random parameter to get their corresponding coordinate in the second coordinate
system, as we have these parameters and points we run the SST code to get the results
(the 7 parameters) and then we compare it with the random parameters the we used.

Example

we generate a data set for 10 points in each coordinate system using random
parameter, the data below show these data form a MatLab code prepare to do
this step, here we have twenty points, ten of them will be uses as ground
control points, and the rest ten points will be transform using our code and
then compare the results with the same data set for the second system.

omega = 7.6037 7.8886 6.2989


8.7574 5.2982 4.3866 3.7048
phi = 6.4053 4.9831 5.7515
7.3731 2.0907 2.1396 4.5142
kappa = 3.7982 6.4349 0.4390
1.3652
Scale = XYZ_coordenates =
1.1757 13.4032 40.2482 5.1093
XYZ0_coordenates = 6.2991 37.5702 13.3042
2.7185 31.2685 1.2863 7.1687 35.4836 10.0686
10.8922 37.4652 6.1119
xyz_coordenates = 6.9364 39.3123 10.9039
8.9390 7.8333 3.2004 8.5757 31.7177 3.8025
1.9914 6.8085 9.6010 3.9699 37.5202 7.3622
2.9872 4.6110 7.2663 15.6330 30.6958 10.7027
6.6144 5.6783 4.1195 10.4272 35.1735 9.0748
2.8441 7.9421 7.4457 7.8908 34.6470 3.6791
4.6922 0.5918 2.6795 9.7507 40.1920 11.8065
0.6478 6.0287 4.3992 7.5556 30.4957 8.0759
9.8833 0.5027 9.3338 7.7530 40.1669 3.6024
5.8279 4.1537 6.8333 5.3950 42.2876 5.1178
4.2350 3.0500 2.1256 10.117941.9800 9.2506
5.1551 8.7437 8.3924 12.3127 39.6948 8.8834
3.3395 0.1501 6.2878 9.3313 35.9724 5.5888
4.3291 7.6795 1.3377 10.9139 36.3577 7.8959
2.2595 9.7084 2.0713 5.7771 33.0573 6.5760
5.7981 9.9008 6.0720 7.0332 38.8544 2.4165

Now we use the first ten points as a CGP’s to find the parameter and the rest
ten points (X,Y,Z) as a given points to transform it to (x,y,z) System
Shift_in_Coordinates =
2.7185 31.2685 1.2863
Rotation_opk =
8.7574 7.3731 1.3652
Scale =
1.1757
Standard_Deviation =
0.0000

-7-
-

Results =
X Y Z x y z
9.7507 40.192 11.80655.1551 8.7437 8.3924
7.5556 30.4957 8.0759 3.3395 0.1501 6.2878
7.753 40.1669 3.6024 4.3291 7.6795 1.3377
5.395 42.2876 5.1178 2.2595 9.7084 2.0713
10.117941.98 9.2506 5.7981 9.9008 6.072
12.3127 39.6948 8.8834 7.6037 7.8886 6.2989
9.3313 35.9724 5.5888 5.2982 4.3866 3.7048
10.9139 36.3577 7.8959 6.4053 4.9831 5.7515
5.7771 33.0573 6.576 2.0907 2.1396 4.5142
7.0332 38.8544 2.4165 3.7982 6.4349 0.4390
Result Summary

The table below summarizes the used parameters and the calculated one.

Parameter Used Calculated


XYZo 2.7185 31.2685 1.2863 2.7185 31.2685 1.2863
Rotation opk 8.7574 7.3731 1.3652 8.7574 7.3731 1.3652
Scale 0.9500 0.9500
Sigma --- 0.0000
Tranform XYZ 5.1551 8.7437 8.3924 5.1551 8.7437 8.3924
3.3395 0.1501 6.2878 3.3395 0.1501 6.2878
4.3291 7.6795 1.3377 4.3291 7.6795 1.3377
2.2595 9.7084 2.0713 2.2595 9.7084 2.0713
5.7981 9.9008 6.0720 5.7981 9.9008 6.0720
7.6037 7.8886 6.2989 7.6037 7.8886 6.2989
5.2982 4.3866 3.7048 5.2982 4.3866 3.7048
6.4053 4.9831 5.7515 6.4053 4.9831 5.7515
2.0907 2.1396 4.5142 2.0907 2.1396 4.5142
3.7982 6.4349 0.4390 3.7982 6.4349 0.4390

-8-

Potrebbero piacerti anche