ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
segment_planes.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/core/logging.hpp"
7#include "reusex/core/processing_observer.hpp"
8#include "reusex/io/reusex.hpp"
9#include "reusex/types.hpp"
10#include "reusex/utils/fmt_formatter.hpp"
11
12#include <fmt/format.h>
13#include <pcl/common/colors.h>
14#include <pcl/filters/filter.h>
15#include <pcl/io/auto_io.h>
16#include <pcl/io/pcd_io.h>
17#include <pcl/planar_region_growing.hpp>
18
19#include <atomic>
20
21namespace reusex::geometry {
22
24 IndicesConstPtr filter = nullptr; // Optional filter to limit processing
25
26 float angle_threshold = 25.0F;
27 float plane_dist_threshold = 0.07F;
28 int min_inliers = 1000;
29 float radius = 0.5F;
30 float interval_0 = 16.0F;
31 float interval_factor = 1.5F;
32
33 // Optional cancellation flag. Caller retains ownership and must keep this
34 // alive for the full duration of the segment_planes(...) call.
35 const std::atomic_bool *cancel_token = nullptr;
36};
37
39 const SegmentPlanesOptions &options)
40 -> std::tuple<CloudLPtr, CloudLocPtr, CloudNPtr>;
41
44 -> std::tuple<CloudLPtr, CloudLocPtr, CloudNPtr>;
45
46} // namespace reusex::geometry
auto segment_planes_impl(CloudConstPtr cloud, CloudNConstPtr normals, const SegmentPlanesOptions &options) -> std::tuple< CloudLPtr, CloudLocPtr, CloudNPtr >
auto segment_planes(CloudConstPtr cloud, CloudNConstPtr normals, const SegmentPlanesOptions &options=SegmentPlanesOptions{}) -> std::tuple< CloudLPtr, CloudLocPtr, CloudNPtr >
pcl::IndicesConstPtr IndicesConstPtr
Definition types.hpp:24
typename Cloud::ConstPtr CloudConstPtr
Definition types.hpp:28
typename CloudN::ConstPtr CloudNConstPtr
Definition types.hpp:32