16 namespace registration {
20 py::class_<utility::Feature, std::shared_ptr<utility::Feature>> feature(
21 m,
"Feature",
"Class to store featrues for registration.");
22 py::detail::bind_default_constructor<utility::Feature>(feature);
23 py::detail::bind_copy_functions<utility::Feature>(feature);
25 "Resize feature data buffer to ``dim x n``.")
27 "Returns feature dimensions per point.")
30 "Function to select features from input Feature group into "
31 "output Feature group.",
32 "indices"_a,
"invert"_a =
false)
34 "``dim x n`` float64 numpy array: Data buffer "
43 std::string(
"\nAccess its data via data member.");
48 {{
"dim",
"Feature dimension per point."},
49 {
"n",
"Number of points."}});
51 m,
"Feature",
"select_by_index",
52 {{
"indices",
"Indices of features to be selected."},
54 "Set to ``True`` to invert the selection of indices."}});
59 "Function to compute FPFH feature for a point cloud",
"input"_a,
60 "search_param"_a,
"indices"_a = py::none());
62 m,
"compute_fpfh_feature",
64 {
"input",
"The Input point cloud."},
65 {
"search_param",
"KDTree KNN search parameter."},
67 "Indices to select points for feature computation."},
70 m.def(
"correspondences_from_features",
72 "Function to find nearest neighbor correspondences from features",
73 "source_features"_a,
"target_features"_a,
"mutual_filter"_a =
false,
74 "mutual_consistency_ratio"_a = 0.1f);
76 m,
"correspondences_from_features",
77 {{
"source_features",
"The source features stored in (dim, N)."},
78 {
"target_features",
"The target features stored in (dim, M)."},
80 "filter correspondences and return the collection of (i, j) s.t. "
81 "source_features[i] and target_features[j] are mutually the "
83 {
"mutual_consistency_ratio",
84 "Threshold to decide whether the number of filtered "
85 "correspondences is sufficient. Only used when mutual_filter is "
Class to store featrues for registration.
std::shared_ptr< Feature > SelectByIndex(const std::vector< size_t > &indices, bool invert=false) const
Selects features from input Feature group, with indices in indices, and returns a new Feature group w...
size_t Dimension() const
Returns feature dimensions per point.
void Resize(int dim, int n)
size_t Num() const
Returns number of points.
Eigen::MatrixXd data_
Data buffer storing features.
void ClassMethodDocInject(py::module &pybind_module, const std::string &class_name, const std::string &function_name, const std::unordered_map< std::string, std::string > &map_parameter_body_docs)
void FunctionDocInject(py::module &pybind_module, const std::string &function_name, const std::unordered_map< std::string, std::string > &map_parameter_body_docs)
void pybind_feature(py::module &m)
void pybind_feature_methods(py::module &m)
std::shared_ptr< Feature > ComputeFPFHFeature(const ccPointCloud &input, const geometry::KDTreeSearchParam &search_param=geometry::KDTreeSearchParamKNN(), const utility::optional< std::vector< size_t >> &indices=utility::nullopt)
CorrespondenceSet CorrespondencesFromFeatures(const Feature &source_features, const Feature &target_features, bool mutual_filter=false, float mutual_consistency_ratio=0.1)
Function to find correspondences via 1-nearest neighbor feature matching. Target is used to construct...
Generic file read and write utility for python interface.
std::string to_string(const T &n)