cpcorr() - Image Processing
movingPointsAdjusted = cpcorr(movingPoints,fixedPoints,moving,fixed) uses
normalized cross correlation to adjust each pair of control points
specified in movingPoints and fixedPoints. moving and fixed are
images. cpcorr returns the adjusted control points
in movingPointsAdjusted. Note:
The moving and fixed images
must have the same scale for cpcorr to be effective.
If cpcorr cannot correlate a pairs of control points, movingPointsAdjusted will
contain the same coordinates as movingPoints for
movingPointsAdjusted = cpcorr(movingPoints,fixedPoints,moving,fixed) example
Adjust control points using cross correlation
Use cpcorr to fine-tune
control points selected in an image. Note the difference in the values
of the movingPoints matrix and the movingPointsAdjusted matrix.
Read two images.moving = imread('onion.png');
fixed = imread('peppers.png');
Define sets of control points for both images.movingPoints = [127 93; 74 59];
fixedPoints = [323 195; 269 161];
Adjust the control points using cross correlation.movingPointsAdjusted = cpcorr(movingPoints,fixedPoints,...
Output / Return Value
Alternatives / See Also