Skip to content

Commit

Permalink
nonzero indexing was already taking the first element
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Johnson committed Nov 18, 2024
1 parent 9b1a613 commit 7fb66be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/vsi/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def find_template_offset(template: np.floating, image: np.floating,
y_peak = y_peak[0]
x_peak = x_peak[0]

y_offset = y_peak[0] - template.shape[0] + 1
x_offset = x_peak[0] - template.shape[1] + 1
y_offset = y_peak - template.shape[0] + 1
x_offset = x_peak - template.shape[1] + 1

if debug_dir:
visualize_cross_correlation(debug_dir, template, image, xc,
Expand Down

0 comments on commit 7fb66be

Please sign in to comment.