Am 24.10.2020 um 11:03 schrieb Michael Koch:
Am 23.10.2020 um 18:46 schrieb Michael Koch:
Am 23.10.2020 um 17:19 schrieb Michael Koch:
Hello,

It seems there is a problem in the v360 filter. This command line doesn't rotate the correct point to the image center. The default rotation order should be yaw pitch roll, which means after the rotation the point with azimut 180° and height +45° should be in the center. It is nearby, but not in the center. Tested with latest Windows build, 2 days old.

ffmpeg -i equirectangular_test.png -vf v360=e:e:yaw=-90:pitch=45 -y out.png

If the rotation is only yaw or only pitch or only roll, then it's working fine. But all rotations around two or more axes fail.

I'm not sure, but the problem might be in the function multiply_quaternion() in vf_v360.c
Please compare the signs with this Wikipedia article:
https://en.wikipedia.org/wiki/Quaternion#Hamilton_product

After a deeper look into the quaternion multiplication, it seems to be correct. The terms are only written in a different order in the Wikipedia article.

But it's a fact that the v360 rotations are broken, as can be shown by this simple test:
You can use any equirectangular input image.
First make a combined rotation yaw=90 and pitch=45 in the default rotation order (ypr),
then rotate back pitch = -45,
then rotate back yaw = -90.
The output image should be the same as the input image. But it isn't.

ffmpeg -i input.png -vf v360=e:e:yaw=90:pitch=45,v360=e:e:pitch=-45,v360=e:e:yaw=-90 -y out.png

Michael

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to