]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blobdiff - src/kcf.h
Implement sub-gird angle estimation
[hercules2020/kcf.git] / src / kcf.h
index 4a7f9f0e499894d77ed1b0d70e4acc3034bc78cb..18f132d76215a9bf608ffe879b4d2a85b596d006 100644 (file)
--- a/src/kcf.h
+++ b/src/kcf.h
@@ -51,6 +51,7 @@ public:
     const bool m_use_color {true};
     const bool m_use_subpixel_localization {true};
     const bool m_use_subgrid_scale {true};
+    const bool m_use_subgrid_angle {true};
     const bool m_use_cnfeat {true};
     const bool m_use_linearkernel {false};
     const int p_cell_size = 4;            //4 for hog (= bin_size)
@@ -105,8 +106,8 @@ private:
     cv::Size p_windows_size;              // size of the patch to find the tracked object in
     cv::Size fit_size;                    // size to which rescale the patch for better FFT performance
 
-    const uint p_num_scales = m_use_scale ? 7 : 1;
-    const double p_scale_step = 1.02;
+    const uint p_num_scales = m_use_scale ? 5 : 1;
+    const double p_scale_step = 1.03;
     double p_min_max_scale[2];
     std::vector<double> p_scales;
 
@@ -176,6 +177,7 @@ private:
     void resizeImgs(cv::Mat &input_rgb, cv::Mat &input_gray);
     void train(cv::Mat input_rgb, cv::Mat input_gray, double interp_factor);
     double findMaxReponse(uint &max_idx, cv::Point2d &new_location) const;
+    double sub_grid_angle(uint max_index);
 };
 
 #endif //KCF_HEADER_6565467831231