output image format: 'bgr' to 'rgb'
This commit is contained in:
parent
fe7d966dcc
commit
d6976281e3
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ class ObjectDetection(Node):
|
|||
if len(self.image_det) == 0:
|
||||
return
|
||||
# The 'cv2_to_imgmsg' method converts an OpenCV image to a ROS 2 image message
|
||||
msg = self.br.cv2_to_imgmsg(self.image_det, encoding="bgr8")
|
||||
msg = self.br.cv2_to_imgmsg(self.image_det, encoding="rgb8")
|
||||
# Publish the message.
|
||||
self._pubI.publish(msg)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue