Image Processing Toolbox    
cpselect

Control Point Selection Tool

Syntax

Description

cpselect(input,base) starts the Control Point Selection Tool, a graphical user interface that enables you to select control points in two related images. input is the image that needs to be warped to bring it into the coordinate system of the base image. input and base can be either variables that contain images or strings that identify files containing grayscale images. The Control Point Selection Tool returns the control points in a CPSTRUCT structure. (For more information, see Using the Control Point Selection Tool.)

cpselect(input,base,CPSTRUCT_IN) starts cpselect with an initial set of control points that are stored in CPSTRUCT_IN. This syntax allows you to restart cpselect with the state of control points previously saved in CPSTRUCT_IN.

cpselect(input,base,xyinput_in,xybase_in) starts cpselect with a set of initial pairs of control points. xyinput_in and xybase_in are m-by-2 matrices that store the input and base coordinates, respectively.

H = cpselect(input,base,...) returns a handle H to the tool. You can use the dispose(H) or H.dispose syntaxes to close the tool from the command line.

Class Support

The input images can be of class uint8, uint16, double, or logical.

Algorithm

cpselect uses the following general procedure for control point prediction.

  1. Find all valid pairs of control points.
  2. Infer a spatial transformation between input and base control points using method that depends on the number of valid pairs as follows:

    2 pairs
    Linear conformal
    3 pairs
    Affine
    4 or more pairs
    Projective
              
  3. Apply spatial transformation to the new point to generate the predicted point.
  4. Display predicted point.

Example

Start tool with saved images.

Start tool with workspace images and points.

See Also

cpcorr, cp2tform, cpstruct2pairs, imtransform


  cpcorr cpstruct2pairs