mirror of https://github.com/koide3/small_gicp.git
return processed point cloud
This commit is contained in:
parent
2c5e9e6092
commit
b39b96dbc8
|
|
@ -107,7 +107,7 @@ void define_preprocess(py::module& m) {
|
||||||
// estimate_normals
|
// estimate_normals
|
||||||
m.def(
|
m.def(
|
||||||
"estimate_normals",
|
"estimate_normals",
|
||||||
[](PointCloud::Ptr points, std::shared_ptr<KdTree<PointCloud>> tree, int num_neighbors, int num_threads) {
|
[](PointCloud::Ptr points, std::shared_ptr<KdTree<PointCloud>> tree, int num_neighbors, int num_threads) -> std::shared_ptr<PointCloud> {
|
||||||
if (tree == nullptr) {
|
if (tree == nullptr) {
|
||||||
tree = std::make_shared<KdTree<PointCloud>>(points, KdTreeBuilderOMP(num_threads));
|
tree = std::make_shared<KdTree<PointCloud>>(points, KdTreeBuilderOMP(num_threads));
|
||||||
}
|
}
|
||||||
|
|
@ -117,6 +117,8 @@ void define_preprocess(py::module& m) {
|
||||||
} else {
|
} else {
|
||||||
estimate_normals_omp(*points, *tree, num_neighbors, num_threads);
|
estimate_normals_omp(*points, *tree, num_neighbors, num_threads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return points;
|
||||||
},
|
},
|
||||||
py::arg("points"),
|
py::arg("points"),
|
||||||
py::arg("tree") = nullptr,
|
py::arg("tree") = nullptr,
|
||||||
|
|
@ -141,7 +143,7 @@ void define_preprocess(py::module& m) {
|
||||||
// estimate_covariances
|
// estimate_covariances
|
||||||
m.def(
|
m.def(
|
||||||
"estimate_covariances",
|
"estimate_covariances",
|
||||||
[](PointCloud::Ptr points, std::shared_ptr<KdTree<PointCloud>> tree, int num_neighbors, int num_threads) {
|
[](PointCloud::Ptr points, std::shared_ptr<KdTree<PointCloud>> tree, int num_neighbors, int num_threads) -> std::shared_ptr<PointCloud> {
|
||||||
if (tree == nullptr) {
|
if (tree == nullptr) {
|
||||||
tree = std::make_shared<KdTree<PointCloud>>(points, KdTreeBuilderOMP(num_threads));
|
tree = std::make_shared<KdTree<PointCloud>>(points, KdTreeBuilderOMP(num_threads));
|
||||||
}
|
}
|
||||||
|
|
@ -151,6 +153,8 @@ void define_preprocess(py::module& m) {
|
||||||
} else {
|
} else {
|
||||||
estimate_covariances_omp(*points, *tree, num_neighbors, num_threads);
|
estimate_covariances_omp(*points, *tree, num_neighbors, num_threads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return points;
|
||||||
},
|
},
|
||||||
py::arg("points"),
|
py::arg("points"),
|
||||||
py::arg("tree") = nullptr,
|
py::arg("tree") = nullptr,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue