For a project I'd like to set up an easy to implement tracker. I read several papers and chose to go for the mosse (minimum output of squared error) tracker from Bolme et al.
The formula to obtain the mosse filter is (equation 5 in the paper):
H* = sum(Gi x Fi*)/(sum(Fi x Fi*) +e)
Where Gi is the fourier transform of the desired output, a 2D gaussian shaped peak centered on the target in the training image.
Fi is the fourier transform of the training image.
x denotes elementwise multiplication.
the asterisk indicates that it is the conjugate of the fourier transform.
e = 0.1, is a regularisation parameter that induces noise for enhanced noise tolerance.
To generate training images I took the first frame and applied small affine transformations to it.
But somewhere I made a mistake. Since my filter looks nothing like the one in the paper.
mine looks like this.
on the left the input image and on the right the obtained filter.
I even checked if the transformation to the training images and the desire output are faulty. However, they look fine to me.
Unfortunately I have no background in signal processing or linear algebra. So I would be really grateful if you could help me.
Below I added the Matlab code for my failed filter.
% get variables to store the numerator and denominator
sum_numerator = zeros(size(filter));
sum_denominator = zeros(size(filter));
for a = 1:numberOfTrainingImages
Fi = fft2(image);
Gi = fft2(desiredOutput);
% sum_numerator is the correlation between input and desired output
sum_numerator = sum_numerator+ ( Gi .* conj(Fi));
% sum_denominator is the energy spectrum of the input
sum_denominator = sum_denominator + ( Fi .* conj(Fi));
% Generate a training image and a according desired output
[image, desiredOutput] = generateTrainingImage (OriginalImage);
end
% elementwise division to get the filter
H = sum_numerator ./ sum_denominator;