Skip to content

Commit f35e0df

Browse files
WIP: Correction for naming convention
1 parent 07667a4 commit f35e0df

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

src/diffCheck/registration/registration.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
namespace diffCheck::registration
44
{
5-
open3d::pipelines::registration::RegistrationResult Registration::o3dFastGlobalRegistrationFeatureMatching(std::shared_ptr<geometry::DFPointCloud> source, std::shared_ptr<geometry::DFPointCloud> target)
5+
open3d::pipelines::registration::RegistrationResult Registration::O3DFastGlobalRegistrationFeatureMatching(std::shared_ptr<geometry::DFPointCloud> source, std::shared_ptr<geometry::DFPointCloud> target)
66
{
7-
auto sourceO3d = source->Cvt2O3DPointCloud();
8-
auto targetO3d = target->Cvt2O3DPointCloud();
7+
auto sourceO3D = source->Cvt2O3DPointCloud();
8+
auto targetO3D = target->Cvt2O3DPointCloud();
99

10-
sourceO3d->RandomDownSample(0.1);
11-
targetO3d->RandomDownSample(0.1);
10+
sourceO3D->RandomDownSample(0.1);
11+
targetO3D->RandomDownSample(0.1);
1212

13-
std::shared_ptr<open3d::pipelines::registration::Feature> sourceFPFHFeatures = open3d::pipelines::registration::ComputeFPFHFeature(*sourceO3d,
13+
std::shared_ptr<open3d::pipelines::registration::Feature> sourceFPFHFeatures = open3d::pipelines::registration::ComputeFPFHFeature(*sourceO3D,
1414
open3d::geometry::KDTreeSearchParamHybrid(0.25, 30));
15-
std::shared_ptr<open3d::pipelines::registration::Feature> targetFPFHFeatures = open3d::pipelines::registration::ComputeFPFHFeature(*targetO3d,
15+
std::shared_ptr<open3d::pipelines::registration::Feature> targetFPFHFeatures = open3d::pipelines::registration::ComputeFPFHFeature(*targetO3D,
1616
open3d::geometry::KDTreeSearchParamHybrid(0.25, 30));
1717
std::shared_ptr<open3d::pipelines::registration::FastGlobalRegistrationOption> option = std::make_shared<open3d::pipelines::registration::FastGlobalRegistrationOption>();
1818
option->maximum_correspondence_distance_ = 0.05;
1919
option->iteration_number_ = 100;
2020
option->maximum_tuple_count_ = 500;
2121

22-
auto result = open3d::pipelines::registration::FastGlobalRegistrationBasedOnFeatureMatching(*sourceO3d,
23-
*targetO3d,
22+
auto result = open3d::pipelines::registration::FastGlobalRegistrationBasedOnFeatureMatching(*sourceO3D,
23+
*targetO3D,
2424
*sourceFPFHFeatures,
2525
*targetFPFHFeatures,
2626
*option);

src/diffCheck/registration/registration.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ class Registration
99
{
1010
public:
1111

12-
open3d::pipelines::registration::RegistrationResult o3dFastGlobalRegistrationFeatureMatching(std::shared_ptr<geometry::DFPointCloud> source, std::shared_ptr<geometry::DFPointCloud> target);
12+
open3d::pipelines::registration::RegistrationResult O3DFastGlobalRegistrationFeatureMatching(std::shared_ptr<geometry::DFPointCloud> source, std::shared_ptr<geometry::DFPointCloud> target);
1313
};
1414
}

src/diffCheckApp.cc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,20 @@ int main()
2929
T(0, 3) = 1;
3030
T(1, 3) = 4;
3131

32-
std::shared_ptr<open3d::geometry::PointCloud> o3DPC = std::make_shared<open3d::geometry::PointCloud>(dfPointCloudPtr->Cvt2O3DPointCloud()->Transform(T));
33-
dfPointCloudPtrAfterTrans->Cvt2DFPointCloud(o3DPC);
32+
std::shared_ptr<open3d::geometry::PointCloud> o3DPointCloudAfterTrans = std::make_shared<open3d::geometry::PointCloud>(dfPointCloudPtr->Cvt2O3DPointCloud()->Transform(T));
33+
dfPointCloudPtrAfterTrans->Cvt2DFPointCloud(o3DPointCloudAfterTrans);
3434

3535
std::shared_ptr<diffCheck::registration::Registration> reg = std::make_shared<diffCheck::registration::Registration>();
36-
auto result = reg->o3dFastGlobalRegistrationFeatureMatching(dfPointCloudPtrAfterTrans, dfPointCloudPtr);
36+
auto result = reg->O3DFastGlobalRegistrationFeatureMatching(dfPointCloudPtrAfterTrans, dfPointCloudPtr);
3737

3838
// apply the transformation to the source point cloud
39-
Eigen::Matrix
40-
<double, 4, 4> transformation = result.transformation_;
41-
std::shared_ptr<open3d::geometry::PointCloud> o3DPCReg = std::make_shared<open3d::geometry::PointCloud>(dfPointCloudPtrAfterTrans->Cvt2O3DPointCloud()->Transform(transformation));
42-
dfPointCloudPtrAfterReg->Cvt2DFPointCloud(o3DPCReg);
39+
Eigen::Matrix<double, 4, 4> transformation = result.transformation_;
40+
std::shared_ptr<open3d::geometry::PointCloud> o3DPointCloudPtrAfterReg = std::make_shared<open3d::geometry::PointCloud>(dfPointCloudPtrAfterTrans->Cvt2O3DPointCloud()->Transform(transformation));
41+
dfPointCloudPtrAfterReg->Cvt2DFPointCloud(o3DPointCloudPtrAfterReg);
4342

4443

4544
std::shared_ptr<diffCheck::visualizer::Visualizer> vis = std::make_shared<diffCheck::visualizer::Visualizer>();
46-
//vis->AddPointCloud(dfPointCloudPtrAfterTrans);
45+
vis->AddPointCloud(dfPointCloudPtrAfterTrans);
4746
vis->AddPointCloud(dfPointCloudPtrAfterReg);
4847
vis->AddMesh(dfMeshPtr);
4948
vis->Run();

0 commit comments

Comments
 (0)