POLYNOMIAL_CORRELATION Polynomial Kernel at all shifts, i.e. kernel correlation. Evaluates a polynomial kernel with constant A and exponent B, for all relative shifts between input images XF and YF, 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. See also MAXRESPONSEDSKCF, MAXRESPONSEDEPTHWEIGHTDSKCF, MODELUPDATEDSKCF, LINEAR_CORRELATION, GAUSSIAN_CORRELATION, This function has been inserted in the DS-KCF matlab library from the KCF library released by Joao F. Henriques, 2014 http://www.isr.uc.pt/~henriques/
0001 function kf = polynomial_correlation(xf, yf, a, b) 0002 %POLYNOMIAL_CORRELATION Polynomial Kernel at all shifts, i.e. kernel correlation. 0003 % Evaluates a polynomial kernel with constant A and exponent B, for all 0004 % relative shifts between input images XF and YF, which must both be MxN. 0005 % They must also be periodic (ie., pre-processed with a cosine window). 0006 % The result is an MxN map of responses. 0007 % 0008 % Inputs and output are all in the Fourier domain. 0009 % 0010 % See also MAXRESPONSEDSKCF, MAXRESPONSEDEPTHWEIGHTDSKCF, 0011 % MODELUPDATEDSKCF, LINEAR_CORRELATION, GAUSSIAN_CORRELATION, 0012 % 0013 % This function has been inserted in the DS-KCF matlab library from the 0014 % KCF library released by 0015 % Joao F. Henriques, 2014 0016 % http://www.isr.uc.pt/~henriques/ 0017 0018 %cross-correlation term in Fourier domain 0019 xyf = xf .* conj(yf); 0020 xy = sum(real(ifft2(xyf)), 3); %to spatial domain 0021 0022 %calculate polynomial response for all positions, then go back to the 0023 %Fourier domain 0024 kf = fft2((xy / numel(xf) + a) .^ b); 0025 0026 end 0027