From: Michal Sojka Date: Wed, 12 Sep 2018 20:09:56 +0000 (+0200) Subject: Use cv::Size for p_roi X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hercules2020/kcf.git/commitdiff_plain/d22d1a3b77c3f90b661d184bcc79c6732f2459f7 Use cv::Size for p_roi --- diff --git a/src/kcf.cpp b/src/kcf.cpp index 76b3a56..0f2632e 100644 --- a/src/kcf.cpp +++ b/src/kcf.cpp @@ -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); diff --git a/src/kcf.h b/src/kcf.h index 7b3e683..b38e9d6 100644 --- 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 p_threadctxs;