In this step, you pass the control points to the cp2tform function that determines the parameters of the transformation needed to bring the image into alignment. When you use cp2tform , you must specify the type of transformation you want to perform. The cp2tform function can infer the parameters for five types of transformations. You must choose which transformation will correct the type of distortion present in the input image. See Types of Supported Transformations for more information.
Images can contain more than one type of distortion.
Ignoring terrain relief, which is minor in this area, image registration can correct for this using a projective transformation. Other distortions could be corrected simultaneously by first creating a composite transformation with maketform , given sufficient information about the terrain and camera. As the final step in image registration, you transform the input image to bring it into alignment with the base image. For more information about using imtransform , see Chapter 4, Spatial Transformations. Note The transformation defined in mytform , which is based on control points picked in only one plane of the RGB image, is applied to all three planes of the input image.