From b2ee49f062d5cc68a65a68f790a5778fa1c955a4 Mon Sep 17 00:00:00 2001 From: meng-cheng shih <67384645+mcshih@users.noreply.github.com> Date: Tue, 31 Jan 2023 22:29:09 +0800 Subject: [PATCH] fix the calculation of sampling points --- offset_visualization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offset_visualization.py b/offset_visualization.py index 42e1881..cfb7215 100644 --- a/offset_visualization.py +++ b/offset_visualization.py @@ -82,8 +82,8 @@ def plot_offsets(img, save_output, roi_x, roi_y): sampling_x = sampling_x[roi_y, roi_x] for y, x in zip(sampling_y, sampling_x): - y = round(y) - x = round(x) + y = round(y + resize_factor_h/2) + x = round(x + resize_factor_w/2) cv2.circle(img, center=(x, y), color=(0, 0, 255), radius=1, thickness=-1)