Skip to content

Commit 0ae7b1a

Browse files
authored
[BREAK] Changed lambda to lambda_penalty in orient_normals_consistent_tangent_plane. (#7096)
`lambda` is a reserved keyword in python and causes mypy to complain.
1 parent 3939430 commit 0ae7b1a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cpp/pybind/geometry/pointcloud.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void pybind_pointcloud_definitions(py::module &m) {
150150
&PointCloud::OrientNormalsConsistentTangentPlane,
151151
"Function to orient the normals with respect to consistent "
152152
"tangent planes",
153-
"k"_a, "lambda"_a = 0.0, "cos_alpha_tol"_a = 1.0)
153+
"k"_a, "lambda_penalty"_a = 0.0, "cos_alpha_tol"_a = 1.0)
154154
.def("compute_point_cloud_distance",
155155
&PointCloud::ComputePointCloudDistance,
156156
"For each point in the source point cloud, compute the "

cpp/pybind/t/geometry/pointcloud.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -331,17 +331,17 @@ infinite value. It also removes the corresponding attributes.
331331
pointcloud.def(
332332
"orient_normals_consistent_tangent_plane",
333333
&PointCloud::OrientNormalsConsistentTangentPlane, "k"_a,
334-
"lambda"_a = 0.0, "cos_alpha_tol"_a = 1.0,
334+
"lambda_penalty"_a = 0.0, "cos_alpha_tol"_a = 1.0,
335335
R"(Function to consistently orient the normals of a point cloud based on tangent planes.
336336
337337
The algorithm is described in Hoppe et al., "Surface Reconstruction from Unorganized Points", 1992.
338-
Additional information about the choice of lambda and cos_alpha_tol for complex
338+
Additional information about the choice of lambda_penalty and cos_alpha_tol for complex
339339
point clouds can be found in Piazza, Valentini, Varetti, "Mesh Reconstruction from Point Cloud", 2023
340340
(https://eugeniovaretti.github.io/meshreco/Piazza_Valentini_Varetti_MeshReconstructionFromPointCloud_2023.pdf).
341341
342342
Args:
343343
k (int): Number of neighbors to use for tangent plane estimation.
344-
lambda (float): A non-negative real parameter that influences the distance
344+
lambda_penalty (float): A non-negative real parameter that influences the distance
345345
metric used to identify the true neighbors of a point in complex
346346
geometries. It penalizes the distance between a point and the tangent
347347
plane defined by the reference point and its normal vector, helping to
@@ -354,7 +354,7 @@ point clouds can be found in Piazza, Valentini, Varetti, "Mesh Reconstruction fr
354354
Example:
355355
We use Bunny point cloud to compute its normals and orient them consistently.
356356
The initial reconstruction adheres to Hoppe's algorithm (raw), whereas the
357-
second reconstruction utilises the lambda and cos_alpha_tol parameters.
357+
second reconstruction utilises the lambda_penalty and cos_alpha_tol parameters.
358358
Due to the high density of the Bunny point cloud available in Open3D a larger
359359
value of the parameter k is employed to test the algorithm. Usually you do
360360
not have at disposal such a refined point clouds, thus you cannot find a
@@ -379,7 +379,7 @@ point clouds can be found in Piazza, Valentini, Varetti, "Mesh Reconstruction fr
379379
poisson_mesh.compute_vertex_normals()
380380
o3d.visualization.draw_geometries([poisson_mesh])
381381
382-
# Case 2, reconstruction using lambda and cos_alpha_tol parameters:
382+
# Case 2, reconstruction using lambda_penalty and cos_alpha_tol parameters:
383383
pcd_robust = o3d.io.read_point_cloud(data.path)
384384
385385
# Compute normals and orient them consistently, using k=100 neighbours

0 commit comments

Comments
 (0)