kminoda / VIODE

VIODE: A Simulated Dataset to Address the Challenges of Visual-Inertial Odometry in Dynamic Environments
92 stars 9 forks source link

can't find the matching id in the rgb_ids.txt fot the rgbd value #11

Closed weiningwei closed 2 years ago

weiningwei commented 2 years ago

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. 1669327872 309276595 532633000 .

kminoda commented 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).

スクリーンショット 2021-10-26 11 30 27 スクリーンショット 2021-10-26 11 30 47 スクリーンショット 2021-10-26 11 30 36

weiningwei commented 2 years ago

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. 1597198422 754440546-raw 1597198422 754440546-seg

kminoda commented 2 years ago

Try saving the images in png, not jpg.

weiningwei commented 2 years ago

Yes, saving as png solved the problem, thank you for your reply.