We have moved! Please visit us at ANTHROECOLOGY.ORG. This website is for archival purposes only.

Feb 16 2011

Coordinate Transformations in R Using Least Squares

     I have been working on writing a program to compute a 3D conformal coordinate transformation. The methods I am employing are those described in Paul Wolf and Bon Dewitt’s Elements of Photogrammetry, Appendix C. This program aims to find the rotation, scaling, and translation factors necessary from transforming an arbitrary xyz coordinate system into the UTM XYZ system. There are three translation factors (omega, phi, kappa), one scale factor (s), and three translation parameters (Tx, Ty, Tz). Equations relating the xyz system to the UTM XYZ system are found by first rotating, then scaling and translating the arbitrary xyz system. But we are now left with 7 unknowns, and Wolf and Dewitt suggest using least squares to solve this problem. First, the equations relating the two coordinate systems are linearlized using Taylor series expansions. This will require a rough initial estimate for our unknowns. The three Taylor series expansions (one for each X,Y,Z) are then transformed into a matrix equation (AX=L+V), where A is the matrix containing the coefficients of the unknowns, X contains the vector of unknowns, L is the vector which holds the differences between the observed UTM XYZ points and approximated UTM points, and V is the residual. Solving for X gives X=(ATA)-1(ATL), values which contain the corrections to be added to the initial approximations for a better set of approximations. Thus far, I have successfully programmed this algorithm in the R programming language. My solution must now be iterated to minimize the values in matrix X or the standard deviation using the residuals. I am in the process of finding the best convergence technique to use. Any ideas? Once the minimum value has been reached, the approximated rotation, scale, and translation factors can be used to transform any of the arbitrary xyz points.

blog comments powered by Disqus