You will implement three keys functions of the KCF tracker, described in [[http://www.robots.ox.ac.uk/~joao/publications/henriques_tpami2015.pdf | High-Speed Tracking with Kernelized Correlation Filters]] by Henriques et.al. ====== How to start work ====== - Download code [[ http://cmp.felk.cvut.cz/~mishkdmy/ws_ucu_2017/video_lab_3_task.zip| video_lab_3_task.zip ]] - unpack to $KCFDIR ====== Gaussian correlation ====== Write a function ''function k = kernel_correlation(sigma, x, x_prime)'' , which computes gaussian kernel with bandwidth sigma for all displacements between input patches X and X_prime, which must both be MxN, in Fourier domain. {{:courses:ucuws17:labs:kcf_31.png?600|}} ''hat'' stands for Fourier-transformed patches, X∗ is the complex-conjugate (function ''conj'') of X, Functions ''fft2'' and ''circshift'' will help you. ''circshift'' will set of the response map in the center of the image after ''ifft2(fft2())'', ⨀ stands for element-wise multiplication ====== Training ====== {{:courses:ucuws17:labs:kcf_17.png?200|}} Write function ''alphaf = train_kcf(x,yf,sigma,lambda)'', which computes filters values. ''yf'' comes already in Fourier domain, ''sigma'' is parameter for ''kernel_correlation'' and ''lambda'' is regularization parameter in Ridge regression. Division is element-wise. Output ''alphaf'' should be in Fourier domain. ====== Detection ====== {{:courses:ucuws17:labs:kcf_19.png?200|}} Write a function ''response_map = detect_kcf(x,z,sigma,alphaf)''. This function returns response map between patches X and Z, which must both be MxN, using alphaf weights. Convert response map to spatial domain by ''ifft2'' before returning. Examples of tho two patches, their pixel-wise difference and response map are shown in figure below {{:courses:ucuws17:labs:kcf_resp7.png?500|}} After finishing this 3 functions, run ''run_tracker.m'' file to test tracker and save image output.