9 #include "complexmat.cuh"
11 #include "complexmat.hpp"
18 ThreadCtx(cv::Size roi, uint num_channels, uint num_of_scales
24 , num_channels(num_channels)
25 , num_of_scales(num_of_scales)
31 ThreadCtx(ThreadCtx &&) = default;
33 void track(const KCF_Tracker &kcf, cv::Mat &input_rgb, cv::Mat &input_gray);
38 cv::Size freq_size = Fft::freq_size(roi);
41 KCF_Tracker::GaussianCorrelation gaussian_correlation{roi, num_of_scales, num_channels};
43 MatDynMem ifft2_res{roi, CV_32FC(int(num_channels))};
45 ComplexMat zf{uint(freq_size.height), uint(freq_size.width), num_channels, num_of_scales};
46 ComplexMat kzf{uint(freq_size.height), uint(freq_size.width), num_of_scales};
50 std::future<void> async_res;
53 MatDynMem response{roi, CV_32FC(int(num_of_scales))};
56 // Stores value of responses, location of maximal response and response maps for each scale
57 std::vector<double> max_responses = std::vector<double>(num_of_scales);
58 std::vector<cv::Point2i> max_locs = std::vector<cv::Point2i>(num_of_scales);
59 std::vector<cv::Mat> response_maps = std::vector<cv::Mat>(num_of_scales);
62 double max_val, max_response;
67 #endif // SCALE_VARS_HPP