if (m_use_subpixel_localization)
new_location = sub_pixel_peak(max_response_pt, max_response_map);
+ p_pose.cx += p_current_scale*p_cell_size*new_location.x;
+ p_pose.cy += p_current_scale*p_cell_size*new_location.y;
+ if (p_pose.cx < 0) p_pose.cx = 0;
+ if (p_pose.cx > img.cols-1) p_pose.cx = img.cols-1;
+ if (p_pose.cy < 0) p_pose.cy = 0;
+ if (p_pose.cy > img.rows-1) p_pose.cy = img.rows-1;
+
//sub grid scale interpolation
double new_scale = p_scales[scale_index];
if (m_use_subgrid_scale)
if (p_current_scale > p_min_max_scale[1])
p_current_scale = p_min_max_scale[1];
- p_pose.cx += p_cell_size*new_location.x;
- p_pose.cy += p_cell_size*new_location.y;
- if (p_pose.cx < 0) p_pose.cx = 0;
- if (p_pose.cx > img.cols-1) p_pose.cx = img.cols-1;
- if (p_pose.cy < 0) p_pose.cy = 0;
- if (p_pose.cy > img.rows-1) p_pose.cy = img.rows-1;
-
//obtain a subwindow for training at newly estimated target position
patch_feat = get_features(input_rgb, input_gray, p_pose.cx, p_pose.cy, p_windows_size[0], p_windows_size[1], p_current_scale);
ComplexMat xf = fft2(patch_feat, p_cos_window);