Convert equirectangular spherical image to cube faces

asked 2015-03-05 15:38:16 -0500

ferakles gravatar image


I would like to convert a spherical/equirectangular panoramic image into a cubical panoramic image - six images (tiles), one image per cube side.

Are there functions of OpenCV 2.4.x. to achieve this?


edit retag flag offensive close merge delete



I do not think that there is any direct functionality that would achieve this, but you can try various methods to get the intended result.

Perhaps cutting up the main panoramic image, and then applying perspective (or other geometric) transforms and creating the 'cube'.

Potato gravatar imagePotato ( 2015-03-05 15:42:32 -0500 )edit

what on earth made your last attempt crash the apache server ? ;)

berak gravatar imageberak ( 2015-03-05 15:50:40 -0500 )edit

@berak hahahahha nice point ;-)

theodore gravatar imagetheodore ( 2015-03-05 17:29:40 -0500 )edit

is there any chance, you can acquire the images, that spherical panorama was made from ?

if not, you'll have to undistort / reverse the spherical distortion using something like fisheye / remap / TPS.

berak gravatar imageberak ( 2015-03-06 03:48:16 -0500 )edit

The spherical image is stitched by using images I took, so yes, I have the original images, but they are 60 images merged together, so it would be easier to use directly the stitched image which is a flat image 360x180 image like the one in: I agree that I have to convert the spherical image, this is why I am asking if there are OpenCV functions to do that.

ferakles gravatar imageferakles ( 2015-03-06 09:09:02 -0500 )edit

Any help would be really appreciated.

ferakles gravatar imageferakles ( 2015-03-10 09:46:44 -0500 )edit