Skip to Main Content Skip to Search
Product Documentation

Using Correlation to Improve Control Points

You might want to fine-tune the control points you selected using cpselect. Using cross-correlation, you can sometimes improve the points you selected by eye using the Control Point Selection Tool.

To use cross-correlation, pass sets of control points in the input and base images, along with the images themselves, to the cpcorr function.

input_pts_adj= cpcorr(input_points, base_points, input, base);

The cpcorr function defines 11-by-11 regions around each control point in the input image and around the matching control point in the base image, and then calculates the correlation between the values at each pixel in the region. Next, the cpcorr function looks for the position with the highest correlation value and uses this as the optimal position of the control point. The cpcorr function only moves control points up to 4 pixels based on the results of the cross-correlation.

If cpcorr cannot correlate some of the control points, it returns their values in input_points unmodified.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS