| Image Processing Toolbox™ | ![]() |
Convert CPSTRUCT to valid pairs of control points
[input_points, base_points] = cpstruct2pairs(CPSTRUCT)
[input_points, base_points] = cpstruct2pairs(CPSTRUCT) takes a CPSTRUCT (produced by cpselect) and returns the arrays of coordinates of valid control point pairs in input_points and base_points. cpstruct2pairs eliminates unmatched points and predicted points.
Start the Control Point Selection Tool, cpselect.
aerial = imread('westconcordaerial.png');
cpselect(aerial(:,:,1),'westconcordorthophoto.png')Using cpselect, pick control points in the images. Select Save to Workspace from the File menu to save the points to the workspace. On the Save dialog box, check the Structure with all points check box and clear Input points of valid pairs and Base points of valid pairs. Click OK. Use cpstruct2pairs to extract the input and base points from the CPSTRUCT.
[input_points,base_points] = cpstruct2pairs(cpstruct);
cp2tform, cpselect, imtransform
![]() | cpselect | dct2 | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |