Warp MT::fine_test(Warp warp) { Rect2f rect = window(warp.t); float fine_cell = sqrt(rect.area() / cell_n); feature.set_cell(fine_cell); for (auto fine_step : fine_steps) { if (fine_step > 2.0f * fine_cell) continue; feature.set_step(fine_step); if (log != NULL) (*log) << "\tcell = " << fine_cell << " step = " << fine_step << endl; warp = Lucas_Kanade(warp); } return warp; }
Warp MT::fine_test(Warp warp) { ++number_MLK; rect_t rect = window(warp.t); float fine_cell = sqrt(rectArea(rect) / cell_n); feature.set_cell(fine_cell); //use different interpolation step to accelerate the convergence for (auto fine_step : fine_steps) { if (fine_step > 2.0f * fine_cell) continue; feature.set_step(fine_step); if (log != NULL) (*log) << "\tcell = " << fine_cell << " step = " << fine_step << " : "; warp = Lucas_Kanade(warp); } return warp; }