plane_fitting_ransac.h
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4
5#include <Eigen/Geometry>
6
7#include <pcl/PointIndices.h>
8#include <pcl/point_cloud.h>
9#include <pcl/point_types.h>
10
11// This header exposes minimal includes. For templates, include *.hpp.
12
13
14namespace Eigen
15{
16 using Hyperplane3f = Hyperplane<float, 3>;
17}
18
19namespace visionx::tools
20{
21
23 {
24 pcl::PointIndices::Ptr inliers;
25 Eigen::Hyperplane3f plane = Eigen::Hyperplane3f(Eigen::Vector3f::UnitZ(), 0);
26 };
27
28#define DECLARE_fitPlaneRansac_PointT(PointT) \
29 std::optional<PlaneFittingResult> fitPlaneRansac(pcl::PointCloud<PointT>::Ptr cloud, \
30 double distanceThreshold = 1.0, \
31 pcl::PointIndices::Ptr indices = nullptr)
32
33
38
39
40#undef DECLARE_fitPlaneRansac_PointT
41
42} // namespace visionx::tools
Hyperplane< float, 3 > Hyperplane3f
Definition Elements.h:34
#define DECLARE_fitPlaneRansac_PointT(PointT)