IP Slicer

This is a script for taking a spherical panorama image (or a spherical globe map) and slicing it into segments suitable for sticking together into a 3d sphere, it is part of the Image::RGBA perl module on CPAN.

All the images on this page are based on the same source panorama image. The panels are reduced to fit and are links to the full size original versions.

Photo2

Fig.1 This is a photo of the sixteen panels below stuck together into a ball.

4 4 4 4

Fig.2 This is the result of splitting the panorama into four slices, the output sphere circumference is 1600 pixels, the command line used was:

sphere-slicer.pl 4 1600 montferrand.jpg

The four small images above are links to the full size output images in JPEG format.

Panel00 Panel01 Panel02 Panel03 Panel04 Panel05 Panel06 Panel07 Panel08 Panel09 Panel10 Panel11 Panel12 Panel13 Panel14 Panel15

Fig.3 This is the result of splitting the panorama into sixteen slices, the output sphere circumference is 1600 pixels, the command line used was:

sphere-slicer.pl 16 1600 montferrand.jpg

The sixteen small images above are links to the full size output images in JPEG format.

Montferrand

Fig.4 this is the source image scaled down a bit. Thanks to Philo for letting me use this panorama.

Notes

The output images are upside down, this was a bug in the original script, now fixed.

The output sphere is circumscribed outside the ideal-sphere, rather than inscribed within. This is the behaviour you would need for sticking the panels onto an existing sphere.

Because this script relies on ImageMagick to perform all file reading and writing, just about any type of input image can be used (so long as the relevant libraries are supported on your system). You can use JPEG, TIFF, PNG, SVG, postscript, PDF or whatever as input. The default output format is PNG.

Image size shouldn't be an issue, the input and output images are only limited by the available memory on your system. The big images linked-to above took about 3 minutes per set on my system. For really big output images, you might have to leave it running overnight :-)

Software required

The Image::RGBA perl module, and consequently this script, depends on perl and PerlMagick.

Other resources

Philo has a similar script that uses Panorama Tools to split a panorama into the faces of a rhombicuboctahedron. He has also written a photoshop plug-in that does effectively the same job as ip-slicer, so if you are having trouble with this, you might want to try that.

Solarviews has has something similar for printing globes as icosahedrons. You can download cut-out models of the moon, mars, the earth etc..

For lots of other utilities for dealing with panoramic images, try Panorama Tools.

Mitchell Charity wrote a very similar tool for making globes of the planets.

Older versions

This older version is standalone and doesn't depend on Image::RGBA, pixel sampling is not interpolated, so the quality is not so good:

Document Links

philo
Philo has lots of panorama tools resources
http://www.philohome.com/
Image::RGBA perl module
Functions for sampling simple RGBA images
http://search.cpan.org/dist/Image-RGBA/
ImageMagick
An open source image manipulation library
http://www.imagemagick.org/
PerlMagick
perl bindings for ImageMagick
http://www.imagemagick.org/www/perl.html
split a panorama into the faces of a rhombicuboctahedron
split a panorama into the faces of a rhombicuboctahedron
http://www.philohome.com/rhombicuboctahedron/rhombicuboctahedron.htm
Solarviews
Solarviews
http://www.solarviews.com/eng/ico.htm
Panorama Tools
panorama tools open source library for manipulating panoramas
http://panotools.sourceforge.net/
making globes of the planets
A gimp plugin and perl script for making gores
http://www.vendian.org/mncharity/dir3/planet_globes/
This document was last modified on 2008-04-18 11:11:49.
Bruno Postle