h *= factor;
}
- inline void scale_x(double factor)
- {
- cx *= factor;
- w *= factor;
- }
-
- inline void scale_y(double factor)
- {
- cy *= factor;
- h *= factor;
- }
-
inline cv::Rect get_rect()
{
return cv::Rect(int(cx-w/2.), int(cy-h/2.), int(w), int(h));
{
friend ThreadCtx;
public:
- bool m_debug {false};
+ bool m_debug {false};
+ bool m_visual_debug {false};
const bool m_use_scale {true};
const bool m_use_color {true};
const bool m_use_subpixel_localization {true};
double max_response = -1.;
bool p_resize_image = false;
- bool p_fit_to_pw2 = false;
const double p_downscale_factor = 0.5;
- double p_fit_factor_x = 1;
- double p_fit_factor_y = 1;
const double p_floating_error = 0.0001;
const double p_padding = 1.5;
const double p_kernel_sigma = 0.5; //def = 0.5
const double p_lambda = 1e-4; //regularization in learning step
const double p_interp_factor = 0.02; //def = 0.02, linear interpolation factor for adaptation
- cv::Size p_windows_size;
+ 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;
std::vector<double> p_angles = {0};
const int p_num_of_feats = 31 + (m_use_color ? 3 : 0) + (m_use_cnfeat ? 10 : 0);
- cv::Size p_roi;
+ cv::Size feature_size;
Kcf_Tracker_Private &d;
cv::Mat get_subwindow(const cv::Mat &input, int cx, int cy, int size_x, int size_y) const;
cv::Mat gaussian_shaped_labels(double sigma, int dim1, int dim2);
std::unique_ptr<GaussianCorrelation> gaussian_correlation;
- cv::Mat circshift(const cv::Mat &patch, int x_rot, int y_rot);
+ cv::Mat circshift(const cv::Mat &patch, int x_rot, int y_rot) const;
cv::Mat cosine_window_function(int dim1, int dim2);
cv::Mat get_features(cv::Mat &input_rgb, cv::Mat &input_gray, int cx, int cy, int size_x, int size_y, double scale) const;
cv::Point2f sub_pixel_peak(cv::Point &max_loc, cv::Mat &response) const;