# Hugin Control Points tab

## About Control points

Control points are central to Panorama Tools[*] and hugin, because they are used to estimate the position of image position and lens parameters described above. A control point specifies a corresponding point between two images. Using these corresponding points, the hugin Optimizer tab can estimate the image position and lens parameters. It is therefore important that the control points are accurate and usually at least 3 well distributed control points should be used to estimate the image position (yaw, roll and pitch) and maybe the HFOV. For accurate estimation of the a,b,c distortion parameters, many well distributed control points, and a large overlap (up to 50%) are required.

## Description

The Tab consists of two image displays and associated pull-down lists to switch images to be edited. The bottom contains a list view where Points can be selected and some fields to edit a selected point. Points can also be selected by clicking or dragging on them in the images. It is possible to zoom out to show the full image.

Entries in the pull-down lists have a coloured block indicating the average quality of the control-points between the selected photos, a short red block indicates a 'bad' alignment, whereas a larger green block indicates a 'good' alignment. No coloured block indicates that there are no control-points between the photos.

Adding a control point works by selecting one point in the left or right image, and then clicking onto the corresponding point in the other image. If auto add is not set, the points can be moved by clicking at some other place in the images. They are added to the list of control points by pressing the right mouse button, the a key or by pushing the Add button. If you press the right mouse button when only one point is selected, the point selection will be aborted. auto add adds the control point as soon as both points have been specified.

If the images are zoomed out (fit to window), the first click zooms to a temporary 100% view to give you the chance to refine your selection. Note that only the second click will trigger the auto estimate.

For good results, the control points should be as accurate as possible. However, it is often tedious to select a particular point exactly, and it may be helpful to use the arrow keys (left, right, up, and down) to nudge the selection point in various directions pixel-by-pixel (users of X11 may need to ensure that a particular image pane has the focus by placing the mouse cursor within its bounds). Once a point pair has been roughly selected, the fine tune function of hugin can be used to estimate the corresponding point up to one tenth of a pixel. The keyboard short cut for the fine tune function is the f key. Fine tune only search in a small neighbourhood of the currently selected points. The size of this neighbourhood can be controlled by opening the Hugin Preferences panel and setting the Local area search width.

Note that the fine tune function estimates the translation of the patch around the point selected in the other image with respect to the current image. This works well if the rotation between the images is small and narrow angle lenses have been used. If wide angle or Fisheye Projection images are used, rotation search should be activated in the Hugin Preferences panel. Then hugin also searches for rotated occurrences of the patch around the selected point.

The image can be scrolled by pressing the middle mouse button or the CTRL key while moving the mouse. If the shift key is pressed instead, both images will be scrolled. This is very useful if control points are set using the 100% zoom level.

Control point creation is also influenced by the following check boxes:

- auto fine tune hugin helps you to find the second point by looking for it in a search region (shown by a rectangle around the cursor). This might not always work, but usually is reliable, if the image distortions are not too big. Try and play with it.
- auto add A control point is automatically added when both points are known. You won't have time to refine the selection before adding the point.
- auto estimate Tries to estimate the position of the second point by estimating the translation between the two images. This is very crude and probably only works for single row panoramas created from Rectilinear Projection images.

All these flags can be combined. I typically use auto fine tune and auto estimate at the same time. Then hugin usually automatically selects the second point correctly, at least for normal, Rectilinear Projection images that are not rotated too much.

hugin also includes an experimental control points creation algorithm. It can be invoked by pressing the g key. Corners in the currently selected image are detected, and corresponding control points are set based on the current relative positions of the two images. The images need to be approximately aligned already for this to be useful. Note that these points then need to be aligned by eye, with the Fine-tune button or with the Fine-tune all Points function in the Edit menu of the Hugin Main window.

## Control point mode

Use the mode pull down menu to change the type of an existing pair of control points.

### normal control points

The normal control point mode is used to align pairs of overlapping photos by matching identical features in both photos.

### vertical line and horizontal line control points

Pairs of vertical control points and horizontal control points are different from normal control points since they are used to align input images to particular alignments in the output panorama rather than simply stitching images together.

Select two points along a feature that you want to be aligned vertically or horizontally in the final panorama. If these are in the same photo, hugin will usually detect that you are trying to create horizontal or vertical control points and set the mode appropriately, if they are in different photos then you will need to set the mode manually.

Typically horizontal and vertical points are used either to level a spherical panorama[*] or to correct perspective.

### Straight line control points

Adding straight line control points is basically the same as creating horizontal control points and vertical control points, except that you need more than just one pair to make up a straight line.

Create a pair of points in the hugin Control Points tab, then pick Add new line in the mode pull-down. This first line will be called Line 3, you can assign more pairs of points to it using the same mode pull-down.

## Keyboard shortcuts

Here is a summary of the keyboard shortcuts available in the Control Point tab:

Key Function

- a add a new point that has been selected in both images, and the auto add is switched off.
- f fine tune currently selected control point pair. Same as the Fine Tune button
- g experimental control point generation algorithm.
- Del Remove currently selected control point.
- 0 Zoom out to full view.
- 1 100% view.
- 2 200% view.
- arrow keys nudge a selection point or selected control point around pixel-by-pixel.
- shift + arrow keys scroll both images at the same time.
- Ctrl + left arrow and Ctrl + right arrow switch to the next pair of photos.

Mouse function Function

- control key + mouse movement Scroll image under cursor
- shift key + mouse movement Scroll both images
- left button Use left mouse button to select new points or drag existing points.
- right mouse button Add control point, if auto add is switched off
- middle mouse button Scroll image under cursor
- shift + middle mouse button Scroll both images

Retrieved from "http://wiki.panotools.org/Hugin_Control_Points_tab"