|
ReUseX
0.0.1
3D Point Cloud Processing for Building Reuse
|
Classes | |
| class | CellComplex |
| struct | MeshOptions |
| Options for mesh generation. More... | |
| class | Registry |
| class | SceneGraph |
| class | Solidifier |
| Solidifier solves room segmentation using Mixed Integer Programming. More... | |
Typedefs | |
| template<typename Scalar> | |
| using | Plane = Eigen::Matrix<Scalar, 4, 1> |
| template<typename Scalar> | |
| using | PlaneVector |
Functions | |
| pcl::PolygonMeshPtr | mesh (CloudConstPtr cloud, CloudNConstPtr normals, EigenVectorContainer< double, 4 > &planes, EigenVectorContainer< double, 3 > ¢roids, std::vector< IndicesPtr > &inliers, CloudLConstPtr rooms, MeshOptions const opt=MeshOptions{}, std::shared_ptr< ReUseX::visualize::Visualizer > viewer=nullptr) |
| Generate a mesh from point cloud and geometric primitives. | |
| template<typename Scalar, typename PointT> | |
| auto | regularizePlanes (PlaneVector< Scalar > &planes, typename pcl::PointCloud< PointT >::ConstPtr points, std::vector< pcl::IndicesPtr > &inliers, double angle_threshold=25.0, double distance_threshold=0.01) |
| auto | segment_planes_impl (CloudConstPtr cloud, CloudNConstPtr normals, const float angle_threshold, const float plane_dist_threshold, const int min_inliers, const float radius, const float interval_0, const float interval_factor, const bool visualize) -> std::tuple< CloudLPtr, CloudLocPtr, CloudNPtr > |
| BOOST_PARAMETER_FUNCTION ((std::tuple< CloudLPtr, CloudLocPtr, CloudNPtr >), segment_planes, tag,(required(cloud,(CloudConstPtr))(normals,(CloudNConstPtr)))(optional(angle_threshold,(float), 25.0)(plane_dist_threshold,(float), 0.07)(min_inliers,(int), 1000)(radius,(float), 0.5)(interval_0,(int), 16)(interval_factor,(float), 1.5)(visualize,(bool), false))) | |
| auto | segment_rooms_impl (CloudConstPtr cloud, CloudNConstPtr normals, CloudLConstPtr planes, const float grid_size, const float inflation, const float expansion, const float pruning_threshold, const float convergence_threshold, const int max_iter, const bool visualize) -> CloudLPtr |
| BOOST_PARAMETER_FUNCTION ((CloudLPtr), segment_rooms, tag,(required(cloud,(CloudConstPtr))(normals,(CloudNConstPtr))(planes,(CloudLConstPtr)))(optional(grid_size,(double), 0.5)(inflation,(double), 2.0)(expansion,(int), 2)(pruning_threshold,(double), 0.0001)(convergence_threshold,(double), 1e-8)(max_iter,(int), 100)(visualize,(bool), false))) | |
| pcl::TextureMesh::Ptr | texture_mesh_with_cloud (pcl::PolygonMesh::Ptr mesh, CloudConstPtr cloud) |
| pcl::TextureMesh::Ptr | texture_mesh (pcl::PolygonMesh::Ptr mesh, std::map< int, rtabmap::Transform > const &poses, std::map< int, rtabmap::Signature > const &nodes) |
| auto | dist_plane_point (const Eigen::Vector4d &plane, const Eigen::Vector3d &point) -> double |
| Calculate distance from a point to a plane. | |
| auto | make_pairs (EigenVectorContainer< double, 4 > &planes, std::vector< IndicesPtr > &inliers, EigenVectorContainer< double, 3 > ¢roids, const double threshold=0.6, const double new_plane_offset=0.5) -> std::vector< std::pair< size_t, size_t > > |
| Create pairs of opposite parallel planes. | |
| auto | force_orthogonal_planes (EigenVectorContainer< double, 4 > &planes, const double threshold=0.1, const Eigen::Matrix< double, 3, 1 > &up=Eigen::Matrix< double, 3, 1 >(0, 0, 1)) -> EigenVectorContainer< double, 4 > |
| Force planes to be orthogonal to a reference direction. | |
| auto | compute_number_of_inliers (CloudConstPtr cloud, Eigen::Vector4d const &plane, IndicesConstPtr indices, const float threshold=0.2) -> size_t |
| Count number of inliers for a plane. | |
| auto | merge_planes (EigenVectorContainer< double, 4 > const &planes_, std::vector< IndicesPtr > const &inliers_, EigenVectorContainer< double, 3 > const ¢roids_, CloudConstPtr cloud, const double angle_threshold=0.1, const double distance_threshold=0.5, const double min_overlap=0.8) -> std::tuple< EigenVectorContainer< double, 4 >, std::vector< IndicesPtr >, EigenVectorContainer< double, 3 > > |
| Merge similar planes based on angle, distance, and overlap. | |
| auto | separate_planes (const EigenVectorContainer< double, 4 > &planes, const Eigen::Vector3d &up=Eigen::Vector3d(0, 0, 1), const double epsilon=0.1) -> std::tuple< std::vector< size_t >, std::vector< size_t > > |
| Separate planes into horizontal and vertical based on up vector. | |
| template<typename CloudPtr> | |
| auto | compute_polygon_normal (const pcl::Vertices &poly, const CloudPtr &cloud) -> Eigen::Vector3f |
| Compute the normal vector of a polygon. | |
| using ReUseX::geometry::Plane = Eigen::Matrix<Scalar, 4, 1> |
Definition at line 74 of file regularization.hpp.
| using ReUseX::geometry::PlaneVector |
Definition at line 77 of file regularization.hpp.
| ReUseX::geometry::BOOST_PARAMETER_FUNCTION | ( | (CloudLPtr) | , |
| segment_rooms | , | ||
| tag | , | ||
| (required(cloud,(CloudConstPtr))(normals,(CloudNConstPtr))(planes,(CloudLConstPtr)))(optional(grid_size,(double), 0.5)(inflation,(double), 2.0)(expansion,(int), 2)(pruning_threshold,(double), 0.0001)(convergence_threshold,(double), 1e-8)(max_iter,(int), 100)(visualize,(bool), false)) | ) |
Definition at line 59 of file segment_rooms.hpp.
References BOOST_PARAMETER_FUNCTION(), and segment_rooms_impl().
| ReUseX::geometry::BOOST_PARAMETER_FUNCTION | ( | (std::tuple< CloudLPtr, CloudLocPtr, CloudNPtr >) | , |
| segment_planes | , | ||
| tag | , | ||
| (required(cloud,(CloudConstPtr))(normals,(CloudNConstPtr)))(optional(angle_threshold,(float), 25.0)(plane_dist_threshold,(float), 0.07)(min_inliers,(int), 1000)(radius,(float), 0.5)(interval_0,(int), 16)(interval_factor,(float), 1.5)(visualize,(bool), false)) | ) |
Definition at line 52 of file segment_planes.hpp.
References BOOST_PARAMETER_FUNCTION(), and segment_planes_impl().
Referenced by BOOST_PARAMETER_FUNCTION(), and BOOST_PARAMETER_FUNCTION().
| auto ReUseX::geometry::compute_number_of_inliers | ( | CloudConstPtr | cloud, |
| Eigen::Vector4d const & | plane, | ||
| IndicesConstPtr | indices, | ||
| const float | threshold = 0.2 ) -> size_t |
Count number of inliers for a plane.
| cloud | Input point cloud. |
| plane | Plane coefficients. |
| indices | Point indices to check. |
| threshold | Distance threshold for inliers. Default 0.2. |
| auto ReUseX::geometry::compute_polygon_normal | ( | const pcl::Vertices & | poly, |
| const CloudPtr & | cloud ) -> Eigen::Vector3f |
Compute the normal vector of a polygon.
Calculates the normal vector of a polygon using the cross product sum method (also known as Newell's method). The normal is automatically normalized.
| CloudPtr | Point cloud pointer type (const or non-const, e.g., CloudLocConstPtr). |
| poly | Polygon with vertex indices. |
| cloud | Point cloud containing the vertices (read-only). |
| std::invalid_argument | if polygon has fewer than 3 vertices. |
| std::runtime_error | if polygon is degenerate (zero normal magnitude). |
| auto ReUseX::geometry::dist_plane_point | ( | const Eigen::Vector4d & | plane, |
| const Eigen::Vector3d & | point ) -> double |
Calculate distance from a point to a plane.
| plane | Plane coefficients (nx, ny, nz, d) where n is the normal. |
| point | 3D point coordinates. |
| auto ReUseX::geometry::force_orthogonal_planes | ( | EigenVectorContainer< double, 4 > & | planes, |
| const double | threshold = 0.1, | ||
| const Eigen::Matrix< double, 3, 1 > & | up = Eigen::Matrix< double, 3, 1 >(0, 0, 1) ) -> EigenVectorContainer< double, 4 > |
Force planes to be orthogonal to a reference direction.
Adjusts plane normals to be either parallel or perpendicular to the up vector.
| planes | Plane coefficients to adjust. |
| threshold | Angular threshold for orthogonality. Default 0.1. |
| up | Reference up vector. Default (0, 0, 1). |
| auto ReUseX::geometry::make_pairs | ( | EigenVectorContainer< double, 4 > & | planes, |
| std::vector< IndicesPtr > & | inliers, | ||
| EigenVectorContainer< double, 3 > & | centroids, | ||
| const double | threshold = 0.6, | ||
| const double | new_plane_offset = 0.5 ) -> std::vector< std::pair< size_t, size_t > > |
Create pairs of opposite parallel planes.
Finds pairs of planes with opposite normals within a distance threshold. Creates new planes for unpaired planes.
| planes | Plane coefficients. |
| inliers | Indices of points belonging to each plane. |
| centroids | Plane centroids. |
| threshold | Maximum distance threshold for pairing. Default 0.6. |
| new_plane_offset | Offset for creating new planes. Default 0.5. |
| auto ReUseX::geometry::merge_planes | ( | EigenVectorContainer< double, 4 > const & | planes_, |
| std::vector< IndicesPtr > const & | inliers_, | ||
| EigenVectorContainer< double, 3 > const & | centroids_, | ||
| CloudConstPtr | cloud, | ||
| const double | angle_threshold = 0.1, | ||
| const double | distance_threshold = 0.5, | ||
| const double | min_overlap = 0.8 ) -> std::tuple< EigenVectorContainer< double, 4 >, std::vector< IndicesPtr >, EigenVectorContainer< double, 3 > > |
Merge similar planes based on angle, distance, and overlap.
| planes_ | Input plane coefficients. |
| inliers_ | Inliers for each plane. |
| centroids_ | Plane centroids. |
| cloud | Point cloud. |
| angle_threshold | Angular similarity threshold. Default 0.1. |
| distance_threshold | Distance threshold for merging. Default 0.5. |
| min_overlap | Minimum overlap ratio for merging. Default 0.8. |
| pcl::PolygonMeshPtr ReUseX::geometry::mesh | ( | CloudConstPtr | cloud, |
| CloudNConstPtr | normals, | ||
| EigenVectorContainer< double, 4 > & | planes, | ||
| EigenVectorContainer< double, 3 > & | centroids, | ||
| std::vector< IndicesPtr > & | inliers, | ||
| CloudLConstPtr | rooms, | ||
| MeshOptions const | opt = MeshOptions{}, | ||
| std::shared_ptr< ReUseX::visualize::Visualizer > | viewer = nullptr ) |
Generate a mesh from point cloud and geometric primitives.
| cloud | Input point cloud. |
| normals | Point cloud normals. |
| planes | Detected plane coefficients. |
| centroids | Plane centroids. |
| inliers | Indices of points belonging to each plane. |
| rooms | Room labels for points. |
| opt | Mesh generation options. |
| viewer | Optional visualizer for debugging. |
Referenced by texture_mesh(), and texture_mesh_with_cloud().
| auto ReUseX::geometry::regularizePlanes | ( | PlaneVector< Scalar > & | planes, |
| typename pcl::PointCloud< PointT >::ConstPtr | points, | ||
| std::vector< pcl::IndicesPtr > & | inliers, | ||
| double | angle_threshold = 25.0, | ||
| double | distance_threshold = 0.01 ) |
Definition at line 81 of file regularization.hpp.
| auto ReUseX::geometry::segment_planes_impl | ( | CloudConstPtr | cloud, |
| CloudNConstPtr | normals, | ||
| const float | angle_threshold, | ||
| const float | plane_dist_threshold, | ||
| const int | min_inliers, | ||
| const float | radius, | ||
| const float | interval_0, | ||
| const float | interval_factor, | ||
| const bool | visualize ) -> std::tuple< CloudLPtr, CloudLocPtr, CloudNPtr > |
Referenced by BOOST_PARAMETER_FUNCTION().
| auto ReUseX::geometry::segment_rooms_impl | ( | CloudConstPtr | cloud, |
| CloudNConstPtr | normals, | ||
| CloudLConstPtr | planes, | ||
| const float | grid_size, | ||
| const float | inflation, | ||
| const float | expansion, | ||
| const float | pruning_threshold, | ||
| const float | convergence_threshold, | ||
| const int | max_iter, | ||
| const bool | visualize ) -> CloudLPtr |
Referenced by BOOST_PARAMETER_FUNCTION().
| auto ReUseX::geometry::separate_planes | ( | const EigenVectorContainer< double, 4 > & | planes, |
| const Eigen::Vector3d & | up = Eigen::Vector3d(0, 0, 1), | ||
| const double | epsilon = 0.1 ) -> std::tuple< std::vector< size_t >, std::vector< size_t > > |
Separate planes into horizontal and vertical based on up vector.
| planes | Plane coefficients. |
| up | Reference up vector. Default (0, 0, 1). |
| epsilon | Angular epsilon for classification. Default 0.1. |
| pcl::TextureMesh::Ptr ReUseX::geometry::texture_mesh | ( | pcl::PolygonMesh::Ptr | mesh, |
| std::map< int, rtabmap::Transform > const & | poses, | ||
| std::map< int, rtabmap::Signature > const & | nodes ) |
References mesh().
| pcl::TextureMesh::Ptr ReUseX::geometry::texture_mesh_with_cloud | ( | pcl::PolygonMesh::Ptr | mesh, |
| CloudConstPtr | cloud ) |
References mesh().