Skip to content

Commit

Permalink
Fix court div by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikonooooo committed Oct 25, 2023
1 parent 2817818 commit 6e88243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/processing/court.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ def _max_pixel_overlap(self, im_src: np.ndarray, pts_src: list, pts_dst=None):
"""
all_white = np.full_like(im_src, 255)
max_overlap = self._apply_gray_homography(all_white, pts_src, pts_dst=pts_dst)
return np.count_nonzero(max_overlap > 100)
return np.count_nonzero(max_overlap > 100) + 1

def _apply_bgr_homography(self, im_src: np.ndarray, pts_src: list):
"""
Expand Down

0 comments on commit 6e88243

Please sign in to comment.