isl-org / isl-org/Open3D

In RGBD integration, use TSDF + Flying Edges instead of TSDF + Marching Cube

Open
#7,160 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [x] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [x] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [x] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).

### My Question

I would like to know if there is a way (and if there is an advantage in this context) to use Flying Edges (FE)[^1] in RGBD integration (see [tuto Open3D](https://www.open3d.org/docs/release/tutorial/pipelines/rgbd_integration.html)).
Currently, it is possible to create a mesh with Marching Cube (MC)[^2] from a 3D discrete scalar field obtained with TSDF volume[^3][^4].
In exemple, you proposed the following function :
```python
def integrate_rgb_frames_for_fragment(color_files, depth_files, fragment_id,
n_fragments, pose_graph_name, intrinsic,
config):
pose_graph = o3d.io.read_pose_graph(pose_graph_name)
volume = o3d.pipelines.integration.ScalableTSDFVolume(
voxel_length=config["tsdf_cubic_size"] / 512.0,
sdf_trunc=0.04,
color_type=o3d.pipelines.integration.TSDFVolumeColorType.RGB8)
for i in range(len(pose_graph.nodes)):
i_abs = fragment_id * config['n_frames_per_fragment'] + i
print(
"Fragment %03d / %03d :: integrate rgbd frame %d (%d of %d)." %
(fragment_id, n_fragments - 1, i_abs, i + 1, len(pose_graph.nodes)))
rgbd = read_rgbd_image(color_files[i_abs], depth_files[i_abs], False,
config)
pose = pose_graph.nodes[i].pose
volume.integrate(rgbd, intrinsic, np.linalg.inv(pose))
mesh = volume.extract_triangle_mesh() # <-- Call Marching Cube, so how to replace with Flying Edges
mesh.compute_vertex_normals()
return mesh
```
I checked C++ documentation related to FE and the only function I found is [CreateIsoSurface()](https://www.open3d.org/docs/latest/cpp_api/classopen3d_1_1t_1_1geometry_1_1_triangle_mesh.html#a8dea2ac382a8f55efd3afecf67bca235). The problem is I don't know how to use it with a TSDFVoume with the proposed exemples in python doc of [create_isosurface()](https://www.open3d.org/docs/latest/python_api/open3d.t.geometry.TriangleMesh.html#open3d.t.geometry.TriangleMesh.create_isosurfaces).
Thanks in advance :)

PS: For curious, here is an article of Will Schroeder and Spiros Tsalikisfrom Kitware VTK which makes comparison between MC and FE : [Really fast isocontouring](https://www.kitware.com/really-fast-isocontouring/)

[^1]: Schroeder, William, Rob Maynard, and Berk Geveci. "Flying edges: A high-performance scalable isocontouring algorithm." 2015 IEEE 5th Symposium on Large Data Analysis and Visualization (LDAV). IEEE, 2015.
[^2]: Lorensen, William E., and Harvey E. Cline. "Marching cubes: A high resolution 3D surface construction algorithm." Seminal graphics: pioneering efforts that shaped the field. 1998. 347-353.
[^3]: Curless, Brian, and Marc Levoy. "A volumetric method for building complex models from range images." Proceedings of the 23rd annual conference on Computer graphics and interactive techniques. 1996.
[^4]: Newcombe, Richard A., et al. "Kinectfusion: Real-time dense surface mapping and tracking." 2011 10th IEEE international symposium on mixed and augmented reality. Ieee, 2011.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.