How to project a spherical map onto a sphere / cube: "Equidirect to a cubic"

UPDATE: I found that http://os.ivrpa.org/panosalado/wiki has an implementation in java. Anyone who has something like this in c or C ++?

I have this panorama, a spherical map from goview streetview, and you want to display it on a sphere / cube. Below are some examples and illustrations I'm looking for โ€” a library that can do this, or some implementation guides.

panorama

I tried http://krpano.com/docu/tutorials/quickstart/#top , which gives the results listed below. It illustrates what I want, but the rotation axis is off. I need to create views back and forth, left and right. Ideally, I would like to compare it with a sphere and say which angles to extract (cube orientation).

[Back, down, front, left, right, up]

BackDownFontLeftRightUp

+6
source share
1 answer

You can easily do this in POV-Ray by placing the camera in the center of the sphere displayed by your texture. See image_map map_type 1 and, for example, this example .

But in fact, it is very simple to implement it yourself, assuming that the input images are a kind of cylindrical equidistant or equiangular projection: for each (x, y) on the output image that you execute, just use the inverse formulas to calculate (longitude, latitude ) in the input image and interpolation / copying by pixel value.

+2
source

Source: https://habr.com/ru/post/912073/


All Articles