From: Michal Sojka Date: Thu, 20 Sep 2018 04:32:09 +0000 (+0200) Subject: Fixes X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hercules2020/kcf.git/commitdiff_plain/14e57bb8927e1d43a7f7350ef7c94b3b653d239d Fixes --- diff --git a/src/dynmem.hpp b/src/dynmem.hpp index 881c922..4784233 100644 --- a/src/dynmem.hpp +++ b/src/dynmem.hpp @@ -76,7 +76,7 @@ class MatDynMem : public DynMem, public cv::Mat { assert((type & CV_MAT_DEPTH_MASK) == CV_32F); } MatDynMem(int height, int width, int type) - : DynMem(width * height * sizeof(DynMem::type) * CV_MAT_CN(type)), cv::Mat(height, width, type, hostMem()) + : DynMem(width * height * CV_MAT_CN(type)), cv::Mat(height, width, type, hostMem()) { assert((type & CV_MAT_DEPTH_MASK) == CV_32F); } diff --git a/src/kcf.h b/src/kcf.h index 72de679..9408e11 100644 --- a/src/kcf.h +++ b/src/kcf.h @@ -140,7 +140,7 @@ private: private: DynMem xf_sqr_norm; - DynMem yf_sqr_norm{sizeof(float)}; + DynMem yf_sqr_norm{1}; ComplexMat xyf; MatDynMem ifft_res; MatDynMem k; diff --git a/src/threadctx.hpp b/src/threadctx.hpp index 891c3db..85529dd 100644 --- a/src/threadctx.hpp +++ b/src/threadctx.hpp @@ -41,7 +41,7 @@ public: std::future async_res; #endif - KCF_Tracker::GaussianCorrelation gaussian_correlation{Fft::freq_size(roi), num_of_scales, num_channels}; + KCF_Tracker::GaussianCorrelation gaussian_correlation{roi, num_of_scales, num_channels}; #if defined(CUFFT) || defined(FFTW) // TODO: Why this ifdef? MatDynMem in_all{roi.height * int(num_of_scales), roi.width, CV_32F};