ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
utils.hpp File Reference
#include <ReUseX/types.hpp>
#include <Eigen/Core>
#include <boost/functional/hash.hpp>
#include <pcl/ModelCoefficients.h>
#include <pcl/PolygonMesh.h>
#include <pcl/common/pca.h>
#include <range/v3/view/iota.hpp>
#include <range/v3/view/zip.hpp>
#include <spdlog/spdlog.h>
#include <stdexcept>
Include dependency graph for utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ReUseX
namespace  ReUseX::geometry

Functions

auto ReUseX::geometry::dist_plane_point (const Eigen::Vector4d &plane, const Eigen::Vector3d &point) -> double
 Calculate distance from a point to a plane.
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.
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.
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.
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.
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.
template<typename CloudPtr>
auto ReUseX::geometry::compute_polygon_normal (const pcl::Vertices &poly, const CloudPtr &cloud) -> Eigen::Vector3f
 Compute the normal vector of a polygon.