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;
37 cv::Size freq_size = Fft::freq_size(roi);
41 std::future<void> async_res;
44 KCF_Tracker::GaussianCorrelation gaussian_correlation{roi, num_of_scales, num_channels};
46 #if defined(CUFFT) || defined(FFTW) // TODO: Why this ifdef?
47 MatDynMem in_all{roi.height * int(num_of_scales), roi.width, CV_32F};
49 MatDynMem in_all{roi, CV_32F};
51 MatDynMem fw_all{roi.height * int(num_channels), roi.width, CV_32F};
52 MatDynMem ifft2_res{roi, CV_32FC(int(num_channels))};
53 MatDynMem response{roi, CV_32FC(int(num_of_scales))};
55 ComplexMat zf{uint(freq_size.height), uint(freq_size.width), num_channels, num_of_scales};
56 ComplexMat kzf{uint(freq_size.height), uint(freq_size.width), num_of_scales};
58 // Variables used during non big batch mode and in big batch mode with ThreadCtx in p_threadctxs in kcf on zero index.
60 double max_val, max_response;
63 // Stores value of responses, location of maximal response and response maps for each scale
64 std::vector<double> max_responses = std::vector<double>(num_of_scales);
65 std::vector<cv::Point2i> max_locs = std::vector<cv::Point2i>(num_of_scales);
66 std::vector<cv::Mat> response_maps = std::vector<cv::Mat>(num_of_scales);
72 #endif // SCALE_VARS_HPP