blog-image
  • Published Date: 2023-08-04
  • Last Modified: 2024-09-11

Creating 360° Equirectangular Images with Hugin

We can use Hugin to create an equirectangular image from a six-image cube. For ease of keeping track of things, it is recommended that you name the files back, front, left, right, down, and up.

First, start Hugin and after it starts go to the Interface menu and select Expert from there.

Next, load all six images into Hugin via the “Photos” tab by clicking the “Add Images” button. When you are asked for information about the image, the field of view of the lens should be entered as 90° and the lens type as normal (rectilinear). If required, the focal length should be entered as 15.297 and the focal length multiplier as 1x.

Next, you’ll need to set the yaw, pitch, and roll for each of the six images. You can do this by double-clicking each file name in the file list in turn. The roll value for all six is 0. The yaw and pitch values are as follows:

sideyawpitch
back1800
front00
left-900
right900
down0-90
up090

After setting those values, you can preview the equirectangular image by clicking on the icon. You can then switch back to the main interface to generate the final TIF file.

Go to the Stitcher tab and do each of the following:

  • Set the horizontal and vertical fields of view as 360 and 180 respectively.
  • Set the width to be 4 times the width of the individual images.
  • Set the height to be 2 times the height of the individual images.
  • Scroll down to where the processing options are.
    • For the Blender, you might want to try a few variations.
    • You can select “builtin” for the simplest approach, but might want to select “emblend” from the drop down list and then click on the “Options” button next to that and enter “-l 1” (dash el one) to specify minimal blending unless you want Hugin to do some blending at the seams.
  • Finally, click the “Stitch!” button to create the TIF file (which you should then convert to JPG using your image editing program for use with VR).

This allows us to take a six-image cube map such as: image showing the separate cube map images

and convert it into an equirectangular image ready for a VR viewer such as: image of the resulting equirectangular image