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

Changed lambda to lambda_penalty in orient_normals_consistent_tangent_plane #7096

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/pybind/geometry/pointcloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void pybind_pointcloud_definitions(py::module &m) {
&PointCloud::OrientNormalsConsistentTangentPlane,
"Function to orient the normals with respect to consistent "
"tangent planes",
"k"_a, "lambda"_a = 0.0, "cos_alpha_tol"_a = 1.0)
"k"_a, "lambda_penalty"_a = 0.0, "cos_alpha_tol"_a = 1.0)
.def("compute_point_cloud_distance",
&PointCloud::ComputePointCloudDistance,
"For each point in the source point cloud, compute the "
Expand Down
10 changes: 5 additions & 5 deletions cpp/pybind/t/geometry/pointcloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,17 @@ infinite value. It also removes the corresponding attributes.
pointcloud.def(
"orient_normals_consistent_tangent_plane",
&PointCloud::OrientNormalsConsistentTangentPlane, "k"_a,
"lambda"_a = 0.0, "cos_alpha_tol"_a = 1.0,
"lambda_penalty"_a = 0.0, "cos_alpha_tol"_a = 1.0,
R"(Function to consistently orient the normals of a point cloud based on tangent planes.

The algorithm is described in Hoppe et al., "Surface Reconstruction from Unorganized Points", 1992.
Additional information about the choice of lambda and cos_alpha_tol for complex
Additional information about the choice of lambda_penalty and cos_alpha_tol for complex
point clouds can be found in Piazza, Valentini, Varetti, "Mesh Reconstruction from Point Cloud", 2023
(https://eugeniovaretti.github.io/meshreco/Piazza_Valentini_Varetti_MeshReconstructionFromPointCloud_2023.pdf).

Args:
k (int): Number of neighbors to use for tangent plane estimation.
lambda (float): A non-negative real parameter that influences the distance
lambda_penalty (float): A non-negative real parameter that influences the distance
metric used to identify the true neighbors of a point in complex
geometries. It penalizes the distance between a point and the tangent
plane defined by the reference point and its normal vector, helping to
Expand All @@ -354,7 +354,7 @@ point clouds can be found in Piazza, Valentini, Varetti, "Mesh Reconstruction fr
Example:
We use Bunny point cloud to compute its normals and orient them consistently.
The initial reconstruction adheres to Hoppe's algorithm (raw), whereas the
second reconstruction utilises the lambda and cos_alpha_tol parameters.
second reconstruction utilises the lambda_penalty and cos_alpha_tol parameters.
Due to the high density of the Bunny point cloud available in Open3D a larger
value of the parameter k is employed to test the algorithm. Usually you do
not have at disposal such a refined point clouds, thus you cannot find a
Expand All @@ -379,7 +379,7 @@ point clouds can be found in Piazza, Valentini, Varetti, "Mesh Reconstruction fr
poisson_mesh.compute_vertex_normals()
o3d.visualization.draw_geometries([poisson_mesh])

# Case 2, reconstruction using lambda and cos_alpha_tol parameters:
# Case 2, reconstruction using lambda_penalty and cos_alpha_tol parameters:
pcd_robust = o3d.io.read_point_cloud(data.path)

# Compute normals and orient them consistently, using k=100 neighbours
Expand Down
Loading