Skip to content

Commit

Permalink
Tidy up bounding box generation
Browse files Browse the repository at this point in the history
  • Loading branch information
shardros committed May 13, 2024
1 parent 3e9dd59 commit 5bbf10a
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions robot/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,15 @@ def _draw_bounding_box(self, frame, detections):
integer_corners = detection.corners.astype(np.int32)

if (marker_info.owning_team == self.zone):
cv2.polylines(frame,
[integer_corners],
polygon_is_closed,
colour,
thickness=self._bounding_box_thickness*3)
bounding_box_thickness = self._bounding_box_thickness*3
else:
cv2.polylines(frame,
[integer_corners],
polygon_is_closed,
colour,
thickness=self._bounding_box_thickness)
bounding_box_thickness = self._bounding_box_thickness

cv2.polylines(frame,
[integer_corners],
polygon_is_closed,
colour,
thickness=bounding_box_thickness)

return frame

Expand Down

0 comments on commit 5bbf10a

Please sign in to comment.