Code covered by the BSD License
- Image correspondence by c...
- convolve2(x, m, shape, tol)CONVOLVE2 Two dimensional convolution.
- correspDisplay(corresps, ...correspDisplay Display image correspondences
- correspEdgeDisplay(matche...correspEdgeDisplay displays image match under affine flow
- corrpeak(i, m, n, tol)CORRPEAK Find peak of correlation.
- exindex(arr, varargin)
EXINDEX extended array indexing
- findpeaks(h, varargin)FINDPEAKS Finds the local maxima of an array.
- imtransform_same(im, t, i...IMTRANSFORM_SAME transforms an image into the original coordinates
- max2(x)MAX2 Find maximum of 2-D array
- patch_std(varargin)PATCH_STD Sliding standard deviation.
- patch_var(x, psize, shape)PATCH_VAR Sliding variance
- setProps(obj, varargin)
setProps sets object properties
- varPeaks(im, patchsize, r...varPeaks Get set of distinctive points in image
View all files
Image correspondences using cross-correlation
16 Apr 2010
(Updated 09 Dec 2011)
Find matching features in pairs of images using normalised cross-correlation: class file and demo.
|varPeaks(im, patchsize, relthresh)
function [r,c] = varPeaks(im, patchsize, relthresh)
%varPeaks Get set of distinctive points in image
% [R,C] = varPeaks(IM, PATCHSIZE, RELTHRESH) returns the row and column
% coords of a set of points in the image IM which can be used as a set
% of features for matching.
% Features are local maxima of local variance. The variance for each
% square patch of size PATCHSIZExPATCHSIZE is found. Features are
% returned for local maxima of this measure where it exceeds RELTHRESH *
% (the maximum local variance).
% PATCHSIZE should normally be odd. RELTHRESH should be in the range 0
% to 1; higher values mean fewer points are returned.
% Copyright David Young 2010
vars = patch_var(im, patchsize);
[r,c,v] = findpeaks(vars);
keep = v > relthresh * max(v);
% select high features and restore indexing for original image
hsize = (patchsize-1) / 2;
r = r(keep) + hsize;
c = c(keep) + hsize;