Skip to content

Commit

Permalink
fix: guard against no circles found
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed Feb 1, 2023
1 parent adb74e9 commit a4bb1ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions row.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ def export_circles_from_image(circles, out_dir, file_name, cv2_image, height, wi
Returns:
list: a list of cv2 images
"""
if circles is None:
logging.warning("No circles detected for %s", file_name)

return []

#: round the values to the nearest integer
circles = np.uint16(np.around(circles))

Expand Down

0 comments on commit a4bb1ce

Please sign in to comment.