ALTERNATIVE METHOD OF ANALYSIS OF RESULTS OF 3D TERRESTRIAL LASER SCANNING (COMMENT TO THE ARTICLE "CONTRIBUTION TO A ROCK BLOCK SLIDE EXAMINATION BY A MODEL OF MUTUAL TRANSFORMATION OF POINT CLOUDS", ACTA CARSOLOGICA, 38,1) DRUGAČEN NAČIN ANALIZE REZULTATOV 3D TERESTRIČNEGA LASERSKEGA SKENIRANJA (KOMENTAR K ČLANKU "PRISPEVEK K PREVERJANJU ZDRSA SKALNEGA BLOKA Z MODELOM MEDSEBOJNE PRESLIKAVE OBLAKOV TOČK", ACTA CARSOLOGICA, 38,1) Matija PERNE1 Abstract UDC 528.8.04:551.435.6(497.4) Matija Perne: Alternative method of analysis of results of 3D terrestrial laser scanning (comment to the article "Contribution to a rock block slide examination by a model of mutual transformation of point clouds", Acta Carsologica 38,1) The article Konič et al. (2009) describes efforts to find out if the rock block on which the castle of Črni kal is situated slid away from the Kraški rob wall. 3D terrestrial laser scanning has been used to determine positions of many points on both presumed contact surfaces and 12-parameter affine transformation that transforms the cloud of points from one wall into another has been found. The deviation between matching point clouds has been used as a test of the original hypothesis. It has been concluded that the rock block did slide. Some of the data from the article are re-analysed using another numerical method. A 6-parameter translation composed with rotation that best transforms the 12 published points from the rock block wall into their counterparts on the Kraški rob wall is found. The original hypothesis is confirmed and some additional insight into the block slide is revealed. Keywords: rock block slide, 12-parameter affine transformation, rotation matrix, translation vector. Izvleček UDK 528.8.04:551.435.6(497.4) Matija Perne: Drugačen način analize rezultatov 3D terestri-čnega laserskega skeniranja (komentar k članku "Prispevek k preverjanju zdrsa skalnega bloka z modelom medsebojne preslikave oblakov točk", Acta Carsologica 38,1) Članek Konič et al. (2009) ugotavlja, ali je skalni blok, na katerem stoji grad Črni kal, zdrsnil od stene Kraškega roba. Z uporabo 3D terestričnega laserskega skeniranja so določili lege velikega števila, oblaka, točk na vsaki od obeh morebitnih stičnih ploskev. Poiskali so 12 parametrično afino preslikavo, ki preslika en oblak v drugega. Standardni odklon med legami točk v prekrivajočih se oblakih so uporabili kot merilo za preverjanje hipoteze in zaključili, da se je skalni blok odtrgal in premaknil kot blokovni plaz. Del podatkov iz članka smo analizirali z drugačno numerično metodo. Poiskali smo 6 parametričen kompozitum translacije in rotacije, ki najbolje preslika 12 objavljenih točk s skalnega bloka v pripadajoče točke na steni Kraškega roba. S tem smo potrdili prvotno hipotezo in prišli do novih ugotovitev o zdrsu skalnega bloka. Ključne besede: zdrs skalnega bloka, afina 12 parametrična transformacija, rotacijska matrika, translacijski vektor. INTRODUCTION In the article Konič et al. (2009) a possible rock block slide on Kraški rob has been identified. 3D terrestrial laser scanning has been used to compare the walls of the block and of the Kraški rob. 12 pairs of corresponding points on the rock block wall and on the Kraški rob wall that shall stick together prior to the slide have been iden- tified. A 12-parameter affine transformation that best transforms the chosen points on the rock block wall into their corresponding points on the Kraški rob wall has been calculated. A measure of discrepancy between the transformed rock block points and Kraški rob wall points has been introduced and calculated. The whole cloud of 1 Karst Research Institute ZRC SAZU, Titov trg 2, SI-6230 Postojna, Slovenia, e-mail: matija.perne@zrc-sazu.si Received/Prejeto: 5.12.2011 ACTA CARSOLOGICA 41/1, 151-155, POSTOJNA 2012 measured points on the rock block wall has been transformed using the same transformation and compared to the cloud corresponding to Kraški rob wall. Both clouds together contain 3822 points. A measure of discrepancy, presumably the same one, has been used for the clouds and a similar value has been obtained. It has been concluded that the rock block did break off from Kraški rob and slid down. A 12-parameter affine transformation is somewhat more general than required for the presented case. It is expected that if a less elaborate but still sufficient transformation was used, the results would be more accurate and more information would be extracted from the data, while the results would be easier to interpret. A 6-parameter translation composed with rotation around the origin corresponding to the possible block slide is found using the 12 published pairs of corresponding points. It is proposed to transform the whole rock block wall cloud the same way for comparison. METHODS Affine transformation from a vector space to itself is translation composed with linear transformation (wiki-pedia 2010a). Linear transformation consists of rotation around origin and linear deformation, while linear deformation consists of scaling and shear (wikipedia 2010c). A general affine transformation in three-dimensional vector space can be expressed as a matrix equation x' = M ■ X + T or by components as x' MocM^YM^ \X\ T. z' = MyxMyyMyZ Y + Ty M^XM^YM^ Z T. (1) (2) Here X stands for the original vector, M is transformation matrix, T is translation vector, and x' is the image. The transformation is determined by 12 parameters Mij and T^. Any rotation of frame of reference can be described by three Euler angles (Wikipedia 2010b). The frame is first rotated for the angle a around its z axis, then for angle ß around the image of x axis after the first rotation, labelled "N" in Fig. 1. As last it is rotated for angle y around the image of the z axis after the first two rotations which is labelled "Z" in Fig. 1. The coordinates of a vector in the rotated coordinate system can be calculated as Fig. 1: Euler angles (Source: Brits 2008). x = R X R = cos(a)cos(Y) - cos(ß)sin(a)sin(Y) -cos(ß)cos(Y)sin(a) - cos(a)cos(ß)cos(Y) sin(a)sin(ß) (3) cos(Y)sin(a) + cos(a)cos(ß)sin(Y) sin(ß)sin(Y) cos(a)cos(ß)cos(Y) - sin(a)sin(Y) cos(Y)sin(ß) -cos(a)sin(ß) cos(ß) where R is rotation matrix. A translation composed with rotation can therefore be expressed similarly to general affine transformation as x" = R ■ X + Tr The transformation is determined by 6 parameters, the three angles a, ß, y defining the matrix R, and the three Tti. The transformation can be visualised as in Fig. 2. Fig. 2: Translation composed with rotation. The coordinate system is first rotated according to the matrix R and then translated for the vector Tr. In the case of a possible rock block slide the block is not expected to deform significantly, so the question of interest is if the block wall can be rotated and translated to reasonably match the corresponding wall. At the other extreme, if an arbitrary transformation was used, a wall of any shape could be matched to any other as accurately as desired. Affine transformations are between those extremes as they contain only linear deformations besides translations and rotations. If the separation between the walls was a result of a process different from rock slide, there would be no reason for a match between the walls with- out non-linear deformation. Thus existence of a general affine transformation reasonably matching the walls is a good argument for the rock block slide scenario. But existence of translation after rotation reasonably matching the walls would present a more direct evidence for it. In addition to the philosophical reason for using translation after rotation instead of 12-parameter affine transformation there are some practical ones: - The parameters of the transformation are easier to understand. The meaning of the components of the translation vector and of the Euler angles can be envisioned easier than the meaning of the components of the general transformation matrix. From the general transformation matrix it is also not easy to infer Euler angles or their equivalent. - There are less parameters for the observational errors to influence. Translation after rotation cannot be fitted to the measured data as accurately as a general affine transformation so a bigger part of the observational errors is filtered out. Thus the former transformation describes the situation in nature more accurately, provided that both models are sufficient to describe it. - The discrepancy between the measured points on one wall and the images of the points on the other wall can be meaningfully compared to discrepancies in trivial cases, such as when transforming the points onto a plane or into a point. In these cases, affine transformations would produce perfect matches as projections are affine transformations. Even if translation after rotation describes the relationship between walls well it should not be expected that looking for a general affine transformation would produce translation after rotation and rotation matrix as transformation matrix. The reason are the discrepancies between the measured points on the rock block wall and the corresponding points on the Kraški rob wall. The sources of these observational errors are inaccuracies in determining the corresponding points and all erosion and other processes influencing the shape and position of the walls except for the possible rock block slide, as well as errors of measurement of the positions of the chosen points. RESULTS The transformation matrix and vector for transforming 0.9826 -0.2204 -0.1974 1.1012 m the rock block wall onto the Kraški rob wall according to M = -0.0509 1.0538 -0.1233 ,T = -4.5244 m equation 1 are (Konič et al. 2009): 0.0172 -0.0120 0.9167 0.2194 m 0.9997 0.0162 -0.0186 0.0770 m R= -0.0179 0.9954 -0.0945 ,Tr= -4.3294 m 0.0170 0.0948 0.9954 0.2424 m The ratio of expansion of volume is given by the determinant of the matrix, which equals 0.941. That means, if the affine transformation projected the block into its original position, it had expanded for 6% during the slide. The affine transformation thus contains some considerable deformation, presumably as a result of observational errors. The rotation matrix and translation vector for transforming the rock block wall onto the Kraški rob wall according to equation 4, found iteratively and optimised by least square method to the measured data given in Tab. 1, are: tab. 1: The measured data points copied from tab. 1 from the article (Konič et al. 2009). pair n. measured coordinates of points [m] on the rock block on the Kraški rob X Y Z x y z 1 -6.190 4.585 1.159 -6.140 0.477 1.159 2 -4.863 4.323 1.794 -4.780 0.118 1.796 3 -0.673 1.834 0.322 0.715 -2.298 0.321 4 0.533 2.042 1.775 1.156 -2.984 1.780 5 1.675 2.594 2.041 1.741 -2.601 2.043 6 0.052 2.259 -0.551 0.912 -2.160 -0.043 7 3.046 4.608 0.684 3.425 0.404 0.672 8 4.480 5.422 2.776 4.233 0.474 2.774 9 7.143 8.028 -2.508 6.378 3.902 -2.002 10 -8.241 4.315 -2.382 -7.738 0.651 -2.231 11 1.153 1.903 3.520 0.367 -2.696 3.538 12 -0.350 2.123 2.030 -1.061 -2.375 2.030 The Euler angles giving the rotation matrix R are a=-0.1774, ß=-0.0964, y=0.1945. The root mean square deviation (RMSD) between images of the points on the rock block wall and the corresponding points on the Kraški rob wall is 0.5629 m for the affine transformation and 0.7496 m for translation composed with rotation. A translation composed with rotation that minimises RMSD between images of the points on the rock block wall and the plane z=0 was found. Its parameters are a=0.1696, ß=-0.8266, tz=-3.286 m, while the other three parameters do not matter. The RMSD of the images from the plane is 1.2023 m. A translation composed with rotation that minimises RMSD between images of the points on the rock block wall and the origin of the coordinate system turns out to be the translation which translates the center of mass of the points into the origin. Its parameters are tx=0.1863 m, ty=-3.6697 m, tz=-0.8883 m when a=ß=Y=0. The RMSD of the images from the origin is 4.9464 m. pair n. transformed coordinates of points [m] affine transformation translation o rotation x' y' z' x" y'' z'' 1 -6.220 0.479 1.120 -6.058 0.236 1.241 2 -4.984 0.058 1.728 -4.748 -0.109 1.870 3 -0.028 -2.597 0.481 -0.572 -2.522 0.240 4 0.824 -2.619 1.831 0.610 -2.474 1.727 5 1.772 -2.128 2.088 1.756 -1.970 2.063 6 0.763 -2.079 -0.312 0.176 -2.030 -0.576 7 2.944 0.092 0.844 3.184 0.138 0.927 8 3.760 0.619 2.776 4.592 0.725 3.111 9 6.846 3.881 -2.053 7.395 3.770 -1.857 10 -7.477 0.736 -2.158 -8.047 0.338 -2.344 11 1.120 -3.012 3.443 1.195 -2.788 3.461 12 -0.111 -2.520 2.049 -0.276 -2.402 1.973 tab. 2: The images of the points on the rock block wall given by the 12-parameter transformation from the article (Konič et al. 2009) and by the 6-parameter transformation from the equation 4. The images for the affine transformation are a little different from the ones given in tab. 1 in the article (Konič et al. 2009) because of round-off errors. CONCLUSIONS RMSD between images of the points on the rock block wall and the corresponding points on the Kraški rob wall is bigger for 6-parameter translation after rotation than for 12-parameter affine transformation as it should be because the former transformation is a special case of the later one. The RMSD for the 6-parameter transformation is 1.33 times bigger than for the 12-parameter one. It could be expected that 6 new parameters in addition to the 6 of the simpler transformation would "absorb" half of the remaining mean square error if both the models were good or both bad so the ratio of RMSD would be close to which it is. If the 6-parameter transformation is used, points from the rock block wall match a plane with 1.60 times and a point with 6.60 times bigger RMSD than their corresponding points on the Kraški rob wall. It should be noted that RMSD for the plane is diminished by the fact that deviation from the plane is only possible in one direction. The 3D terrestrial laser scanning thus quantitatively confirmed that the walls of the rock block and of Kraški rob are similar to each other. More precisely, the rock block wall matches the Kraški rob wall considerably better than it would match a flat wall or a single point. The rotation of the block in the possible rock block slide can be described as rotation for a=-10.2° around z axis followed by rotation for ß=-5.5° around the image of the X axis after the same rotation, labelled "N" in Fig. 1, followed by rotation for y=+11.1° around the im- age of the z axis after the first two rotations, labelled "Z" in Fig. 1. while the Euler angles and the rotation matrix are independent of the choice of the origin, the translation vector is not. Nevertheless it has a certain meaning: if the rock block was rotated into its original orientation around the origin, so that the origin was the fixed point of the rotation, it would then have to be translated for the translation vector Tr to fit the Kraški rob wall. It would be interesting to know how does the 6-pa-rameter transformation transform the whole rock block wall cloud of points. As the 6-parameter transformation should describe the rock block slide more accurately than the 12-parameter one, it should also match the clouds with smaller deviations, provided the mechanism that moved the walls apart is rock block slide and that the observational errors for the clouds are sufficiently uncor-related with the observational errors for the chosen pairs of points. On the other hand, if the clouds match each other better if the 12-parameter transformation is used, the observational errors for the points of the clouds are heavily correlated with the errors of the 12 chosen pairs of points. Such correlation would mean that the wall surfaces were smoothly but importantly distorted besides the possible rock slide, while mathematical interpretation would be that the whole clouds of points do not contain much additional information about the possible rock block slide compared to the 12 pairs of points. REFERENCES Brits, L., 2008: Euler angles.- [Online] Available from: http:// commons.wikimedia.org/wiki/File:Eulerangles.svg [Accessed 25'h February 2010]. Konič, S., Ribičič, M. & M. Vulič, 2009: Contribution to a rock block slide examination by a model of mutual transformation of point clouds.- Acta Carsologica, 38, 1, 107-116. Wikipedia, 2010a: Affine transformation — Wikipedia, The Free Encyclopedia.- [Online] Available from: http://en.wikipedia.org/w/index.php?title=Affine_ transformation&oldid=339044757 [Accessed 25«^ February 2010]. Wikipedia, 2010b: Euler angles — Wikipedia, The Free Encyclopedia.- [Online] Available from: http:// en.wikipedia.org/w/index.php?title=Euler_angles &oldid=342764520 [Accessed 25^^ February 2010]. Wikipedia, 2010c: Linear map — Wikipedia, The Free Encyclopedia.- [Online] Available from: http:// en.wikipedia.org/w/index.php?title=Linear_map &oldid=345604577 [Accessed 25^^ February 2010].