Closed weiningwei closed 2 years ago
I extracted the RGB values at those pixels on the image (1100th frame of /cam0/segmentation
in city_day/3_high.bag
), and the RGB where slightly different from the one reported above.
I loaded the image using rosbag API to load the rosbag data on Python, converting the messages using CvBridge, and then manually selecting those pixels to extract the RGB values.
It would be helpful if you would share us how you checked the RGB values (which API, apps, or libraries).
First, I subscribe the img or segmentation topic to save the each frame segmentation resulut in some folder of computer. Then I use the python-opencv library to display it and read the rgb value. This is my python code for converting rosbag to jpg picture. read_bag_seg.txt
And this is my converting result of img and segmentation topic.
Try saving the images in png
, not jpg
.
Yes, saving as png solved the problem, thank you for your reply.
For example, in the 3_high sequence of city_day, the rgb values of keyboard pointer's pixel position are is 144, 234,243 ; 113,119,231; 98,202, 227 in the three following figures. And the figures are the segmentation results of /segmentation topic of bagfile. But I can't match the id in the rgbd_ids.txt file. .