From: Erik Krause <erik.krause@gm...>  20061016 21:46:55

Hello, 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". 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. I assume that yrp remapping in pano12 uses the same operation, hence I would be even grateful if someone pointed me to the relevant source code position(s)... best regards  Erik Krause Offenburger Str. 33 79108 Freiburg 
From: Pablo d'Angelo <pablo.dangelo@we...>  20061017 18:05:26

Hi Erik, > Hello, > > 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 implemented. 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 http://ai.stanford.edu/~diebel/attitude.html 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 :) ciao Pablo 
From: Erik Krause <erik.krause@gm...>  20061019 17:02:11

On Tuesday, October 17, 2006 at 20:00, Pablo d'Angelo wrote: > 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. [...] > Ah, please let us know of the script/application, when its finished :) Many thanks, Pablo and Rob! I have the solution so far. Currently it is in an excel only, but I can provide it to anyone who wants. The convention is the one described as pitchrollyaw halfway down http://mathworld.wolfram.com/EulerAngles.html The backconversion is yaw = ARCTAN2(r11,r12) pitch = ARCSIN(r13) roll = ARCTAN2(r33,r23) best regards  Erik Krause Resources, not only for panorama creation: http://www.erikkrause.de/ 
From: Bruno Postle <bruno@po...>  20061024 22:59:52

On Thu 19Oct2006 at 19:02 +0200, Erik Krause wrote: > On Tuesday, October 17, 2006 at 20:00, Pablo d'Angelo wrote: > > > Ah, please let us know of the script/application, when its finished :) > > Many thanks, Pablo and Rob! I have the solution so far. Currently it > is in an excel only, but I can provide it to anyone who wants. Thanks this is what I needed too. I've implemented it in the PanotoolsScript perl module in panotools SVN. Basically, install the module (and Math::Matrix dependency) and you can rotate a PTStitcher or hugin .pto file on the commandline like so: transformpano <roll> <pitch> <yaw> <input> <output> eg: $ transformpano 15 90 30 input.pto output.pto All the component image positions will then be transformed so the panorama as a whole is rotated. Tested on Linux, should be ok on windows with perl installed.  Bruno 