isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.37k stars 2.29k forks source link

TSDF for depth images only. #1061

Closed XuyangBai closed 4 years ago

XuyangBai commented 5 years ago

Hi, thanks for your sharing. I wonder is there any methods to do TSDF fusion using only a set of depth images? In this example http://www.open3d.org/docs/release/tutorial/Advanced/rgbd_integration.html you use RGBD images to integrate, but how about the situation when there is no color image ?

yxlao commented 5 years ago

TSDFVolumeColorType can be none, you can specify it at the TSDFVolume constructor. https://github.com/intel-isl/Open3D/blob/master/src/Open3D/Integration/TSDFVolume.h#L37.

Then, at integration, the input is a RGBDImage. We only set assign the depth image for the RGBDImage, leaving the color image empty.

XuyangBai commented 5 years ago

Hi, I have tried it, but at integration, I got the following error

[ScalableTSDFVolume::Integrate] Unsupported image format.

I have checked the input

Out[3]:  rgbd
RGBDImage of size 
Color image : 0x0, with 0 channels.
Depth image : 640x480, with 1 channels.
Use numpy.asarray to access buffer data.
www158 commented 4 years ago

@XuyangBai Hello, I am getting started with Open3D recently, and I encountered the same problem as you. Specifically, I want to use only depth images for Open3D reconstruction. I would like to ask if you changed the code on python or C++?Do you have any good ideas for reconstruction using only depth images?

XuyangBai commented 4 years ago

Hi @www158 I solved it by first setting the color_type to o3d.integration.TSDFVolumeColorType.__dict__['None'] and then using the depth image as the color image for the function o3d.geometry.create_rgbd_image_from_color_and_depth(It is tricky here, you just need to create an RGBDImage with the correct depth value, the color value will not be used in the integration)