tello-ros2 icon indicating copy to clipboard operation
tello-ros2 copied to clipboard

Images sent are encoded to bgr8 but are actually rgb8

Open TSoli opened this issue 9 months ago • 0 comments

The image messages sent claim the images are bgr8 but in my testing it seems they are actually rgb8. The line where the message is sent is here. To test this you could add

cv2.imshow(frame)
cv2.waitKey(1)

before sending the message and you will see that the blue and red channels appear flipped in the display. cv2 expects a BGR image so this means the images sent over UDP are actually RGB. To fix this either add

frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)

before converting the image to an image message or change the encoding on this line to "rgb8".

TSoli avatar May 03 '24 01:05 TSoli