Constructor
| 90 | |
| 91 | // Constructor |
| 92 | KCFTracker::KCFTracker(bool hog, bool fixed_window, bool multiscale, bool lab) |
| 93 | { |
| 94 | |
| 95 | // Parameters equal in all cases |
| 96 | lambda = 0.0001; |
| 97 | padding = 2.5; |
| 98 | //output_sigma_factor = 0.1; |
| 99 | output_sigma_factor = 0.125; |
| 100 | |
| 101 | |
| 102 | if (hog) { // HOG |
| 103 | // VOT |
| 104 | interp_factor = 0.012; |
| 105 | sigma = 0.6; |
| 106 | // TPAMI |
| 107 | //interp_factor = 0.02; |
| 108 | //sigma = 0.5; |
| 109 | cell_size = 4; |
| 110 | _hogfeatures = true; |
| 111 | |
| 112 | if (lab) { |
| 113 | interp_factor = 0.005; |
| 114 | sigma = 0.4; |
| 115 | //output_sigma_factor = 0.025; |
| 116 | output_sigma_factor = 0.1; |
| 117 | |
| 118 | _labfeatures = true; |
| 119 | _labCentroids = cv::Mat(nClusters, 3, CV_32FC1, &data); |
| 120 | cell_sizeQ = cell_size*cell_size; |
| 121 | } |
| 122 | else{ |
| 123 | _labfeatures = false; |
| 124 | } |
| 125 | } |
| 126 | else { // RAW |
| 127 | interp_factor = 0.075; |
| 128 | sigma = 0.2; |
| 129 | cell_size = 1; |
| 130 | _hogfeatures = false; |
| 131 | |
| 132 | if (lab) { |
| 133 | printf("Lab features are only used with HOG features.\n"); |
| 134 | _labfeatures = false; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | |
| 139 | if (multiscale) { // multiscale |
| 140 | template_size = 96; |
| 141 | //template_size = 100; |
| 142 | scale_step = 1.05; |
| 143 | scale_weight = 0.95; |
| 144 | if (!fixed_window) { |
| 145 | //printf("Multiscale does not support non-fixed window.\n"); |
| 146 | fixed_window = true; |
| 147 | } |
| 148 | } |
| 149 | else if (fixed_window) { // fit correction without multiscale |
nothing calls this directly
no outgoing calls
no test coverage detected