ultralytics 8.2.89 Increased line_counter Solutions accuracy (#16033)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Muhammad Rizwan Munawar 2024-09-06 20:34:34 +05:00 committed by GitHub
parent c2b647a768
commit a2993108e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 54 deletions

View file

@ -501,6 +501,10 @@ class Annotator:
"""
cv2.polylines(self.im, [np.array(reg_pts, dtype=np.int32)], isClosed=True, color=color, thickness=thickness)
# Draw small circles at the corner points
for point in reg_pts:
cv2.circle(self.im, (point[0], point[1]), thickness * 2, color, -1) # -1 fills the circle
def draw_centroid_and_tracks(self, track, color=(255, 0, 255), track_thickness=2):
"""
Draw centroid point and track trails.