Image Processing Toolbox User's Guide Previous page   Next Page

Saving Control Points

After you specify control point pairs, you must save them in the MATLAB workspace to make them available for the next step in image registration, processing by cp2tform.

To save control points to the MATLAB workspace,

  1. Select File on the Control Point Selection Tool menu bar.
  2. Choose the Save Points to Workspace option. The Control Point Selection Tool displays this dialog box:

By default, the Control Point Selection Tool saves the x-coordinates and y-coordinates that specify the locations of the control points you selected in two arrays named input_points and base_points, although you can specify other names. These are n-by-2 arrays, where n is the number of valid control point pairs you selected. For example, this is an example of the input_points array if you picked four pairs of control points. The values in the left column represent the x-coordinates; the values in the right column represent the y-coordinates.

Whenever you exit the Control Point Selection Tool, it asks if you want to save your control points.

Saving Your Control Point Selection Session

To save the current state of the Control Point Selection Tool, select the Structure with all points check box in the Save Points to Workspace dialog box.

This option saves the positions of all the control points you specified and their current states in a cpstruct structure.

You can use the cpstruct to restart a control point selection session at the point where you left off.

This option is useful if you are picking many points over a long time and want to preserve unmatched and predicted points when you resume work. The Control Point Selection Tool does not include unmatched and predicted points in the input_points and base_points arrays.

To extract the arrays of valid control point coordinates from a cpstruct, use the cpstruct2pairs function.

Previous page  Specifying Matching Control Point Pairs Using Correlation to Improve Control Points Next page

© 1994-2005 The MathWorks, Inc.