40 class PinholeCameraIntrinsic;
55 void Clear()
override;
56 bool IsEmpty()
const override;
57 Eigen::Vector3d GetMinBound()
const override;
58 Eigen::Vector3d GetMaxBound()
const override;
59 PointCloud &Transform(
const Eigen::Matrix4d &transformation)
override;
60 PointCloud &Translate(
const Eigen::Vector3d &translation)
override;
61 PointCloud &Scale(
const double scale,
bool center =
true)
override;
62 PointCloud &Rotate(
const Eigen::Vector3d &rotation,
71 bool HasPoints()
const {
return points_.size() > 0; }
74 return points_.size() > 0 && normals_.size() == points_.size();
78 return points_.size() > 0 && colors_.size() == points_.size();
82 for (
size_t i = 0; i < normals_.size(); i++) {
83 normals_[i].normalize();
89 colors_.resize(points_.size());
90 for (
size_t i = 0; i < points_.size(); i++) {
111 const Eigen::Matrix4d &extrinsic = Eigen::Matrix4d::Identity(),
112 double depth_scale = 1000.0,
113 double depth_trunc = 1000.0,
122 const Eigen::Matrix4d &extrinsic = Eigen::Matrix4d::Identity());
128 const std::vector<size_t> &indices,
129 bool invert =
false);
140 std::tuple<std::shared_ptr<PointCloud>, Eigen::MatrixXi>
143 const Eigen::Vector3d &min_bound,
144 const Eigen::Vector3d &max_bound,
145 bool approximate_class =
false);
150 size_t every_k_points);
156 const Eigen::Vector3d &min_bound,
157 const Eigen::Vector3d &max_bound);
161 std::tuple<std::shared_ptr<PointCloud>, std::vector<size_t>>
164 double search_radius);
168 std::tuple<std::shared_ptr<PointCloud>, std::vector<size_t>>
187 const Eigen::Vector3d &orientation_reference = Eigen::Vector3d(0.0,
196 const Eigen::Vector3d &camera_location = Eigen::Vector3d::Zero());
Definition: Geometry.h:32
std::shared_ptr< TriangleMesh > ComputePointCloudConvexHull(const PointCloud &input)
Function that computes the convex hull of the point cloud using qhull.
Definition: PointCloud.cpp:276
void NormalizeNormals()
Definition: PointCloud.h:81
std::tuple< std::shared_ptr< PointCloud >, std::vector< size_t > > RemoveRadiusOutliers(const PointCloud &input, size_t nb_points, double search_radius)
Definition: DownSample.cpp:397
std::shared_ptr< PointCloud > CreatePointCloudFromDepthImage(const Image &depth, const camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic=Eigen::Matrix4d::Identity(), double depth_scale=1000.0, double depth_trunc=1000.0, int stride=1)
Definition: PointCloudFactory.cpp:120
std::tuple< std::shared_ptr< PointCloud >, Eigen::MatrixXi > VoxelDownSampleAndTrace(const PointCloud &input, double voxel_size, const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound, bool approximate_class)
Definition: DownSample.cpp:293
Definition: PinholeCameraIntrinsic.h:42
Definition: PointCloud.h:49
bool HasPoints() const
Definition: PointCloud.h:71
RotationType
Definition: Geometry3D.h:40
std::vector< Eigen::Vector3d > points_
Definition: PointCloud.h:96
PointCloud()
Definition: PointCloud.h:51
std::shared_ptr< PointCloud > SelectDownSample(const PointCloud &input, const std::vector< size_t > &indices, bool invert)
Definition: DownSample.cpp:144
std::vector< Eigen::Vector3d > colors_
Definition: PointCloud.h:98
std::shared_ptr< PointCloud > CreatePointCloudFromRGBDImage(const RGBDImage &image, const camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic=Eigen::Matrix4d::Identity())
Definition: PointCloudFactory.cpp:143
bool OrientNormalsTowardsCameraLocation(PointCloud &cloud, const Eigen::Vector3d &camera_location)
Definition: EstimateNormals.cpp:181
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputePointCloudMeanAndCovariance(const PointCloud &input)
Definition: PointCloud.cpp:200
Definition: Geometry3D.h:38
Definition: KDTreeSearchParam.h:32
Definition: RGBDImage.h:38
std::vector< double > ComputePointCloudMahalanobisDistance(const PointCloud &input)
Definition: PointCloud.cpp:237
char type
Definition: FilePCD.cpp:56
std::vector< Eigen::Vector3d > normals_
Definition: PointCloud.h:97
bool HasNormals() const
Definition: PointCloud.h:73
bool OrientNormalsToAlignWithDirection(PointCloud &cloud, const Eigen::Vector3d &orientation_reference)
Definition: EstimateNormals.cpp:159
Definition: PinholeCameraIntrinsic.cpp:34
~PointCloud() override
Definition: PointCloud.h:52
std::shared_ptr< PointCloud > UniformDownSample(const PointCloud &input, size_t every_k_points)
Definition: DownSample.cpp:362
GeometryType
Definition: Geometry.h:34
bool HasColors() const
Definition: PointCloud.h:77
std::shared_ptr< PointCloud > CropPointCloud(const PointCloud &input, const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound)
Definition: DownSample.cpp:375
void PaintUniformColor(const Eigen::Vector3d &color)
Assigns each point in the PointCloud the same color.
Definition: PointCloud.h:88
Definition: KDTreeSearchParam.h:53
std::vector< double > ComputePointCloudNearestNeighborDistance(const PointCloud &input)
Definition: PointCloud.cpp:254
bool EstimateNormals(PointCloud &cloud, const KDTreeSearchParam &search_param)
Definition: EstimateNormals.cpp:121
std::vector< double > ComputePointCloudToPointCloudDistance(const PointCloud &source, const PointCloud &target)
Definition: PointCloud.cpp:177
std::shared_ptr< PointCloud > VoxelDownSample(const PointCloud &input, double voxel_size)
Definition: DownSample.cpp:247
std::tuple< std::shared_ptr< PointCloud >, std::vector< size_t > > RemoveStatisticalOutliers(const PointCloud &input, size_t nb_neighbors, double std_ratio)
Definition: DownSample.cpp:430