From ae108a35213e52b8bf283b860eb86f0f2e7d009c Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Fri, 21 Sep 2018 00:58:54 +0200 Subject: [PATCH] Do not leave KCF_Tracker::gaussian_correlation unset This looks like a nicer solution than the one suggested in #23. Not tested. --- src/kcf.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kcf.cpp b/src/kcf.cpp index 4a56fb2..9071fc4 100644 --- a/src/kcf.cpp +++ b/src/kcf.cpp @@ -222,6 +222,9 @@ void KCF_Tracker::init(cv::Mat &img, const cv::Rect &bbox, int fit_size_x, int f d.threadctxs.emplace_back(p_roi, p_num_of_feats * p_num_scales, p_num_scales); #endif + gaussian_correlation.reset(new GaussianCorrelation(p_roi, IF_BIG_BATCH(p_num_scales, 1), + p_num_of_feats * IF_BIG_BATCH(p_num_scales, 1))); + p_current_scale = 1.; double min_size_ratio = std::max(5. * p_cell_size / p_windows_size.width, 5. * p_cell_size / p_windows_size.height); -- 2.39.2