You are not logged in.

1

Thursday, May 30th 2019, 12:10am

Map cartesian coordinates on the pano face image to sperical coordinates on the panorama

I have a panorama of size 5376x2388. Using the krpano tool, I am able to extract 6 faces of size 1712x1712. If I have a coordinate on one of the faces wrt to the top left of the image, how do I go about mapping those (x, y) coordinates into spherical (h, v) coordinates that can be used on the krpano javascript interface?

2

Thursday, May 30th 2019, 12:30am

given a 3D cube with a pixel size of 1712, with x or y or z being +1712 or -1712
and the other two axes being the pixel coordinates on that plane

h = Math.atan2(x, z)
v = -Math.atan2(-y, Math.sqrt(x * x + z * z))

*smile*

3

Thursday, May 30th 2019, 5:55pm

Thanks bruh. *thumbsup* *thumbsup*

Took me some time to figure it out, but you are a life saver.

Similar threads