Skip to content

Commit

Permalink
cv2.Mat replaced by np.array
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Sep 1, 2023
1 parent f07833e commit bbd7cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yolov8_ros/yolov8_ros/debug_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self) -> None:
(image_sub, detections_sub), 10, 0.5)
self._synchronizer.registerCallback(self.detections_cb)

def draw_box(self, cv_image: cv2.Mat, detection: Detection, color: Tuple[int]) -> cv2.Mat:
def draw_box(self, cv_image: np.array, detection: Detection, color: Tuple[int]) -> np.array:

# get detection info
label = detection.class_name
Expand All @@ -88,7 +88,7 @@ def draw_box(self, cv_image: cv2.Mat, detection: Detection, color: Tuple[int]) -

return cv_image

def draw_mask(self, cv_image: cv2.Mat, detection: Detection, color: Tuple[int]) -> cv2.Mat:
def draw_mask(self, cv_image: np.array, detection: Detection, color: Tuple[int]) -> np.array:

mask_msg = detection.mask
mask_array = np.array([[int(ele.x), int(ele.y)]
Expand All @@ -102,7 +102,7 @@ def draw_mask(self, cv_image: cv2.Mat, detection: Detection, color: Tuple[int])
color=color, thickness=2, lineType=cv2.LINE_AA)
return cv_image

def draw_keypoints(self, cv_image: cv2.Mat, detection: Detection) -> cv2.Mat:
def draw_keypoints(self, cv_image: np.array, detection: Detection) -> np.array:

keypoints_msg = detection.keypoints

Expand Down

0 comments on commit bbd7cb9

Please sign in to comment.