lsd_slam icon indicating copy to clipboard operation
lsd_slam copied to clipboard

RGB Pointcloud

Open alexanderkoumis opened this issue 8 years ago • 6 comments

Hello, I am interested in retrieving RGB values from the keyframe somehow. I'm wondering if there is a debug option that I'm missing considering InputPointDense's color array of size 4. From what I can tell in the source it looks like RGB/RGBA images are converted to grayscale and are not used further, so I'm doubtful this has been implemented.

Not being too familiar with the system's internals, I'm wondering if every time buildImage is called to create the depth image there is some corresponding grayscale image kept in memory that is used to produce the intensity value at that point. My thought is that if this is so, a corresponding data structure of RGB images could be maintained and polled at this point instead in order to produce a colored point.

If this is not the case, another idea is to use TUM's DVO SLAM to generate the colored pointclouds, using the depth map generated by LSD SLAM in a new ROS message to simulate a RGB-D camera (I'm guessing this would require enabling LSD SLAM's option to regenerate the pointcloud for every image?).

alexanderkoumis avatar Aug 22 '15 07:08 alexanderkoumis

Working on modifications in fork:

https://github.com/alexanderkoumis/lsd_slam/tree/rgb-pointcloud

alexanderkoumis avatar Aug 23 '15 01:08 alexanderkoumis

Well done @alexanderkoumis , it is a good work worth following. In https://github.com/alexanderkoumis/lsd_slam/tree/rgb-pointcloud In your initial modification, I see some changes such as to append some pointer to rgbImage. As the final output is RGB point cloud. I think the Output3DWrapper should also be modified.

Best~ Milton

amiltonwong avatar Aug 23 '15 02:08 amiltonwong

@amiltonwong thanks, have pushed completed modifications, point cloud looks pretty cool: cloud

alexanderkoumis avatar Aug 23 '15 17:08 alexanderkoumis

Great work, @alexanderkoumis . I had tried it and it works well. One more thing may need to do similar modification for package lsd_slam_viewer if one wants to save the mono point cloud into RGB point cloud

amiltonwong avatar Aug 24 '15 13:08 amiltonwong

For anyone that may be interested, I had a difficult time getting @alexanderkoumis RGB Pointcloud working on Ubuntu 16.04. For this reason, I've pushed a modified repository. Also added some additional code to output the live pointcloud frame to a publisher topic on ROS.

omarabid59 avatar Sep 08 '18 00:09 omarabid59

@omarabid59 if all is well, could you please open a PR and push the changes to Kevin George's repo? That way we can all have RGB pointclouds by cloning 1 repository :)

bespoke-code avatar Sep 09 '18 12:09 bespoke-code