# SAMF

SAMF

```search_size = [1  0.985 0.99 0.995 1.005 1.01 1.015];

for i=1:size(search_size,2)
tmp_sz = floor((target_sz * (1 + padding))*search_size(i));
param0 = [pos(2), pos(1), tmp_sz(2)/window_sz(2), 0,...
tmp_sz(1)/window_sz(2)/(window_sz(1)/window_sz(2)),0];
param0 = affparam2mat(param0);
patch = uint8(warpimg(double(im), param0, window_sz));
zf = fft2(get_features(patch, features, cell_size, cos_window,w2c));

%calculate response of the classifier at all shifts
switch kernel.type
case 'gaussian',
kzf = gaussian_correlation(zf, model_xf, kernel.sigma);
case 'polynomial',
kzf = polynomial_correlation(zf, model_xf, kernel.poly_a, kernel.poly_b);
case 'linear',
kzf = linear_correlation(zf, model_xf);
end
response(:,:,i) = real(ifft2(model_alphaf .* kzf));  %equation for fast detection
end
%target location is at the maximum response. we must take into
%account the fact that, if the target doesn't move, the peak
%will appear at the top-left corner, not at the center (this is
%discussed in the paper). the responses wrap around cyclically.
[vert_delta,tmp, horiz_delta] = find(response == max(response(:)), 1);```

119 篇文章25 人订阅

0 条评论

## 相关文章

651

1891

2906

5374

2555

2855

3553

### 深度学习: 检测算法演进

[1] 干货 | 目标检测入门，看这篇就够了 [2] 基于深度学习的目标检测算法综述 [3] 基于深度学习的「目标检测」算法综述

963

2375

1.5K1