Skip to content

Commit c5ac147

Browse files
committed
fix rgb images
1 parent c90c7a3 commit c5ac147

File tree

1 file changed

+2
-1
lines changed
  • formant_ros2_adapter/scripts

1 file changed

+2
-1
lines changed

formant_ros2_adapter/scripts/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676

7777
from geometry_msgs.msg import (
7878
Point,
79+
PointStamped,
7980
Point32,
8081
Polygon,
8182
Pose,
@@ -1001,7 +1002,7 @@ def handle_ros2_message(self, msg, subscriber_config):
10011002

10021003
elif msg_type == Image:
10031004
# Convert Image to a Formant image
1004-
cv_image = self.cv_bridge.imgmsg_to_cv2(msg, "passthrough")
1005+
cv_image = self.cv_bridge.imgmsg_to_cv2(msg, "bgr8")
10051006
encoded_image = cv2.imencode(".jpg", cv_image)[1].tobytes()
10061007

10071008
self.fclient.post_image(

0 commit comments

Comments
 (0)