Open clones1201 opened 9 years ago
can you share your calculations?
as the parameters is (q0 q1 q2 t0 t1 t2) T
the rigid transform is :
(x',y',z')T =
| 1 -q2 q1 | (x,y,z)T + ( t0,t1,t2)T
| q2 1 -q0 |
| -q1 q0 1 |
and the projection is :
(u,v)T = ( x * fx / z + cx, y * fy / z + cy)T
so we have a Jacobian of the rigid transform: | 0 z -y 1 0 0 | | -z 0 x 0 1 0 | | y -x 0 0 0 1 | and a Jacobian of the projection : | 1/z 0 -y/z^2 | |0 1/z -x/z^2 |
so the Jacobian of the warp function is: | -y^2/z^2 1+x_y/z^2 -y/z 1/z 0 -y/z^2 | | -1-x_y/z^2 x^2/z^2 x/z 0 1/z -x/z^2 |
and i test it with the freiburg1/room benchmark, looks good.
==========edit============= Projection Jacobian should be | 1/z 0 -x/z^2 | |0 1/z -y/z^2 | then the result is as same as the code... oh, my poor math...
why are the rows of the projection Jacobian swapped?
I think i know the problem,my mistake,sorry...
I did the math and have a different Jacobian matrix as showing in my new code, you guys may want to check it.