]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
Use cv::Size for p_roi
authorMichal Sojka <michal.sojka@cvut.cz>
Wed, 12 Sep 2018 20:09:56 +0000 (22:09 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Wed, 12 Sep 2018 20:17:05 +0000 (22:17 +0200)
src/kcf.cpp
src/kcf.h

index 76b3a56ba16f0a3963b863eccfb70438b2eade22..0f2632e55997d7d5b6317ef4cd62144ba6334a93 100644 (file)
@@ -123,8 +123,8 @@ void KCF_Tracker::init(cv::Mat &img, const cv::Rect &bbox, int fit_size_x, int f
     p_num_of_feats = 31;
     if (m_use_color) p_num_of_feats += 3;
     if (m_use_cnfeat) p_num_of_feats += 10;
-    p_roi_width = p_windows_size.width / p_cell_size;
-    p_roi_height = p_windows_size.height / p_cell_size;
+    p_roi.width = p_windows_size.width / p_cell_size;
+    p_roi.height = p_windows_size.height / p_cell_size;
 
     p_scales.clear();
     if (m_use_scale)
@@ -753,10 +753,10 @@ void KCF_Tracker::gaussian_correlation(struct ThreadCtx &vars, const ComplexMat
 #ifdef CUFFT
     if (auto_correlation)
         cuda_gaussian_correlation(vars.data_i_features.deviceMem(), vars.gauss_corr_res.deviceMem(), vars.xf_sqr_norm.deviceMem(), vars.xf_sqr_norm.deviceMem(),
-                                  sigma, xf.n_channels, xf.n_scales, p_roi_height, p_roi_width, vars.stream);
+                                  sigma, xf.n_channels, xf.n_scales, p_roi.height, p_roi.width, vars.stream);
     else
         cuda_gaussian_correlation(vars.data_i_features.deviceMem(), vars.gauss_corr_res.deviceMem(), vars.xf_sqr_norm.deviceMem(), vars.yf_sqr_norm.deviceMem(),
-                                  sigma, xf.n_channels, xf.n_scales, p_roi_height, p_roi_width, vars.stream);
+                                  sigma, xf.n_channels, xf.n_scales, p_roi.height, p_roi.width, vars.stream);
 #else
     // ifft2 and sum over 3rd dimension, we dont care about individual channels
     DEBUG_PRINTM(vars.ifft2_res);
index 7b3e6838110daeebd2ef683552dad10d9436a564..b38e9d62182ead8a91138eafac8b5c776a99e430 100644 (file)
--- a/src/kcf.h
+++ b/src/kcf.h
@@ -129,7 +129,7 @@ private:
 
     //for big batch
     int p_num_of_feats;
-    int p_roi_height, p_roi_width;
+    cv::Size p_roi;
 
     std::vector<ThreadCtx> p_threadctxs;