Skip to content

Commit a82a4c3

Browse files
committed
Merge branch 'distance_calculation_visualisation' of https://github.com/diffCheckOrg/diffCheck into distance_calculation_visualisation
2 parents 6de1af6 + b7607dc commit a82a4c3

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/diffCheck/geometry/DFPointCloud.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,6 @@ namespace diffCheck::geometry
116116
return cilantroPointCloud;
117117
}
118118

119-
std::vector<double> DFPointCloud::ComputeP2PDistance(std::shared_ptr<geometry::DFPointCloud> target)
120-
{
121-
std::vector<double> errors;
122-
auto O3DSourcePointCloud = this->Cvt2O3DPointCloud();
123-
auto O3DTargetPointCloud = target->Cvt2O3DPointCloud();
124-
125-
std::vector<double> distances;
126-
127-
distances = O3DSourcePointCloud->ComputePointCloudDistance(*O3DTargetPointCloud);
128-
return distances;
129-
}
130-
131119
std::vector<Eigen::Vector3d> DFPointCloud::ComputeBoundingBox()
132120
{
133121
auto O3DPointCloud = this->Cvt2O3DPointCloud();
@@ -273,6 +261,18 @@ namespace diffCheck::geometry
273261
this->Normals = cloud->Normals;
274262
}
275263

264+
std::vector<double> DFPointCloud::ComputeDistance(std::shared_ptr<geometry::DFPointCloud> target)
265+
{
266+
std::vector<double> errors;
267+
auto O3DSourcePointCloud = this->Cvt2O3DPointCloud();
268+
auto O3DTargetPointCloud = target->Cvt2O3DPointCloud();
269+
270+
std::vector<double> distances;
271+
272+
distances = O3DSourcePointCloud->ComputePointCloudDistance(*O3DTargetPointCloud);
273+
return distances;
274+
}
275+
276276
Eigen::Vector3d DFPointCloud::GetCenterPoint()
277277
{
278278
if (this->Points.size() == 0)

src/diffCheck/geometry/DFPointCloud.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ namespace diffCheck::geometry
154154
*
155155
* @see https://github.com/isl-org/Open3D/blob/main/cpp/open3d/geometry/PointCloud.cpp
156156
*/
157-
std::vector<double> ComputeDistance(const DFPointCloud &targetCloud);
157+
std::vector<double> ComputeDistance(std::shared_ptr<DFPointCloud> target);
158158

159159
public: ///< Getters
160160
/// @brief Number of points in the point cloud

src/diffCheck/registrations/DFGlobalRegistrations.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace diffCheck::registrations
1717

1818
std::shared_ptr<geometry::DFPointCloud> dfPointCloudPtrAfterTrans = std::make_shared<geometry::DFPointCloud>();
1919
dfPointCloudPtrAfterTrans->Cvt2DFPointCloud(o3DPointCloudAfterTrans);
20-
std::vector<double> registrationErrors = dfPointCloudPtrAfterTrans->ComputeDistance(*target);
20+
std::vector<double> registrationErrors = dfPointCloudPtrAfterTrans->ComputeDistance(target);
2121
errors.push_back(std::accumulate(registrationErrors.begin(), registrationErrors.end(), 0.0) / registrationErrors.size());
2222
}
2323
return errors;

0 commit comments

Comments
 (0)