LINEAR_CORRELATION Linear Kernel at all shifts, i.e. correlation. Computes the dot-product for all relative shifts between input images X and Y, which must both be MxN. They must also be periodic (ie., pre-processed with a cosine window). The result is an MxN map of responses. Inputs and output are all in the Fourier domain. This function has been inserted in the DS-KCF matlab library from the KCF library released by See also MAXRESPONSEDSKCF, MAXRESPONSEDEPTHWEIGHTDSKCF, MODELUPDATEDSKCF, GAUSSIAN_CORRELATION, POLYNOMIAL_CORRELATION, Joao F. Henriques, 2014 http://www.isr.uc.pt/~henriques/
0001 function kf = linear_correlation(xf, yf) 0002 %LINEAR_CORRELATION Linear Kernel at all shifts, i.e. correlation. 0003 % Computes the dot-product for all relative shifts between input images 0004 % X and Y, which must both be MxN. They must also be periodic (ie., 0005 % pre-processed with a cosine window). The result is an MxN map of 0006 % responses. 0007 % 0008 % Inputs and output are all in the Fourier domain. 0009 % This function has been inserted in the DS-KCF matlab library from the 0010 % KCF library released by 0011 % 0012 % See also MAXRESPONSEDSKCF, MAXRESPONSEDEPTHWEIGHTDSKCF, 0013 % MODELUPDATEDSKCF, GAUSSIAN_CORRELATION, POLYNOMIAL_CORRELATION, 0014 % 0015 % Joao F. Henriques, 2014 0016 % http://www.isr.uc.pt/~henriques/ 0017 0018 %cross-correlation term in Fourier domain 0019 kf = sum(xf .* conj(yf), 3) / numel(xf); 0020 0021 end 0022