Image Processing Toolbox User's Guide |
Syntax
cpselect(input,base) cpselect(input,base,CPSTRUCT_IN ) cpselect(input,base,xyinput_in
,xybase_in
) H = cpselect(input,base,...)
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 close(H)
or H.close
syntax 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.
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 |
Platform Support
cpselect
requires Java and is not available on any platform that does not support Java. In addition, cpselect
is not available on the Macintosh systems even with Java.
Memory Usage
To increase the amount of memory available to cpselect
, you must put a file called 'java.opts'
in your start-up directory.
Example
Start tool with workspace images and points.
I = checkerboard; J = imrotate(I,30); base_points = [11 11; 41 71]; input_points = [14 44; 70 81]; cpselect(J,I,input_points,base_points);
See Also
cpcorr
, cp2tform
, cpstruct2pairs
, imtransform
cpcorr | cpstruct2pairs |
© 1994-2005 The MathWorks, Inc.