ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
accuracy_metrics.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6#include "reusex/types/point_types.hpp"
7
8#include <cstddef>
9#include <string>
10
11namespace reusex::geometry {
12
16 float threshold = 0.05f;
19 float gt_voxel = 0.01f;
20};
21
42 std::size_t cloud_points = 0;
43 std::size_t gt_points = 0;
44
45 double accuracy_mean = 0.0;
46 double accuracy_median = 0.0;
47
48 double completeness_mean = 0.0;
49 double completeness_median = 0.0;
50
51 double chamfer = 0.0;
52
53 double precision = 0.0;
54 double recall = 0.0;
55 double fscore = 0.0;
56
57 float threshold = 0.05f;
58
59 [[nodiscard]] std::string to_json(int indent = 2) const;
60};
61
71 const AccuracyMetricsOptions &opt = {});
72
73} // namespace reusex::geometry
AccuracyReport compute_accuracy(const Cloud &cloud, const CloudLoc &gt, const AccuracyMetricsOptions &opt={})
Score a reconstructed cloud against a ground-truth point cloud.
pcl::PointCloud< PointT > Cloud
pcl::PointCloud< LocT > CloudLoc
Options for ground-truth accuracy scoring.
float threshold
Inlier distance threshold for precision/recall/F-score [m].
float gt_voxel
Voxel leaf size used to downsample the ground-truth cloud before scoring [m].
Ground-truth accuracy report for a reconstructed point cloud.
double accuracy_mean
mean recon->GT distance [m]
std::size_t gt_points
finite (post-downsample) GT points scored
double precision
fraction of recon points within threshold
double completeness_median
median GT->recon distance [m]
double accuracy_median
median recon->GT distance [m]
std::string to_json(int indent=2) const
double recall
fraction of GT points within threshold
float threshold
inlier threshold used [m]
std::size_t cloud_points
finite reconstruction points scored
double completeness_mean
mean GT->recon distance [m]
double chamfer
(accuracy_mean + completeness_mean) / 2 [m]