ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
quality_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.hpp"
7
8#include <Eigen/Core>
9
10#include <cstdint>
11#include <string>
12#include <vector>
13
14namespace reusex::geometry {
15
18 uint32_t label = 0;
19 std::size_t point_count = 0;
20 double rms = 0.0;
21 double p90 = 0.0;
22 Eigen::Vector3d normal = Eigen::Vector3d::Zero();
23 Eigen::Vector3d centroid = Eigen::Vector3d::Zero();
24};
25
38 std::size_t total_points = 0;
39 std::size_t labeled_points = 0;
40 std::vector<PlaneQuality> planes;
41
42 double flatness_rms = 0.0;
43 double flatness_rms_max = 0.0;
44 double thickness_p90 = 0.0;
45
46 [[nodiscard]] std::string to_json(int indent = 2) const;
47};
48
51 std::size_t min_points = 100;
52};
53
62QualityReport compute_plane_quality(const Cloud &cloud, const CloudL &labels,
63 const QualityMetricsOptions &options = {});
64
65} // namespace reusex::geometry
QualityReport compute_plane_quality(const Cloud &cloud, const CloudL &labels, const QualityMetricsOptions &options={})
Compute per-plane flatness/thickness quality metrics.
pcl::PointCloud< PointT > Cloud
pcl::PointCloud< LabelT > CloudL
Quality statistics for a single detected plane.
double rms
RMS point-to-plane residual [m].
double p90
90th percentile of |residual| [m]
std::size_t min_points
Planes supported by fewer points are excluded from the report.
Ground-truth-free reconstruction quality report.
std::size_t labeled_points
points with plane label > 0
std::vector< PlaneQuality > planes
std::string to_json(int indent=2) const
double flatness_rms
point-weighted mean of per-plane RMS [m]
double flatness_rms_max
worst per-plane RMS [m]
double thickness_p90
point-weighted mean of per-plane p90 [m]