Open3D (C++ API)  0.18.0+5c982c7
Feature.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <Eigen/Core>
11 #include <memory>
12 #include <vector>
13 
15 
16 namespace open3d {
17 
18 namespace geometry {
19 class PointCloud;
20 }
21 
22 namespace pipelines {
23 namespace registration {
24 
25 typedef std::vector<Eigen::Vector2i> CorrespondenceSet;
26 
30 class Feature {
31 public:
36  void Resize(int dim, int n) {
37  data_.resize(dim, n);
38  data_.setZero();
39  }
41  size_t Dimension() const { return data_.rows(); }
43  size_t Num() const { return data_.cols(); }
44 
45 public:
47  Eigen::MatrixXd data_;
48 };
49 
54 std::shared_ptr<Feature> ComputeFPFHFeature(
55  const geometry::PointCloud &input,
56  const geometry::KDTreeSearchParam &search_param =
58 
76  const Feature &source_features,
77  const Feature &target_features,
78  bool mutual_filter = false,
79  float mutual_consistency_ratio = 0.1);
80 
81 } // namespace registration
82 } // namespace pipelines
83 } // namespace open3d
Base class for KDTree search parameters.
Definition: KDTreeSearchParam.h:16
KDTree search parameters for pure KNN search.
Definition: KDTreeSearchParam.h:44
A point cloud consists of point coordinates, and optionally point colors and point normals.
Definition: PointCloud.h:36
Class to store featrues for registration.
Definition: Feature.h:30
size_t Num() const
Returns number of points.
Definition: Feature.h:43
Eigen::MatrixXd data_
Data buffer storing features.
Definition: Feature.h:47
size_t Dimension() const
Returns feature dimensions per point.
Definition: Feature.h:41
void Resize(int dim, int n)
Definition: Feature.h:36
CorrespondenceSet CorrespondencesFromFeatures(const Feature &source_features, const Feature &target_features, bool mutual_filter, float mutual_consistent_ratio)
Function to find correspondences via 1-nearest neighbor feature matching. Target is used to construct...
Definition: Feature.cpp:142
std::shared_ptr< Feature > ComputeFPFHFeature(const geometry::PointCloud &input, const geometry::KDTreeSearchParam &search_param)
Definition: Feature.cpp:94
std::vector< Eigen::Vector2i > CorrespondenceSet
Definition: Feature.h:25
Definition: PinholeCameraIntrinsic.cpp:16