From 96149e2cf3c5f495ae6dc593741c4a9242b468b3 Mon Sep 17 00:00:00 2001 From: Shanigen Date: Sun, 9 Sep 2018 19:34:34 +0200 Subject: [PATCH] Same as commit before correcting dbae3ced2d9959a6552845101b46989f79d697cc --- src/kcf.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/kcf.cpp b/src/kcf.cpp index 5eb4582..924bacc 100644 --- a/src/kcf.cpp +++ b/src/kcf.cpp @@ -220,11 +220,11 @@ void KCF_Tracker::init(cv::Mat &img, const cv::Rect &bbox, int fit_size_x, int f m_use_cuda ? p_threadctxs.front()->data_features.deviceMem() : nullptr, p_threadctxs.front()->stream); DEBUG_PRINTM(p_model_xf); #if !defined(BIG_BATCH) && defined(CUFFT) && (defined(ASYNC) || defined(OPENMP)) - p_scale_vars.front()->model_xf = p_model_xf; - p_scale_vars.front()->model_xf.set_stream(p_scale_vars.front()->stream); - p_yf.set_stream(p_scale_vars.front()->stream); - p_model_xf.set_stream(p_scale_vars.front()->stream); - p_xf.set_stream(p_scale_vars.front()->stream); + p_threadctxs.front()->model_xf = p_model_xf; + p_threadctxs.front()->model_xf.set_stream(p_threadctxs.front()->stream); + p_yf.set_stream(p_threadctxs.front()->stream); + p_model_xf.set_stream(p_threadctxs.front()->stream); + p_xf.set_stream(p_threadctxs.front()->stream); #endif if (m_use_linearkernel) { @@ -234,7 +234,7 @@ void KCF_Tracker::init(cv::Mat &img, const cv::Rect &bbox, int fit_size_x, int f } else { // Kernel Ridge Regression, calculate alphas (in Fourier domain) #if !defined(BIG_BATCH) && defined(CUFFT) && (defined(ASYNC) || defined(OPENMP)) - gaussian_correlation(*p_scale_vars.front(), p_scale_vars.front()->model_xf, p_scale_vars.front()->model_xf, + gaussian_correlation(*p_threadctxs.front(), p_threadctxs.front()->model_xf, p_threadctxs.front()->model_xf, p_kernel_sigma, true); #else gaussian_correlation(*p_threadctxs.front(), p_model_xf, p_model_xf, p_kernel_sigma, true); @@ -250,7 +250,7 @@ void KCF_Tracker::init(cv::Mat &img, const cv::Rect &bbox, int fit_size_x, int f // p_model_alphaf = p_yf / (kf + p_lambda); //equation for fast training #if !defined(BIG_BATCH) && defined(CUFFT) && (defined(ASYNC) || defined(OPENMP)) - for (auto it = p_scale_vars.begin(); it != p_scale_vars.end(); ++it) { + for (auto it = p_threadctxs.begin(); it != p_threadctxs.end(); ++it) { (*it)->model_xf = p_model_xf; (*it)->model_xf.set_stream((*it)->stream); (*it)->model_alphaf = p_model_alphaf; -- 2.39.2