Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The color of dense pointcloud map is black and white #10

Closed
melodybinbin opened this issue Mar 19, 2017 · 9 comments
Closed

The color of dense pointcloud map is black and white #10

melodybinbin opened this issue Mar 19, 2017 · 9 comments

Comments

@melodybinbin
Copy link

Hello,Dr. Gao.My issue is as following.
After I build the ORB_SLAM2_modified,I execute the ./bin/rgbd_tum to run a dataset of TUM.However,the color of dense pointcloud map is black and white,without color information.
When I build the ORBSLAM2_with_pointcloud_map/ORB_SLAM2_modified/Examples/ROS/ORB_SLAM2,I execute the ORBSLAM2_with_pointcloud_map/ORB_SLAM2_modified/Examples/ROS/ORB_SLAM2/RGBD,
to run the device of kinect2 real time.
Similarly,there is no color of the dense pointcloud map.
I need some help,thanks.

@melodybinbin
Copy link
Author

And,what's the differences between the ORB_SLAM2_modified and the orbslam2_modified.zip?

@taochenshh
Copy link

taochenshh commented May 3, 2017

@melodybinbin Have you figured it out? I also saw that the point cloud has no cloud rendering. I modified some code, but did not succeed.

@gaoxiang12 Could you please help us with this issue? Thanks.

@gaoxiang12
Copy link
Owner

Thank you, please use the code in "ORB_SLAM2_modified/" directory, not the zipped file. It is an earlier version and I don't have time to clear it now.
About the problem that the viewer doesn't show point cloud's color, please check if ORB SLAM has converted the RGB images into grayscale ones. Check the reading parts in System.cc and Tracking.cc and if so, change those codes to make the point cloud can really read the color.

@taochenshh
Copy link

Thanks, that solved my problem.

@UThinkD
Copy link

UThinkD commented May 8, 2017

@CTTC I have met the same problem. The pointcloud has no color information. How you solve the problem? Can you give me a help?

@thornsu
Copy link

thornsu commented May 8, 2017

I have this problem too, I remember it's color in the past. But in that version, I must install g2o_with_orbslam2, it's in zipped file. I would not to install the past version because that g2o version is different with now.

@lizhihuit
Copy link

@CTTC I have met the same problem.The color of dense pointcloud map is black and white,without color information.Can you give me a help? Thankyou

@melodybinbin
Copy link
Author

melodybinbin commented Jun 20, 2017

As Dr. Gao said above, use the code in "ORB_SLAM2_modified/" directory, not the zipped file.
Firstly, declare mImRGB in Tracking.h as following:
Frame mCurrentFrame;
cv::Mat mImRGB;//declared
cv::Mat mImGray;
Secondly, modify the Tracking.cc as following:
Modified place 1:
cv::Mat Tracking::GrabImageRGBD(const cv::Mat &imRGB,const cv::Mat &imD, const double &timestamp)
{
mImRGB = imRGB;//Modified place 1
mImGray = imRGB;
......

Modified place 2:
mpPointCloudMapping->insertKeyFrame( pKF, this->mImGray, this->mImDepth );//change the mImGray to mImRGB as next row
mpPointCloudMapping->insertKeyFrame( pKF, this->mImRGB, this->mImDepth );//Modified place 2

Finally,execute build.sh and build_ros.sh to realize color dense pointcloud map with data sets and kinect v2 respectively.

@NeXT1995
Copy link

NeXT1995 commented Mar 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants