Skip to content

add create_from_sparse_indices for VoxelGrid - #7327

Open
GouMinghao wants to merge 3 commits into
isl-org:mainfrom
GouMinghao:main
Open

add create_from_sparse_indices for VoxelGrid#7327
GouMinghao wants to merge 3 commits into
isl-org:mainfrom
GouMinghao:main

Conversation

@GouMinghao

Copy link
Copy Markdown

add create_from_sparse_indices for VoxelGrid

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Motivation: I need to create voxel grid given sparse 3d indices but found it is not implemented.
It is implmented in this PR

Checklist:

  • [ x] I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

add create_from_sparse_indices for VoxelGrid
the result of my added python test is given in the image below
2025-08-15 23-39-13屏幕截图

@update-docs

update-docs Bot commented Aug 15, 2025

Copy link
Copy Markdown

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@GouMinghao

Copy link
Copy Markdown
Author

@syncle @griegler Could you please help review this pr

@ssheorey ssheorey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @GouMinghao thanks for submitting this PR! Does this function meet your needs?

CreateFromPointCloud()

https://github.com/isl-org/Open3D/pull/7327/files#diff-b9c67bc5c7b93513cdea4082d98482283a4ea17ad487a5cc60e0298d9994c15cL197-L209

You can first create a point cloud from the indices (these will be the coordinates of the point cloud) and the colors, and then use this function.

@ssheorey ssheorey added the status / needs info Waiting for information from reporter / author label Sep 2, 2025
@GouMinghao

Copy link
Copy Markdown
Author

Hi @GouMinghao thanks for submitting this PR! Does this function meet your needs?

CreateFromPointCloud()

https://github.com/isl-org/Open3D/pull/7327/files#diff-b9c67bc5c7b93513cdea4082d98482283a4ea17ad487a5cc60e0298d9994c15cL197-L209

You can first create a point cloud from the indices (these will be the coordinates of the point cloud) and the colors, and then use this function.

Thank you for your reply, but I believe you suggestion does the job in some indirect way and sacrifices performance

So it would be better to do it in the direct way as it is very important and common in OCC visualization

@GouMinghao

Copy link
Copy Markdown
Author

@ssheorey Could please have a look on this pr again, thanks!

@ssheorey

Copy link
Copy Markdown
Member

@GouMinghao please post performance comparison for the two approaches if you believe your approach is significantly faster than the existing method. Use a reasonable sized point cloud (say 1M-5M points).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status / needs info Waiting for information from reporter / author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants