Control Points

At least four control points are required for calculating the transformation parameters (called a Homography in the computer vision literature) between two images.












You can hide and show all control points by clicking on  

You can load or save control points to files under names which differ from that of the image. The default is to save them as imagename.ctl when an image is closed if they have been modified.  You will be asked if you wish to do this.

You can also delete all control points belonging to the currently active image You will be asked to confirm this after clicking on the toolbit.



You may find it helpful to place a temporary grid on either of the two images to aid in placement of control points.

The following operations which can be performed on control points:

Note:

All keys except the arrow keys must be pressed before a mouse button is pressed, and they must be held down until after the mouse button is released, or nothing happens.  You can use this feature to cancel an operation simply by releasing the key before releasing the mouse button.

Enter four primary control points using a dragged quadrilateral:

Turn the quadrilateral in an image on if it is not already on using the quadrilateral tool bit  or the equivalent menu entry. 

An image which has no control points will show the quadrilateral as a rectangle.






























Place the cross cursor near one of the corners of the blinking red and white quadrilateral. 


Hold down Shift and the Left Mouse Button.  





















The nearest corner will attach itself to the cursor. Drag it to a major point of interest visible in an image pair. Repeat this for three additional points. This establishes a rough basic correspondence between the images. You may find it convenient to
rotate one of the images (usually the map if the other image is oblique) so that the quadrilateral in that image may be dragged in a similar order and direction to that in the corresponding image. Enlarge both images so that you can see details of points suitable for control or if available, boundaries which intersect that can be used for fine placement by aligning the blinking red/white lines with them.





















Take care not to cross the lines of a quadrilateral. Both images must maintain this shape. 


When you have finished, corresponding quadrilaterals in the image pair define the first four control points.






























If you prefer, you can turn off the quadrilateral
before you move it and enter the four points required one at a time:

Enter or Delete a single control point:

Hold down Ctrl and Left Mouse Button.

Enter:

A red rimmed magnifier appears which can be dragged to a new position. When the left mouse button is released, a control point is set at the position given by the centre of the magnifier and marked on the image in either black or white depending on the brightness of the background along with an identification number. Zoom into the image so that you can see details in the magnifier. Clicking on the little magnifier button in the navigation window at the upper left corner will enlarge the image so that pixels are represented 1:1 on the screen. Drag the frame in the navigation palette to reach an area of interest.

Delete:

Repeat the above instructions and centre the magnifier cursor over an extant control point.  The point will be deleted when the mouse button is released.























Insert a control point at the intersection of two linear features in an image:


Hold down Alt and the Left Mouse Button.

Hold down the left button while Alt is pressed and drag the mouse to draw a red/white blinking line on the image. Release the left button and repeat the operation to draw a second line and to set a control point at the intersection of the two lines.  If the intersection is outside of the image, a square will be drawn along with the identification number at the nearest point on a side of the image in the direction of the intersection.






























Move a control point a pixel at a time (Tweaking):


Hold down Alt and the Right Mouse Button.

A light blue rimmed magnifier appears. Drag this to centre it over a control point and release the button.  























The control point colour changes to red. You can now move the control point a pixel at a time with the four arrow keys on the numeric keypad.  The original red marker is retained for reference. 






















During the process, a small dialog box shows the average symmetric reprojection error for all ponts and the error at each point:













The average reprojection error is calculated from the difference in Euclidian distance between the known coordinate of a point in one image compared with itsr calculated value on transformation from the corresponding image and the reverse. Averaging is used to compensate partly for differing image sizes.  The average error for all points is shown above the list. Minimizing the reprojection error at all points by "tweaking" the position of each point in turn with the arrow keys should always be done for best results before transforming an image.  


Auto-Tweaking:

If you hold down the keyboard Ctrl (control) key and then press the Ins (insert) key while tweaking, AirPhoto will search for a position for the selected point which minimizes the global reprojection error (not necessarily the minimum reprojection error for the chosen point). 

Note:

The reprojection error box can be shown or hidden at any time by pressing F9 even if no "tweaking" has been done.

Press Enter on the keyboard, and the control point is moved to the new position selected with the arrow keys or determined via auto-tweaking and the red marker is turned off.

Disable a control point or a control point pair:

Hold down Ctrl  and Right Mouse Button.

A blue rimmed magnifier appears and when placed over a control point and the button released, the control point is disabled and changes its colour to blue. If a corresponding control point in another image exists, it too will be disabled.  Repeat the operation to re-enable disabled control points. Disabled control points are not deleted. They are simply not used. Disabling a point pair enables you to see how this affects a later transformation or prediction of a new control point.























Predict the position of a control point in a second image:


Hold down the Left Mouse Button and  drag.

If two images with at least four control points each are loaded, then a black-rimmed magnifier appears when the left button is held down. If the corresponding area in the second image is visible, a green-rimmed magnifier appears in the opposite image and tracks the position of the black rim magnifier when the mouse is dragged. 

When the mouse button is released, the green magnifier remains in place so that you can then use one of the above methods with either the red magnifier or line intersection to enter a control point at the precise location shown. 






























Note:
 


Althought four points in each image are normally sufficient to define a transformation between them (homography), the calculation is sometimes unstable, depending on the shapes and orientations of the quadrilaterals and the sizes of the images. You can test this by holding down the left mouse button and dragging near one or more of the quadrilateral corners to see if the black and green magnifiers track at each corner. It is advisable to add a fifth point to both images if possible in order to stabilize the result if they don't track.
Try this with both a full screen image and with 1:1 magnification by clicking on the little magnifier in the upper left drag window.  


Optionally, using the Right Mouse Button click on the green magnifier:

The cursor changes to a double cross. A small menu appears over the magnifier which enables you to change the degree of magnification over the range from 1 to 4 and to change the shape of the magnifier from circular to square or square with rounded corners.  



You can drag the magnifier to examine any point on the screen in detail.























Enter a pair of control points simultaneously in an image pair:


Hold down Shift and the Right Mouse Button:

Before using this method, it is best to locate a control point pair using the black/green magnifier technique above by holding down only the left mouse button so that you can adjust the enlargement and positioning of both images before going on.

If two images  with at least 4 control points each are already loaded and comparable areas displayed, then two magnifiers appear, one cyan rimmed, the other magenta rimmed. The cyan rimmed magnifier tracks the mouse when it is dragged. Releasing the right button enters two control points simultaneously in both images. If the cyan magnifier is held on a control point which has a corresponding point in the other image and the button released, both control points will be deleted.  Corresponding areas in both images should be visible when using this technique, but off-image control points can be added, leaving a little square mark at the image border to remind you that it is there. 






























If the position of the control point entered by the magneta magnifier isn't perfect, refine it using the control point "tweaking" operation described above. The method used for control point prediction is only approximate. It's precision increases with the number of entered control point pairs, but it is not perfect. If control points have been tweaked before using this option, results are usually quite close to optimal, but post-tweaking is advisable in most cases.


Debugging control point placement:

If you experience difficulty in the placement and appearance of a transformed image, you can check changes rapidly without actually transforming by clicking on the Debug option on the Control menu:











When this option is checked, follow it with the Transform option, and the programme will display the area covered by the transformed data thusly:
























Make changes in control point placement and repeat this operation until a satisfactory position is obtained, then uncheck the Debug option and carry out the transformation normally.


See  Mouse Actions for these operations classified by mouse buttons and keys.