Equirectangular mapping transformation_v0.3 - FoxelSA/libgnomonic GitHub Wiki
Overview
Assuming equirectangular mappings are related to sphere, their points are elements of the sphere it maps. Linear transformations can then be applied on those three-dimensionnal points. The library allows to apply such transformation giving a three by three matrix. It also offers a front-end algorithms that builds rotation matrix with three angles. Rotations are typically used in case mapping are not aligned, in term of orentation, to a reference body such as earth local frame.
The points that correspond to the input equirectangular mapping are placed in the three-dimensional frame before to apply the linear transform. Initially, the points are element of a sphere that is invarient during the linear transformation. If the image points set of the transformation is a sub-set of the sphere, the output mapping is computed by spherical deprojection. Otherwise, each point is interpreted as element of a sphere defined by its distance to origin to perform the spherical deprojection.
Demonstration
To illustrate the results of linear transformations, we consider rotation transformations and the following mapping (copyright (c) Didier Mouron under CC BY-SA license) obtained using an Eyesis4Pi camera :
Considering and azimuth (z) angle of 90 degrees and an elevation (y) angle of minus 90 degrees, the following rotated equirectangular mapping is obtained :
The following equirectangular mapping is obtained considering an elevation angle of minus 90 degrees and a roll (x) angle of 180 degrees :
One has to keep in mind that such transformation on equirectangular mapping, even when considering high order interpolation schemes, affect the quality of the mapping. Large number of successive transformations can decrease the quality of the image.