Is there any direct formula for converting panorama to Tiny planet(StereoGraphic projection)

2.7k views Asked by At

I am trying to convert a normal panorama to stereographic projection Using Opencv . The resulting image is the one shown shown in this link.

http://www.photographymad.com/pages/view/little-planet-photos-5-simple-steps-to-making-panorama-worlds

In the steps to create this, there is a step to convert from rectangular to polar in photoshop.Can some explain the logic behind d conversion

1

There are 1 answers

0
tnq177 On

Yes, there is. http://mathworld.wolfram.com/StereographicProjection.html

Check out this wiki link: https://en.wikipedia.org/wiki/Equirectangular_projection

Think about your 360 panorama as a equirectangular projection of a sphere. That is, the x corresponds to longitude which ranges from -180 on the left to 0 at center then to 180 deg on the right. The y corresponds to the latitude which ranges from -90 deg at top to 0 at middle to 90 at bottom.

Follow the inverse map formula in the first link to build a map_x, map_y for each pixel, then use the cv2.remap function to get the stereographic projection of your image, aka a little planet.

The result would be better if your image has width = 2 * height because of the longitude, latitude range mentioned above.

And I learn all that from this awesome blogpost http://www.semifluid.com/2014/04/20/equirectangular-to-stereographic-projections-little-planets-in-matlab/