toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Toon-members] SE3: relation of input-translation to output-translat


From: Rafael Spring
Subject: Re: [Toon-members] SE3: relation of input-translation to output-translation
Date: Tue, 23 Jun 2009 23:15:42 +0200

Hello Tom,

thanks very much for your explanation! That helped a lot. Combining your answer and Gerhard's answer I derive the following (can you confirm or invalidate that?):

writing the Euclidean transform x' = Rx + t ( = exp(mu) with mu = (tx, ty, tz, a, b, c)) as

x' = Mx with

M=
1 -c  b tx
c  1 -a ty
-b  a  1 tz
0  0  0  1

= I + (Omega t)

is not quite correct since the rotation part is in general a bad approximation. But for small Omega the whole thing is a good approximation. In fact the smaller Omega, the better the approximation, the smaller the proportional error, and in the limit Omega -> 0 the transformation is correct again.

Because I want to end up having a correct transformation instead of just a bad approximation by x' = Mx, the strategy is to chain lots of good approximations with small values and small proportional errors. But contrary to SO3s where I just make Omega small, in SE3s I make Omega _and_ t small and chain those and this is where both rotation and translation mix up.

The reason I find this particularly interesting is because in vision there are situaltions where one must differentiate a point position x' w.r.t. a 6-vector mu that describes an SE3. Now I assume this is where the small Omegas and ts come into play again. In the limit case, x' = Mx gives a correct transformation and differentiating point position w.r.t. mu means:

d x' / d mu  ==
d (exp(mu)*x) / du mu  == (limit!)
d Mx / d mu

which (sort of) affirmed me in my first (and wrong) assumption that an SE3 is just an SO3 with appended translation vector: because the differentials are actually the same.

How are two SE3s multiplied internally? Is that more efficient than a matrix multiplication or is it just a matrix multiplication iternally? And how expensive is it to exponentiate a 6-vector to an SE3 (or how expensive is numerical differentiation wrt mu)?

Thanks,
Rafael


Am 23.06.2009 um 18:32 schrieb Tom Drummond:

Rafael

If you exponentiate a mix of a translation and a rotation, the easiest way to understand it is using the following formula for exp:

exp(x) = limit as n goes to infinity of  (1+x/n) ^ n

or imagine taking a tiny step of 1/100 of your translation and 1/100 of your rotation and then repeat this 100 times (or whatever big number you prefer). In other words the translation and rotation get mixed up in each other.

Imagine exponentiating the vector (1,0,0,0,0,1) = 1 unit of translation in the x direction and 1 unit of rotation around the z axis. What you do is travel along a curved path that starts in the x direction and is 1 unit long and curves through 1 radian in the x - y plane. This is equivalent to a rotation of 1 radian about an axis parallel to z through the point x=0, y=1.

Hope that helps your understanding

Tom

On Tue, Jun 23, 2009 at 4:10 PM, Rafael Spring <address@hidden> wrote:
Hello gentlemen,

I am using TooN for a while now and I really appreciate it. Scope, usability and speed are really great and I couldn't imagine working without it. However, today, I've had some weird behavior and I'm unsure if TooN is supoosed to behave like that (Btw. I am using TooN beta3) or if my understanding of SE3s is insufficient. The question boils down to what happens to an input translation after exponentiating.
Consider the following sourcecode:

----
Vector<3> rotation = makeVector(0.4, 0.6, 0.15); //arbitrary numbers..
Vector<3> translation = makeVector(-1, 0, 0.5); //arbitrary numbers..
Vector<6> mu;
mu.slice(0,3) = translation;
mu.slice(3,3) = rotation;

SE3<> se = SE3<>::exp(mu);
Vector<3> t = se.get_translation();

----
Now, I was expecting:

t == (-1, 0, 0.5)

following the assumption that a euclidean transformation by an SE3 equals to an orthogonal transformation (exp'ing the rotation part of mu) + a translation.
The true value, however, is:

t == (-0.789750 , -0.19886, 0.734775)

So I reversed my assumption: It could be a translation by t followed by an orthogonal transform (this would correspond to the translation-part of mu being the inverse camera translation as seen from camera 1 and get_translation() being the inverse translation as seen from camera 2). This assumption, however, was neither confirmed:

----
// make a rotation-only SE3
Vector<6> mu_ = mu;
mu_.slice(0,3) = makeVector(0,0,0);
SE3<> se_ = SE3<>::exp(mu_);

// make a translation-only SE3
Vector<6> mu__ = mu;
mu__.slice(3,3) = makeVector(0,0,0);
SE3<> se__ = SE3<>::exp(mu__);

// 1st translate then rotate
Vector3 t_ = (se_ * se__).get_translation();

//  t_ == (-0.5293 , -0.412372 , 0.89431)

----

Now to the part beyond my understanding: The second assumption holds (roughly) if I halve the rotation amount in mu:

----
Vector<6> mu_;
mu_.slice(0,3) = makeVector(0,0,0);
mu_.slice(3,3) = rotation / 2.0;
SE3<> se_ = SE3<>::exp(mu_); //se_ is half the rotation

Vector<6> mu__ = mu;
mu__.slice(3,3) = makeVector(0,0,0);
SE3<> se__ = SE3<>::exp(mu__); //se__ is only translation

Vector3 t__ = (se_ * se__).get_translation(); // 1st translate then rotate

// t__ == (-0.8024 , -0.19517 , 0.75371)
// t__ is roughly  == t

----
Is this within the general logic of SE3 members (am I missing something?) or might there be something wrong with the SE3 class?

Thanks!
Rafael


_______________________________________________
Toon-members mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/toon-members



--
Dr T Drummond http://mi.eng.cam.ac.uk/ ~twd20
Machine Intelligence Laboratory
Department of Engineering
University of Cambridge





reply via email to

[Prev in Thread] Current Thread [Next in Thread]