Skip to content

Commit b452984

Browse files
committed
Improves Symmetric ICP estimation
Improves the Symmetric ICP estimation by making minor adjustments to variable declarations for better code clarity. The change also includes a cleanup in the header file by removing a redundant public access modifier.
1 parent 02720e1 commit b452984

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

cpp/open3d/pipelines/registration/SymmetricICP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Eigen::Matrix4d TransformationEstimationSymmetric::ComputeTransformation(
5454
const Eigen::Vector3d &vt = target.points_[corres[i][1]];
5555
const Eigen::Vector3d &ns = source.normals_[corres[i][0]];
5656
const Eigen::Vector3d &nt = target.normals_[corres[i][1]];
57-
Eigen::Vector3d d = vs - vt;
57+
const Eigen::Vector3d d = vs - vt;
5858

5959
J_r.resize(2);
6060
r.resize(2);

cpp/open3d/pipelines/registration/SymmetricICP.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class TransformationEstimationSymmetric : public TransformationEstimation {
5252
const geometry::PointCloud &target,
5353
double max_correspondence_distance) const override;
5454

55-
public:
5655
/// shared_ptr to an Abstract RobustKernel that could mutate at runtime.
5756
std::shared_ptr<RobustKernel> kernel_ = std::make_shared<L2Loss>();
5857

cpp/tests/pipelines/registration/SymmetricICP.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ TEST(SymmetricICP, TransformationEstimationSymmetricComputeRMSE) {
3030
geometry::PointCloud source;
3131
geometry::PointCloud target;
3232

33-
// Create simple test point clouds with normals
3433
source.points_ = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}};
3534
source.normals_ = {{0, 0, 1}, {0, 0, 1}, {0, 0, 1}};
3635

@@ -60,7 +59,6 @@ TEST(SymmetricICP, TransformationEstimationSymmetricComputeRMSENoNormals) {
6059

6160
source.points_ = {{0, 0, 0}, {1, 0, 0}};
6261
target.points_ = {{0.1, 0.1, 0.1}, {1.1, 0.1, 0.1}};
63-
// No normals
6462

6563
registration::CorrespondenceSet corres = {{0, 0}, {1, 1}};
6664
registration::TransformationEstimationSymmetric estimation;

0 commit comments

Comments
 (0)