]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
Fixes
authorMichal Sojka <michal.sojka@cvut.cz>
Thu, 20 Sep 2018 04:32:09 +0000 (06:32 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 20 Sep 2018 13:51:40 +0000 (15:51 +0200)
src/dynmem.hpp
src/kcf.h
src/threadctx.hpp

index 881c922be5e69caf7b51a62e67ef52ec18592eb1..4784233aa4755048d003462162c2a9848645701b 100644 (file)
@@ -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);
     }
index 72de67904db7b81e9b5d1a11e7a599bbc0a16224..9408e11fb07b45ffead439b1eb3c20a09df8b459 100644 (file)
--- 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;
index 891c3db483a9c313d23648a55de1b23232980d7b..85529ddf7e193e57cb3c8d0a80b57d6df8707632 100644 (file)
@@ -41,7 +41,7 @@ public:
     std::future<void> 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};