Repository navigation
Expose Poisson reconstruction parameters - #7430
Conversation
Expose 5 important parameters in CreateFromPointCloudPoisson that were previously hardcoded: - full_depth: Minimum depth for density estimation (default: 5) - samples_per_node: Minimum sample points per octree node (default: 1.5) - point_weight: Point interpolation weight (default: 4.0) - confidence: Normal confidence weighting exponent (default: 0.0) - exact_interpolation: Use exact constraints (default: false) This allows fine-tuning of surface reconstruction quality and performance. All parameters have sensible defaults matching previous behavior. Fully backward compatible. Fixes isl-org#7248
|
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
8250778 to
e8337ab
Compare
|
@ssheorey |
There was a problem hiding this comment.
Pull request overview
Exposes additional Poisson surface reconstruction parameters in TriangleMesh.create_from_point_cloud_poisson across C++ and Python, enabling advanced users to fine-tune reconstruction quality/performance while keeping prior defaults.
Changes:
- Extended C++ API signature and internal Poisson
Executeplumbing to acceptfull_depth,samples_per_node,point_weight,confidence, andexact_interpolation. - Updated Python bindings to expose the new keyword arguments with backward-compatible defaults.
- Added Python tests and a changelog entry for the new parameters.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| python/test/geometry/test_poisson_parameters.py | Adds pytest coverage for new Poisson parameters and backward compatibility. |
| cpp/pybind/geometry/trianglemesh.cpp | Exposes new Poisson parameters to Python via pybind defaults/kwargs. |
| cpp/open3d/geometry/TriangleMesh.h | Extends the public C++ API signature and Doxygen docs for Poisson parameters. |
| cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp | Threads new parameters from public API into Poisson execution path. |
| CHANGELOG.md | Documents the newly exposed Poisson parameters. |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @Chevi-Koren thanks for submitting this useful enhancement! Please also add documentation for these parameters (C++ and Python), from the point of view of "what are they, and what is the effect of changing them from the default value?" Also, do we need all of them? We don't want to increase complexity of using Open3D unless its necessary. Or does fiddling with them help in common situations? |
|
Hi @ssheorey, thanks for the feedback! I've addressed both of your points:
I've added comprehensive documentation for all parameters explaining what they do, how they affect reconstruction, and when to adjust them. Each parameter now includes:
For example: /// \param point_weight Importance of point interpolation constraints
/// (default: 4.0). Controls the trade-off between data fidelity and surface
/// smoothness. Higher values (e.g., 10.0) prioritize fitting input points
/// exactly, resulting in surfaces closer to the data. Lower values produce
/// smoother surfaces. Recommended range: 2.0-10.0.
2. API Simplification
Following your concern about complexity, I've reduced the API to expose only 3 essential parameters:
point_weight - Most important and most requested. Users commonly need to adjust this for better data fidelity.
samples_per_node - Very useful for noise control. Common use case: noisy scans need higher values (2-3) to suppress artifacts.
full_depth - Helps with sparse regions. Useful but less critical.
I removed 2 advanced parameters:
confidence - Only relevant for confidence-weighted normals (rare use case)
exact_interpolation - Computationally expensive, rarely needed in practice
This keeps the API simple while exposing the parameters that help in common situations.
Additional Changes
Fixed all code review feedback from Copilot AI
Applied code style formatting (note: some files in this commit were automatically formatted by check_style.py)
Added deterministic random seed to tests for reproducibility
All changes remain fully backward compatible |
ssheorey
left a comment
There was a problem hiding this comment.
Can you run make apply-style please?
- Expose full_depth, samples_per_node, and point_weight parameters - Add comprehensive documentation for each parameter - Add unit tests for parameter validation - Fully backward compatible with default values - All style checks applied Fixes isl-org#7430
7041d31 to
fcf9ab8
Compare
|
@ssheorey Done! I've run I removed all unrelated files that were accidentally included:
The PR now contains only the 6 files directly related to this feature:
Question: The style checker modified many other files (formatting changes in files like |
|
@Chevi-Koren ensure you are using the style checker SW versions from |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove unreachable exact_interpolation code path (if false block) - Update comment to clarify confidence and exact_interpolation were removed - Simplify code to only use approximate interpolation Addresses code review feedback from @ssheorey and Copilot AI
|
@ssheorey Fixed! Removed the dead code branch and reverted to the single approximate interpolation path, as in the original code. |
benjaminum
left a comment
There was a problem hiding this comment.
Looks good! Thanks @Chevi-Koren !
|
Hi @Chevi-Koren can you please fix the CI errors? e.g.: The build failure occurs in cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp at line 682: error: use of undeclared identifier 'datax'; did you mean 'atan'? |
|
@ssheorey Hi! Yes, fixed. The datax parameter was missing - I've added: The value 32.f matches PoissonRecon's default. |
|
@Chevi-Koren still getting CI errors. Does it work on your local machine? |
Clang-format TriangleMesh.h docs; use DEFAULT_FEM_DEGREE in Poisson FEM signature (fixes -Werror on macOS). Match SYCL wheel release upload to open3d_xpu*.whl via update_release.sh. Co-authored-by: Cursor <cursoragent@cursor.com>
Use update_release.sh with open3d*.whl so open3d_xpu-*.whl is uploaded; open3d-*.whl matched nothing and failed main SYCL wheel jobs. Co-authored-by: Cursor <cursoragent@cursor.com>
Random synthetic points can segfault PoissonRecon during ARM64 wheel pytest; use stable geometry with estimated normals instead. Co-authored-by: Cursor <cursoragent@cursor.com>
Use n_threads=1 in Python Poisson smoke tests (same threading workaround as cpp/tests/geometry/TriangleMesh.cpp on Apple). Apply yapf formatting. Co-authored-by: Cursor <cursoragent@cursor.com>
Expose Poisson reconstruction parameters #7430
Expose 3 important parameters in
CreateFromPointCloudPoissonthat were previously hardcoded:This allows fine-tuning of surface reconstruction quality and performance. All parameters have sensible defaults matching previous behavior. Fully backward compatible.
The exposed parameters are intended for users who require fine-grained control over Poisson reconstruction behavior while keeping the API simple and focused.
Fixes #7248
Type
Motivation and Context
Users currently cannot fine-tune the Poisson surface reconstruction algorithm because important parameters are hardcoded in the internal
Executefunction. This limitation was raised in issue #7248, where users requested the ability to adjust parameters likepoint_weight,samples_per_node, andfull_depthto optimize reconstruction quality for their specific use cases.This PR exposes 3 key parameters that significantly affect reconstruction quality and performance, while maintaining full backward compatibility through sensible default values that match the previous hardcoded behavior.
Checklist
python util/check_style.py --applyto apply Open3D code style to my code.Description
Changes Made
This PR modifies the
CreateFromPointCloudPoissonAPI to expose 3 parameters that were previously hardcoded:full_depth(default: 5)samples_per_node(default: 1.5)point_weight(default: 4.0)2.0 * FEM_DEGREE(whereFEM_DEGREE = 2).Files Modified
cpp/open3d/geometry/TriangleMesh.h: Updated function signature with new parameters and comprehensive Doxygen documentation.cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp: ModifiedExecuteandCreateFromPointCloudPoissonto accept and pass through the new parameters.cpp/pybind/geometry/trianglemesh.cpp: Exposed new parameters to Python API with corresponding default values.Backward Compatibility
β Fully backward compatible β all existing code will continue to work without modifications. The new parameters have default values that exactly match the previous hardcoded behavior.
Example β existing code still works:
New code β can now fine-tune: