> sorry for posting off topic. The main list wasn't of much help...
> Is there someone who understands spherical coordinate transformations
> - especially the rotation of euler angles (this is what we call yaw,
> roll and pitch). I need to do the calculation that is done f.e. in
> PTGui, there called "numerical transform".
I guess Joost wants to keep the secret ;-)
What you need to do is not modify the individual yaw, roll and pitch values
(as you have noticed), but use transform them into one entity, like a
rotation matrix, a rodriguez vector, or a quaternion.
So the steps I would propose are:
1. transform rpy into a rotation matrix (3x3): M = rpy2rmat(r,p,y)
2. Multiply the rotation matrix with whatever transformation matrix:
M_new = T*M;
3. extract yaw, roll pitch from M_new.
Operation 1 is at least partly in the panotools source code, in the math.c
and adjust.c files, it is however split over multiple functions and a bit
hard to comprehend what it is really doing.
Operations 2 and 3 are not required by panotools and are probably not
The only really tricky part is to find out what kind of euler coordinates
panotools uses, since there are 12 different ways the rotations angles can
be applied, and everybody seems to call their particular scheme euler angles.
The required formulas can then be found in
I can try to figure out what kind of rpy convention panotools uses.
> In practice: I have the position of an image relative to an extracted
> floor cube face and need to pitch it down to the bottom of the
> equirect from which the cube face was extracted previously. The goal
> is automatic nadir stitching.
Ah, please let us know of the script/application, when its finished :-)