High-Speed Tracking with Kernelized Correlation Filters

Linear regression

f(z)=wTz

minwΣi(f(xi)yi)2+λ||w||2

w=(XTX+λI)1XTy

w=(XHX+λI)1XHy

Circulant matrices

High-Speed Tracking with Kernelized Correlation Filters

X=FHdiag(x^)F

x^=F(x)

xi in linear regression corresponds to a vector x=[x1,...,xn]
So, we can use circulant matrice X to represent the vector x.

Compute w^

XHX=FHdiag(x^)FFHdiag(x^)F

XHX=FHdiag(x^x^)F

High-Speed Tracking with Kernelized Correlation Filters
However, this formula isn’t used in the code. The following one is used.

kernel trick

w=Σiαiφ(xi)

φT(x)φ(x)=k(x,x)

k is the kernel function (Gaussian or Polynomial)
f(z)=wTϕ(z)

w=Σiαiϕ(xi)

f(z)=[Σiαiϕ(xi)]ϕ(z)=Σi[αiϕ(xi)ϕ(z)]

f(z)=Σiαik(z,xi)

then we need to compute α

compute α

α=(K+λI)1

High-Speed Tracking with Kernelized Correlation Filters

compute the response map of current frame

z represent the current frame

Kz=C(kxz)

use circulant matrice K to represent the kernel correlation kxz
High-Speed Tracking with Kernelized Correlation Filters

summary

  1. image patch => hog feature
  2. hog feature => fft
  3. kf = gaussian_correlation(xf, xf, kernel.sigma); (compute the kernel correlation of the first frame)
  4. alphaf = yf ./ (kf + lambda); (compute α
  5. kzf = gaussian_correlation(zf, model_xf, kernel.sigma); (second frame)
    response = real(ifft2(model_alphaf .* kzf));
    as illustrated in the formula