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

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

Open
3 tasks done
qtn-mtp opened this issue Feb 5, 2025 · 0 comments
Open
3 tasks done
Labels

Comments

@qtn-mtp
Copy link

qtn-mtp commented Feb 5, 2025

Checklist

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).
Currently, it is possible to create a mesh with Marching Cube (MC)2 from a 3D discrete scalar field obtained with TSDF volume34.
In exemple, you proposed the following function :

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(). The problem is I don't know how to use it with a TSDFVoume with the proposed exemples in python doc of create_isosurface().
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

Footnotes

  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.

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

No branches or pull requests

1 participant