Skip to content

Commit 6da8b98

Browse files
WIP: extent bindings for segmentation and GetCenterPoint method
1 parent b1a74b7 commit 6da8b98

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/diffCheckBindings.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ PYBIND11_MODULE(diffcheck_bindings, m) {
4444
.def("get_num_points", &diffCheck::geometry::DFPointCloud::GetNumPoints)
4545
.def("get_num_colors", &diffCheck::geometry::DFPointCloud::GetNumColors)
4646
.def("get_num_normals", &diffCheck::geometry::DFPointCloud::GetNumNormals)
47+
.def("get_center_point", &diffCheck::geometry::DFPointCloud::GetCenterPoint)
4748

4849
.def("has_points", &diffCheck::geometry::DFPointCloud::HasPoints)
4950
.def("has_colors", &diffCheck::geometry::DFPointCloud::HasColors)
@@ -150,4 +151,17 @@ PYBIND11_MODULE(diffcheck_bindings, m) {
150151
py::arg("max_iteration") = 30,
151152
py::arg("relative_fitness") = 1e-6,
152153
py::arg("relative_rmse") = 1e-6);
154+
155+
//#################################################################################################
156+
// dfb_segmentation namespace
157+
//#################################################################################################
158+
159+
py::module_ submodule_segmentation = m.def_submodule("dfb_segmentation", "A submodule for the `semantic` segmentation methods.");
160+
161+
py::class_<diffCheck::segmentation::DFSegmentation>(submodule_segmentation, "DFSegmentation")
162+
.def_static("segmentation_point_cloud", &diffCheck::segmentation::DFSegmentation::SegmentationPointCloud,
163+
py::arg("point_cloud"),
164+
py::arg("voxel_size") = 1,
165+
py::arg("normal_threshold_degree") = 20,
166+
py::arg("min_cluster_size") = 10);
153167
}

0 commit comments

Comments
 (0)