Skip to content

Commit

Permalink
Visalizing segmented images
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguelmelon committed May 27, 2024
1 parent 1d01bca commit 29d79a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions people_tracking_v2/scripts/yolo_seg.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def __init__(self):

self.image_sub = rospy.Subscriber("/Webcam/image_raw", Image, self.image_callback)
self.segmented_images_pub = rospy.Publisher("/segmented_images", SegmentedImages, queue_size=10)
self.individual_segmented_image_pub = rospy.Publisher("/individual_segmented_images", Image, queue_size=10)
self.bounding_box_image_pub = rospy.Publisher("/bounding_box_image", Image, queue_size=10)
self.detection_pub = rospy.Publisher("/hero/predicted_detections", DetectionArray, queue_size=10)

Expand Down Expand Up @@ -121,6 +122,9 @@ def image_callback(self, data):
segmented_image_msg = self.bridge.cv2_to_imgmsg(segmented_image, "bgr8")
segmented_images_msg.images.append(segmented_image_msg)

# Publish individual segmented images
self.individual_segmented_image_pub.publish(segmented_image_msg)

# Publish segmented images as a batch
self.segmented_images_pub.publish(segmented_images_msg)

Expand Down

0 comments on commit 29d79a1

Please sign in to comment.