Hugin Tutorial: How to Stitch Your 360 Photos/Panoramas with Hugin

8 May , 2018 Academy Dimona Dougherty

Hugin Tutorial: How to Stitch Your 360 Photos/Panoramas with Hugin

What's Hugin, and what does it do?

Hugin, pronounced ‘Hoogin’, is a very powerful open source panoramic image creator and editor. 

Open Source means that any interested member of the community around it can add to features of the program and write code on top of what’s gone before. Also, in this case, open source means the program is free to download and use as much as you would like. 


With Hugin, you can build large composite panoramas from multiple images with its stitching capabilities of both spherical scenes and flat format images, correct exposure levels, you can even stitch together sets of bracketed JPEG images into an HDR panorama. 

What to expect from this tutorial & what you need before we start

After completing this tutorial you will be able to utilize Hugin to recenter (remap), level and size to the original resolution your 360 panoramic equirectangular images so that the main object of your image is front and center when viewed in scrubbable or immersive formats and save it in the image file format of choice. 


For the purposes of this tutorial we shall be assuming that you have a equirectangular 2:1 image in 4k from a dedicated consumer level 360 camera such as the Madventure from Xiaomi or the Gear 360 from Samsung.

Download and prime Hugin

First of all, head to and download the  program. Once downloaded, install the software and open it. Once Hugin is open you will be presented with the main activity window:

Hugin-Panorama stitcher

Before beginning to edit images proper we need to change a few default settings so that editing goes as smooth as possible with as few pop ups and dialog boxes as possible to interrupt your workflow. 


To do this, go to the menu: ‘File > Preferences’ and click on ‘Assistant’ and a set of checkboxes shall be shown. Deselect both ‘Automatically align images after loading’ and ‘Detect vertical lines’. 

Hugin- 360 photo stitching software settings

Now, click on the ‘Stitching’ tab and select the file format you prefer and then select ‘start stitching immediately’ and also ‘overwrite existing images’.

Finally, click the ‘OK’ button and your changes will be saved and you can now move on to actually utilizing the program to fine tune your images without having to stop to click ‘OK’ or ‘Cancel’ many times in the process of editing a single image.

Control panel

The Hugin main window consists of many different options and areas, for now, we are only concerned with the top toolbar of icons. For the purposes of this tutorial the only buttons that will be being used are the new project button on the far left (the white page icon with the top right corner folded over) and the panorama viewing window (the blue colored representation of a landscape oriented panorama) fourth from right.

Editing a panorama

To begin editing an image, click upon the ‘Fast Preview panorama’ button shown below, fourth icon from the right and a new window will open, obscuring the main window.

In the panorama viewing window we can remap the image and adjust it so that the image is level and as such will be displayed correctly by the VeeR 360 photography service and as such easily manipulated by those consuming your content.

To open your image to begin editing, click upon the ‘1. Load image…’ button and navigate to the image you wish to edit and open it. Once opened Hugin shall populate the main area with your image and also the sphere on the left so that you can see how your image will look:

Hugin-panorama photo preview

Click the ‘Move/Drag’ tab second from right and you may now drag at any chosen point your image around so that you can straighten it.  


To center your image you may either drag the subject of your image to the center of the work area and then click and drag the image so that vertical lines are also vertical, or you can use the sphere projection on the left of the screen and manipulate your image by rotating the sphere in the chosen direction. Keep in mind that if you are using the rotation method, when you rotate the sphere to the left, your image will remap to the right. Rotating the sphere up or down has the same effect on your image. If you find that you wish to undo the last movement made then simply hit ‘ctrl+z’ to undo the last change. 


Your image will show a warped line where the original image wraps around and joins itself, do no be alarmed. When Hugin remaps your image this will disappear, and you are left with a clean spherical format image. 


Once you have moved the focus and leveled the image to how you want it you will result in something similar to this:

Now you have your image edited, return to the main window and click upon the ‘Stitcher’ tab and click on ‘Calculate Optimum Size’. This should change the figures to the original resolution of your image, which is the maximum clean resolution of the image. 


If you want the image to be a different resolution or lower in size when exported, enter the resolution you require bearing in mind that to be recognized and displayed correctly it must conform to a 2:1 ratio where the width is twice the height of the image and that enlarging the image will lose some of its clarity. For ease of further processing something like 7000*3500 is a good size as many backends that you will upload to will do further image processing to ‘optimize’ your image. 

Stitching and saving your file

Now click upon the ‘Stitch’ button at the bottom right. You will have to choose where to save the Hugin edit file ( .pto file)  and also where to save the actual image file itself.


At this point, you are finished remapping the image file and your project will be passed off to be remapped and converted by the batch processor. You may now click on the new project button and edit another image whilst the first is being remapped, converted and saved. 

Congratulations on having stitched your first panorama with Hugin! Now join VeeR and share your 360 photos with VR lovers worldwide!

As for the panoram stitching software, please check out the tutorials for Kolor Autopano, Pano2VR, PTGui, Microsoft ICE, etc. If you have other best panoram software, let me know!

5 Responses

  1. shadmia360 says:

    Will this process also work for image resolutions greater than 4K? I am considering purchasing a 5.7K camera which may not having stitching capabilities built in.

    • Dimonauk Dimonauk says:

      Hi Shadmia 🙂 Yes, this will work on images larger than 4k. I used that in the example as that is the current standard for consumer level cameras. Hugin can handle gigapixel images as long as you are using a NTFS file system and have enough RAM to process the image. Bear in mind that if exporting to TIFF format, it cannot be over 4gb due to format limitations. I have built a gigapan up at 90000*45000 in hugin in jpg format. Hope this helps!

  2. Philip says:

    I am lost on the bottom half. I dont know what to do at the “Move/Drag” tab. It doesnt look like your screenshot. Is there more help? Thank you for helping!

  3. Gunjan Dogra says:


    My name is Gunjan Dogra and I came across your website
    which was very up-to-the-minute for me because it says here that you accept Guest Posts submissions.

    I am from Webtunix Solutions where we cover Artificial Intelligence, Machine Learning, Data Science, Data analytics, E-Commerce, Digital Marketing and many more topics. I have gone through from one of the topic

    Just shooting you an email to see if you would accept guest posts. Happy to write about whatever topic you need. There are some sample topics given below:

    1.Top 5 Benefits of AI in Image Processing.
    2.5 Ways to Use Artificial Intelligence as a Image Processing.
    3.How Image Processing in Artificial Intelligence with Sensors ?
    4.How AI and Image Processing Make Smart Products Smarter?
    5.How Artificial intelligence Can become Game-changer in IP?

    I will write a great content relates to your site. Can you link back to my website? That will be appreciated!

    Please let me know if you are really interested in working with me. Looking forward to your response.


Leave a Reply

Your email address will not be published.