math - Converting 2D projection rotation angles to 3D object -


i projecting 3d matrix of density values 3 2d planes (zx,zy,xy). rotate each projection 3 different angles: pzx, pzy, pxy using rotation matrix below:

2d rotation matrix

how convert these 3 separate angles can apply them 3d transformation matrix rotate 3d object x,y,z (or z,y,x) such rotation matrix below:

3d rotation matrix x,y,z

to clear, not wish apply angles pzx, pzy, pxy 3d object, instead calculate individual rotations in 2d translate in 3d.

this problem yields system of equations. let r_3d rotation in 3d space, r_xy rotation in xy plane, , [*]_xy projection of * onto xy plane. point v:

i:   [r_3d v]_zx = r_zx [v]_zx ii:  [r_3d v]_zy = r_zy [v]_zy iii: [r_3d v]_xy = r_xy [v]_xy 

we see every coordinate present in 2 equations. let's check relevant equations x-coordinate:

a := alpha, b := beta, c := gamma i:   cos b cos c x - cos b sin c y + sin b z = sin pzx z + cos pzx x iii: cos b cos c x - cos b sin c y + sin b z = cos pxy x - sin pxy y 

we see following relation mus hold v (right hand side of both equations):

sin pzx z + cos pzx x = cos pxy x - sin pxy y 

similar equations exist other 2 coordinates. if these conditions met, exact 3d rotation can exist. if i'm not mistaken, that's case if pzx=pzy=pxy=0. in general, approximate solution can calculated. suggest least-squares solution based on following energy:

e(a, b, c) = sum { v in data set } ( || [r_3d v]_zx - r_zx [v]_zx ||^2                                            + || [r_3d v]_zy - r_zy [v]_zy ||^2                                            + || [r_3d v]_xy - r_xy [v]_xy ||^2 ) 

and optimal rotation parameters are:

{a, b, c}* = arg min {a, b, c} e(a,b,c) 

this solution minimize distance of 2 projections of corresponding points.

unfortunately, problem not linear least-squares problem easy solve. instead, iterative methods can solve problem (e.g. levenberg–marquardt). implementation of algorithm in programming language, plug in energy , solve optimal rotation parameters.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -