Main Content

Export Control Points to the Workspace

After you specify control points, you must save them in the workspace to make them available for the next step in image registration, processing by fitgeotform2d.

To save control points to the workspace, select File on the Control Point Selection Tool menu bar, then choose the Export Points to Workspace option. The Control Point Selection Tool displays this dialog box:

Export Points to Workspace dialog box

By default, the Control Point Selection Tool saves the coordinates of valid control points. The Control Point Selection Tool does not include unmatched and predicted points in the movingPoints and fixedPoints arrays. The arrays are n-by-2 arrays, where n is the number of valid control point pairs you selected. The two columns represent the x- and y-coordinates of the control points, respectively, in the intrinsic coordinate system of the image.

This example shows the movingPoints array containing four valid pairs of control points.

movingPoints =

  215.6667  262.3333
  225.7778  311.3333
  156.5556  340.1111
  270.8889  368.8889

To save the current state of the Control Point Selection Tool, including unpaired and predicted control points, select the Structure with all points check box.

Export Points to Workspace dialog box with the "Structure with all points" check box selected

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

cpstruct = 

         inputPoints: [4x2 double]
          basePoints: [4x2 double]
      inputBasePairs: [4x2 double]
                 ids: [4x1 double]
        inputIdPairs: [4x2 double]
         baseIdPairs: [4x2 double]
    isInputPredicted: [4x1 double]
     isBasePredicted: [4x1 double]

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.

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

The Control Point Selection Tool also asks if you want to save your control points when you exit the tool.

See Also

| |

Related Topics