Am 19.12.21 um 23:12 schrieb JF Ménard:
> Given:
> - w, h: the width and height of equirectangular image. ex: 4000x2000px
> - x, y: the coordinates of the center of rotation. ex: 700, 300 px
> - a: the angle of rotation. ex: 45 degrees.
> How can I calculate
> - Yaw
> - Pitch
> - Roll
> to put in the Image Parameters section of PTGui and achieve this precise
> rotation?
You would need to deal with Euler angles to do that mathematically (with
the special case of Tait-Bryan angles):
https://en.wikipedia.org/wiki/Euler_angles#Tait%E2%80%93Bryan_angles
I currently can't wrap my head around (;-), but may be it is sufficient
to calculate Yaw and Pitch from your x, y values. First you would need
to calculate the pixel distances from the image center (x', y') then
translate to angular values as follows: Yaw = 360 / w * x', Pitch = 180
/ h * y', Roll = a
Currently don't know whether you need to use this values in "Numerical
Transform" or on Image Parameters tab, you have to try.
However, if you want to simply rotate the panorama, it might be easier
to do this in two steps: Center the panorama on the respective pixel,
using the "Set center point" function from the Mode menu in Pano Editor,
then enter the angle as Roll value in "Numerical transform".
But it can be both solutions are wrong. Euler angles are weird...
--
Erik Krause