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!

Installing Hugin and Panotools on Windows

Photography, Panorama, How To

Oct 17, 2016

Hugin and Panotools are two hugely useful tools for image stitching and panorama processing in general.

Unfortunately getting them installed and configured on Windows is a bit fiddly. Here’s how.

Step 1. Install ActiveState Perl

Available either as .exe (guided install) or zipfile, you can always find the latest version of ActiveState Perl here.

Whichever format you choose, ensure both the perl\bin and perl\site\bin directories are in your PATH post-install:

Perl bin directories are in the Path

Step 2. Test Perl is installed correctly

Open a command prompt type perl -v. You should see something similar to the following:

A successful Perl test

Step 3. Install Panotools Script

Back in the command prompt, type ppm install Panotools::Script. Perl Package Manager should download and Install Panotools Script:

Installing Panotools Script

Step 4. Test Panotools Script is installed correctly

Still in the command prompt, type panostart. The following help text should be displayed:

Panotools Script is installed correctly

Step 5. Install and configure Hugin

Hugin is available as an .msi. You can download the latest version here. Download the version appropriate for your platform and double-click to install.

Once installation completes, add the Hugin bin directory to your PATH:

Hugin bin directory is in the Path

Step 6. Test Hugin command line is working correctly

Open a command prompt and type nona. You should see the following help text:

Hugin bin directory is in the Path

That’s it!

Publishing VR Panoramas to Facebook

Photography, 360 Photo, VR Panorama, Facebook

Oct 12, 2016

A little-known but extremely cool feature: Facebook has built-in support for VR panoramas (or, in their own terms, “360° photos”). These interactive images allow you to tilt and pan around a scene, creating the fully immersive experience of “really being there”.

To import them:

1. Source or shoot your own VR panorama

Either head to Google or shoot your own VR panorama. The stipulations are:

2. Upload to Facebook as a single photo

This works from both desktop browsers and Facebook mobile apps.

Upload your single VR panorama to Facebook (this won’t work as part of an image batch). Facebook will quickly recognise it as a “360 photo” and prompt you to select a starting view:

Facebook recognizes the uploaded image as 360 VR photo

Pan around until you find the sweet spot and then hit “Post”.

3. Enjoy!

That’s it! Your 360 photo is published for all your friends to see.