Convert Equirectangular Projection to Cube Faces

Oct 18, 2016

Photography, 360 Photo, VR Panorama, How To

Convert Equirectangular Projection to Cube Faces

Photography, 360 Photo, VR Panorama, How To

Oct 18, 2016

Equirectangular source image

Equirectangular and cube face projections are commonly used in 360 photo / VR panorama processing. Here’s how to convert from one to the other.

Step 1. Install tooling

You’ll need Panotools and Hugin to perform the photo transformation. Follow this guide to get them installed and setup.

Step 2. Generate parameters

Open a command line and invoke the following:

erect2cubic --erect=<equirectangular_image_to_convert> --ptofile=<output_parameters_file> --face=<desired_face_size>

This will generate a .pto file, containing all the parameters needed for the transformation from equirectangular to cube faces.

A real world example:

erect2cubic --erect=equirectangular-pano.png --ptofile=convert_to_cubefaces.pto --face=1024

Specify transformation parameters

Step 3. Execute convert

Still in the command line, invoke the following:

nona -o convert <parameters_file_generated_in_previous_step>

Or, continuing my example:

nona -o convert convert_to_cubefaces.pto

This will produce 6 images, one for each cube face:

Execute transformation

Output cubefaces

Job done!

Comments