Hugin Photos tab

From Wiki
Revision as of 15:04, 30 January 2013 by Harryvanderwolf (talk | contribs) (The Custom parameters)
Jump to: navigation, search

Hugin Photos tab

The Photos tab is used to:

  • Manage the images in a hugin project.
  • Edit the positions of the images in the final panorama.
  • Edit the lens settings.
  • Edit photometrics settings.
  • Edit/Create stacks.

Multi-selection can be used to change the parameters for multiple images.

Screenshot of Photos tab; click for enlarged image

Layout and usage

Simplest form of Use

The photos tab is a tab with a lot of options and possibilities, which will be explained on this page. However, the simplest use of this tab is:

  1. Use the Hugin filenew.png New project button, if you have already images loaded.
  2. Use the Add images button to add images to your (new) project.
  3. Click the Create control points button in the Feature Matching section to start detecting the pairs of same points in overlapping images.
  4. Click under Optimise the Calculate button behind Geometric: (incremental, starting from anchor).
  5. Click under Optimise the Calculate button behind Photometric: (Low dynamic range).

This is the most basic usage of this tab. The next step would be to improve "the scene" by centering, Fitting, straightening, etc. in e.g. the Hugin move drag tab in the Gl preview.png Fast Preview window, which is the Hugin Main window in the Simple User interface mode.

User interface modes

The User interface modes, being Simple, Advanced and Expert determine the layout and (number of) options in this tab.

The Display radio buttons on the right side determine the layout and what is displayed in the images table. What is displayed in the table, e.g. the number and kind of columns, per Display option is again user interface mode dependent. For example: In the Display option General the column Stack no. in the images table (see above (enlarged) screen capture) is only visible (and available) in Advanced and Expert mode.

On the right side of the screen you will find the Group by: drop down box with immediately above it the label showing in which user interface mode the screen is currently being used. The available options are displayed in the table below.

"Group by:" options per user interface mode
Simple Advanced Expert
None None None
Lens Lens Lens
Stacks Stacks
Output layers
Output stacks

Images table options

The images table has a few events ("mouse action options").

  • a single-click action, with or without Ctrl/Shift, to (de)select one or multiple images.
  • a double-click action which opens the Edit image variables popup where the image parameters can be examined and/or edited.
  • a right-click action inside the table which opens a Context menu is opened.

Edit image variables popup

This popup gives you a lot of options and functionality depending whether you work in the Simple, Advanced or Expert User interface mode. This is explained in the Edit image variables section.

Context menu

This tab contains a "Context menu", sometimes better known as a "right-click menu" which is accessible in the images table.

Depending on the selected images and where you click you get only these commands offered which applies to the current selection:

  • None image, one image or multiple images selected.
  • Click on empty area or click on an image variable (only when Grouped by Lens or Stacks selected).
Context menu options in the images table; bulleted options are sub-menu options
No image selected One image selected Multiple images selected
Edit image variables... Edit image variables...
Add individual images... Add individual images... Add individual images...
Add time-series of images... Add time-series of images... Add time-series of images...
Remove selected image(s) Remove selected image(s)
Anchor this image for position
Anchor this image for exposure
  • New lens
  • Load lens from ini file
  • Load lens from lensfun database
  • Save lens to ini file
  • Save lens parameters to lensfun database
  • Save camera parameters to lensfun database
  • New lens
  • Load lens from ini file
  • Load lens from lensfun database
Control points
  • Remove control points
Control points
  • Remove control points
Control points
  • Remove control points
  • Reset positions
  • Reset lens parameters
  • Reset photometric parameters
  • Reset user defined...
  • Reset positions
  • Reset lens parameters
  • Reset photometric parameters
  • Reset user defined...
  • Reset positions
  • Reset lens parameters
  • Reset photometric parameters
  • Reset user defined...

Adding images

Images can either be added with:

  • the button Add individual images...
  • via the context menu (Add individual images... and Add time series of images...)
  • via drag and drop.

Add time series of images... adds all images with a similar file modification time as the selected image; if the the project is empty then a file dialogue opens to allow you to pick this initial file.

Lens type

The most important parameters are the Horizontal field of view and the Lens type. Hugin supports the following projections in input images:

  • Normal (rectilinear) - The projection used by most standard cameras. It keeps straight lines straight. The maximum horizontal field of view is 180 degrees (for an image of infinite size, that is). Also cubes (e.g. rendered in a special application) use this type.
  • Panoramic (cylindrical) - This type is often simply called cylindrical projection. Usually used by panoramic cameras, such as the Horizon, Roundshot and Spheron cameras; sometimes output generated with early stitching software such as QTVRAS that only copes with single row panoramas.
  • Circular fisheye - Used by many fisheye lenses. If the image is circular or the corners of the image are black, use this type of fisheye lens. A circular crop in the Hugin Crop tab can be used for cutting away the edge borders.
  • Full frame fisheye - Exactly the same projection as the above circular fisheye, but the crop option will crop to a rectangle instead of a circle. This should be used for full frame fisheye images. A typical example for this type is a 15 mm fisheye on a full frame DSLR.
  • Equirectangular - A full spherical projection. These are not from real world lenses but generally created as the result of the stitching process; useful to reload a finished panorama to extract further images.
  • Orthographic - A projection that is e.g. used in cartography. A rare example for a fisheye lens that uses this projection is Nikon's early 10mm f5.6 OP.
  • Stereographic - Special fisheye lenses such as the Samyang 8 mm use this projection.
  • Equisolid - Try this projection if your image is e.g. the reflection of a mirrorball or from the visor of an astronaut's helmet.
  • Fisheye Thoby is modeling the Nikkor 10.5 mm fisheye lens.

After the lens type has been specified, an estimate for the horizontal field of view (HFOV) is required. The HFOV specifies the horizontal opening angle of the image in degrees. Since most photographers are more familiar with Focal Length as a measure for the HFOV, it can be entered into hugin, and hugin will compute the HFOV from it. For this calculation the actual focal length and the crop factor of the camera are required. If the 35mm film equivalent focal length is known, a crop factor of 1 should be used.

With JPEG images, hugin can usually automatically calculate the HFOV based on the EXIF information.

Feature Matching

Individual control points can be created and edited in the Hugin Control Points tab, here in the Photos tab they can be manipulated together.

Automatic creation of control points can be done by pressing the Create control Points button (if you select just some images, then control points will only be found for those selected). With the dropdown selector in front of the Create control Points button, you select which control point generator (feature matcher) to use for detecting the control points and adding them to the project. These control point generators (feature matchers) need to be configured in Preferences->Control Point Detectors. Hugin comes standard with cpfind and align_image_stack configured for a number of situations. The Hugin Preferences can be used to set further options and to add new tools to the list or another instance of the same Control Point Detector with other settings (like for rectilinear images or for (full) frame fisheye for example.

The Remove control Points option from the context menu option Control Points does exactly what its name suggests, it removes control points between the selected images, or all control points if no image is selected.


Hugin has two optimising strategies:

  • a Geometric strategy that aligns the photos into the correct position in your final panorama.
  • a Photometric strategy that optimises brightness and colours between your images to produce the optimal panorama.

Geometric (Simple and Advanced User interface)

hugin uses a photo alignment scheme where it adjusts image orientation and lens settings of source photos until the control points line-up. This process is called optimisation. You actually create individual control points in the Control Points tab, and manage them in the Photos tab and Control Points table.

The following pre-set optimisation schemes are provided in the Simple and Advanced user interface:

Positions (incremental, starting from anchor)

This is the simplest setting, and is probably sufficient for a lot of purposes. Only the relative orientation of images are optimised, lens parameters are left untouched, this works best if either of the following is true:


Note that to align any pair of photos, there should be at least two pairs of control points connecting them.

Positions (y,p,r)

This is exactly the same as the incremental setting above except that the parameters are optimised at once, this may confuse the optimiser if the images are not already roughly in the right place. Don't use this setting.

Positions and View (y,p,r,v)

This is the same as optimising Positions except that the lens Field of View is optimised too - Use this if you don't trust the Field of View calculated from the photo's EXIF data.

Note that for this too work you need at least three well-spaced pairs of control points between any pair of photos. With a 360 degree panorama it is usually beneficial to optimise the Field of View, even if you have already calibrated this beforehand.

Positions and Barrel Distortion (y,p,r,b)

This is the same as optimising Positions except that an attempt is made to discover the lens barrel distortion at the same time. Only the b parameter of the full lens correction model is varied by this optimisation scheme, as this is a reasonable approximation of the distortion of a typical lens. You should trust the field of view if you use this.

Again you need at least three well-placed pairs of control points between any pair of photos.

Positions, View and Barrel (y,p,r,v,b)

As the name suggests this optimises positions, Field of View and barrel distortion all at once.


This optimises image orientation and all geometric parameters in the full lens correction model. It includes more lens distortion parameters. The x shift and y shift (d and e) parameters account for the centre of the projection not being in the centre of the image. This is quite common, and gets very bad if an image is the cropped corner of another image.

You will need many control points, the more the better, and preferably a full spherical panorama (360 by 180 degrees) to get the best correction. You should also use a calibrated panoramic head. If the control points are bad (either there are not enough or some are in the wrong place), or your images were not taken around the no-parallax point, this could produce bizarre results.

Geometric (Expert User interface)

The following pre-set optimisation schemes are provided in the Simple and Advanced user interface:

Positions and Translations (y,p,r,x,y,z)

This will optimise image orientation and the translation you get when moving the camera for a linear panorama. This is great for stitching images of the same flat surface taken from different places, for example when you couldn't fit a painting or the front of a building into one picture. Again it isn't ideal if the lens information such as the field of view is wrong.

Positions, Translation and View (y,p,r,x,y,z,v)

This is similar to Positions and Translations, except you can use it when you don't trust the Field of View from the EXIF data.

Positions, Translation and Barrel (y,p,r,x,y,z,b)

This is the same as optimising Positions and Translation except that an attempt is made to discover the lens barrel distortion at the same time. Only the b parameter of the full lens correction model is varied by this optimisation scheme, as this is a reasonable approximation of the distortion of a typical lens. You should trust the field of view if you use this.

Positions, Translation, View and Barrel (y,p,r,x,y,z,b,b)

This is useful when you are optimising a linear panorama, don't trust the field of view, and want to correct barrel distortion.

The Custom parameters

The pre-set optimisation options are useful for most situations, but often it is necessary to switch to Custom parameters.

For example, when shooting hand-held panoramas, some of the position variation between shots can be resolved by using different d and e Image Center Shift parameters for each shot. Select The Custom parameters below and pick the d and e parameters for optimisation.

Similarly, the translation parameters could be used to correct a wonky shot. However, they were meant for linear panoramas which expand to infinite distance at 180 degrees field of view, so you must make sure any images with non-zero translation (X, Y, or Z parameters) are in the middle of the panorama (y and p should all be around zero, and the field of view shouldn't be large enough to make them expand more than 180 degrees). This can be used to patch in the floor after you have removed the tripod that was obscuring it. You can take a shot of the floor where the tripod was at an angle (therefore you can avoid casting a shadow on the image in most cases). You can then optimise X,Y,Z on only this image. However, the floor must be flat for this to work, and this shot must be in the middle of the panorama. You can make down the middle by rotating the panorama on either of the previews.

The custom parameters are controlled in detail on the hugin Optimiser tab.

Photometric (Simple User interface)

hugin has a brightness and colour correction system using the default nona stitching tool in the hugin Stitcher tab.

The hugin system works by sampling a spread of points for each pair of overlapping images. The optimiser then tries to model a system of camera response curve, exposure, white balance and vignetting that fits the values of these points.

So for this to work, the photos in the project have to be already aligned. This requires that the control points already have been generated (Create control points) and that the images already have been aligned (Calculate Geometric positions).

Low dynamic range

This will optimise vignetting, the camera response curve and exposure (EV) for all the photos in your project.

The exposures for all images (except for the anchor image determined by selecting Anchor this image for exposure in the hugin Images tab) are optimised.

Low dynamic range, variable white balance

This will optimise vignetting, the camera response curve, exposure (EV) and white balance for all the photos in your project.

Similarly to above, the exposures and white balance is optimised for all images except the anchor.

Custom parameters

The pre-set options are good for most situations, but sometimes it is necessary to switch to Custom parameters. The hugin Optimiser tab is where you can control these custom parameters in detail.

Photometric (Advanced and Expert User interface)

Next to the options mentioned above in Photometric (Simple User interface), the Advanced and Expert User interface has the following photometric options.

High dynamic range, fixed exposure

This will optimise vignetting and camera response curve for all photos.

High dynamic range, variable white balance, fixed exposure

This will optimise vignetting, the camera response curve and white balance for all the photos in your project.

Edit image variables

The Edit image variables option when double-clicking an image in the image table or via the right-click context menu will open a popup with four tabs being Positions. Lens, Photometrics and Camera Response. The options in the several tabs of this popup are also dependent on the user interface mode.


On the Image Positions tab, the orientation of the selected image(s) in the final panorama can be specified by yaw, pitch and roll angle (in degrees); and (only) in Expert mode you can also specify the X, Y, and Z translation parameters.

You can set the parameters to 0 in this popup but also via the right-click Reset menu with it's sub-menu options.

By selecting an image in the images table and via right-click Anchor this image for position you can indicate that a particular image shouldn't move when optimising the positions in the panorama. Only one image can be the anchor, and by default this is the first image in the project.


The tab Lens on the Edit image variables popup allows you to examine or modify the values for the degrees of view, Radial Distortion, Image Center Shift and Image Shearing.

Usually lenses do not project images exactly according to the selected projection type, but suffer from distortions. In many cases the distortions are acceptable for single image shots, but they need to be corrected when stitching a panorama. The a, b and c parameters are used to remove that distortion. They are applied radially from the image center, which can be moved by changing the d and e parameters. These a, b, c, d and e parameters are the basis of the panotools lens correction model.

Scanned images might also suffer from image shearing. This can be corrected using the g and t parameters.

The distortion parameters usually vary with the focal length, and to a lesser degree with the focus. The link checkbox indicates whether the parameter is linked or not. A linked parameter is forced to the same value for all images with the same lens number. This is the default for the HFOV and distortion parameters. If a parameter is not linked each images is allowed to have individual values for the respective parameter. This is useful if a different zoom or focus setting has been used for some images. If scanned images are used, they are usually not perfectly centered, and each image should have individual d and e parameters.


hugin models the photometric parameters of a lens/camera combination in a similar way to the lens correction model for Geometric parameters. These parameters can be set manually here in the hugin Photos tab.

Note that any or all of these parameters can be changed back to good defaults by right-clicking the particular image(s) and selecting the Reset photometric parameters in the Reset... context menu option.

Exposure and Color

Exposure (EV), EV stands for Exposure Value, setting it to 0 (zero) will result in hugin applying no exposure change to the photo.

EV is a standard photographic scale, each increase or decrease by one unit will change the exposure by the equivalent of one f-stop (ie. halving or doubling the exposure).

Very often, different photos in the same project, even those with the same lens number, will require a different Exposure. This could be because the photos were taken with a different shutter-speed or simply because the light changed between shots.

The Red multiplier and Blue multiplier settings are used to account for changes in white balance (also known as colour balance or colour temperature) between photos. Setting them both to 1 will result in no white balance change (the numbers are relative to the green channel which stays unaltered).

As with exposure, different photos in the same project are quite likely to require different white balance. Typically this will be caused by variations in lighting conditions between shots - For example a cloudy scene will contain considerably less red light than the same scene under direct sunlight.


Vignetting is dependent mainly on your lens and the aperture. Usually the centre of the image is brighter with a falloff towards the edges. The three numbers here represent a polynomial curve used by hugin to correct vignetting.

You are not expected to guess these values, they are generally loaded with a lens profile or calculated from two or more overlapping photos.

Set the values to 0,0,0 for no vignetting correction.

Usually all photos taken with the same lens will have the same vignetting, keep Link checked to ensure hugin applies the same vignetting correction to all photos with the selected lens number.

Vignetting Center Shift

The centre of vignetting is rarely the exact centre of the photo. The two numbers here indicate the position of the vignetting centre. The scale is in pixels, with 0,0 indicating the centre of the photo. The values are independent of the d & e parameters which specify the origin for projection and geometric distortion.

Camera Response

The camera response curve is used both for mapping the images to a linear colourspace when creating HDR output, and for normalising the colourspace for internal vignetting, brightness and colour corrections when creating 'normal' LDR output.

hugin uses the EMoR response model from the Computer Vision Lab at Columbia University which simplifies the full response curve to these five empirical coefficient numbers. You are not expected to guess these values, they are generally loaded with a lens profile or calculated from two or more overlapping photos.

Set the five numbers to 0,0,0,0,0 to use a generic response curve or change the Type to Linear to indicate that your input photos have a scene-referred or HDR response.

Keep Link checked to ensure hugin applies the same response curve to all photos with the selected lens number.


By right-clicking an image in the image table and selecting the context menu option Anchor this image for exposure you can specify that a particular image should be used as an unchanging reference anchor when optimising Exposure or White balance. Usually this should be the image with the least under or over-exposure or the image with the most typical White balance.


(Only in Advanced and Expert user interface mode).

Image orientation can be linked between a group of images if they are already aligned. For example, if they form a bracketed (exposure) set shot on a sturdy tripod. To do this, select all the images in the stack, and press the New stack button. You can also move images into an existing stack without selecting all the other images in the stack: press Change stack... and enter the stack number you want the selected images to join. The stack number of each image is given in the table.

If your images form approximately aligned stacks, you can create stacks as usual, select all the images and then uncheck Link by the image position. Approximately aligned stacks are common when you shoot bracketed sets handheld, or in windy conditions with a light tripod. Hugin will remember that the images form a stack, but does not force the image orientation and translation to be the same across the stack. This is useful for specifying stacks when you have a Panorama with Stacks control point detector configuration before control point generation. You do not have to manually mark approximately aligned stacks in other circumstances, however.