41 class PinholeCameraIntrinsic;
71 Eigen::Vector3d
GetCenter()
const override;
74 bool robust =
false)
const override;
77 bool relative =
true)
override;
79 const Eigen::Vector3d ¢er)
override;
81 const Eigen::Vector3d ¢er)
override;
106 for (
size_t i = 0; i <
normals_.size(); i++) {
128 bool remove_infinite =
true);
138 const std::vector<size_t> &indices,
bool invert =
false)
const;
157 std::tuple<std::shared_ptr<PointCloud>,
159 std::vector<std::vector<int>>>
161 const Eigen::Vector3d &min_bound,
162 const Eigen::Vector3d &max_bound,
163 bool approximate_class =
false)
const;
206 std::tuple<std::shared_ptr<PointCloud>, std::vector<size_t>>
208 double search_radius,
209 bool print_progress =
false)
const;
216 std::tuple<std::shared_ptr<PointCloud>, std::vector<size_t>>
219 bool print_progress =
false)
const;
233 bool fast_normal_computation =
true);
240 const Eigen::Vector3d &orientation_reference =
241 Eigen::Vector3d(0.0, 0.0, 1.0));
248 const Eigen::Vector3d &camera_location = Eigen::Vector3d::Zero());
308 std::tuple<std::shared_ptr<TriangleMesh>, std::vector<size_t>>
320 std::tuple<std::shared_ptr<TriangleMesh>, std::vector<size_t>>
322 const double radius)
const;
337 bool print_progress =
false)
const;
351 std::tuple<Eigen::Vector4d, std::vector<size_t>>
SegmentPlane(
352 const double distance_threshold = 0.01,
353 const int ransac_n = 3,
354 const int num_iterations = 100,
379 const Eigen::Matrix4d &extrinsic = Eigen::Matrix4d::Identity(),
380 double depth_scale = 1000.0,
381 double depth_trunc = 1000.0,
383 bool project_valid_depth_only =
true);
404 const Eigen::Matrix4d &extrinsic = Eigen::Matrix4d::Identity(),
405 bool project_valid_depth_only =
true);
std::shared_ptr< core::Tensor > image
Definition: FilamentRenderer.cpp:228
math::float4 color
Definition: LineSetBuffers.cpp:64
size_t stride
Definition: TriangleMeshBuffers.cpp:184
Contains the pinhole camera intrinsic parameters.
Definition: PinholeCameraIntrinsic.h:51
A bounding box that is aligned along the coordinate axes.
Definition: BoundingVolume.h:155
The base geometry class for 3D geometries.
Definition: Geometry3D.h:47
void ResizeAndPaintUniformColor(std::vector< Eigen::Vector3d > &colors, const size_t size, const Eigen::Vector3d &color) const
Resizes the colors vector and paints a uniform color.
Definition: Geometry3D.cpp:75
The base geometry class.
Definition: Geometry.h:37
GeometryType
Specifies possible geometry types.
Definition: Geometry.h:42
The Image class stores image with customizable width, height, num of channels and bytes per channel.
Definition: Image.h:53
Base class for KDTree search parameters.
Definition: KDTreeSearchParam.h:35
KDTree search parameters for pure KNN search.
Definition: KDTreeSearchParam.h:63
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:44
A point cloud consists of point coordinates, and optionally point colors and point normals.
Definition: PointCloud.h:55
std::vector< Eigen::Vector3d > colors_
RGB colors of points.
Definition: PointCloud.h:422
PointCloud & PaintUniformColor(const Eigen::Vector3d &color)
Definition: PointCloud.h:115
std::vector< Eigen::Matrix3d > covariances_
Covariance Matrix for each point.
Definition: PointCloud.h:424
void EstimateNormals(const KDTreeSearchParam &search_param=KDTreeSearchParamKNN(), bool fast_normal_computation=true)
Function to compute the normals of a point cloud.
Definition: EstimateNormals.cpp:307
AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Returns an axis-aligned bounding box of the geometry.
Definition: PointCloud.cpp:66
PointCloud & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
Definition: PointCloud.cpp:81
static std::vector< Eigen::Matrix3d > EstimatePerPointCovariances(const PointCloud &input, const KDTreeSearchParam &search_param=KDTreeSearchParamKNN())
Static function to compute the covariance matrix for each point of a point cloud. Doesn't change the ...
Definition: PointCloud.cpp:594
Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
Definition: PointCloud.cpp:64
std::vector< double > ComputeMahalanobisDistance() const
Function to compute the Mahalanobis distance for points in an input point cloud.
Definition: PointCloud.cpp:636
std::vector< double > ComputePointCloudDistance(const PointCloud &target)
Function to compute the point to point distances between point clouds.
Definition: PointCloud.cpp:139
std::vector< int > ClusterDBSCAN(double eps, size_t min_points, bool print_progress=false) const
Cluster PointCloud using the DBSCAN algorithm Ester et al., "A Density-Based Algorithm for Discoverin...
Definition: PointCloudCluster.cpp:39
PointCloud operator+(const PointCloud &cloud) const
Definition: PointCloud.cpp:135
std::tuple< std::shared_ptr< TriangleMesh >, std::vector< size_t > > HiddenPointRemoval(const Eigen::Vector3d &camera_location, const double radius) const
This is an implementation of the Hidden Point Removal operator described in Katz et....
Definition: PointCloud.cpp:681
Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Definition: PointCloud.cpp:56
Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
Definition: PointCloud.cpp:60
PointCloud & Clear() override
Clear all elements in the geometry.
Definition: PointCloud.cpp:46
PointCloud & operator+=(const PointCloud &cloud)
Definition: PointCloud.cpp:101
bool HasNormals() const
Returns true if the point cloud contains point normals.
Definition: PointCloud.h:90
std::vector< double > ComputeNearestNeighborDistance() const
Definition: PointCloud.cpp:651
std::shared_ptr< PointCloud > VoxelDownSample(double voxel_size) const
Function to downsample input pointcloud into output pointcloud with a voxel.
Definition: PointCloud.cpp:328
PointCloud & RemoveNonFinitePoints(bool remove_nan=true, bool remove_infinite=true)
Remove all points from the point cloud that have a nan entry, or infinite entries.
Definition: PointCloud.cpp:161
PointCloud & Scale(const double scale, const Eigen::Vector3d ¢er) override
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is tr...
Definition: PointCloud.cpp:87
OrientedBoundingBox GetOrientedBoundingBox(bool robust=false) const override
Definition: PointCloud.cpp:70
static std::shared_ptr< PointCloud > CreateFromDepthImage(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, bool project_valid_depth_only=true)
Factory function to create a pointcloud from a depth image and a camera model.
Definition: PointCloudFactory.cpp:149
PointCloud(const std::vector< Eigen::Vector3d > &points)
Parameterized Constructor.
Definition: PointCloud.h:62
std::tuple< std::shared_ptr< TriangleMesh >, std::vector< size_t > > ComputeConvexHull(bool joggle_inputs=false) const
Definition: PointCloud.cpp:676
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > ComputeMeanAndCovariance() const
Definition: PointCloud.cpp:626
std::shared_ptr< PointCloud > UniformDownSample(size_t every_k_points) const
Function to downsample input pointcloud into output pointcloud uniformly.
Definition: PointCloud.cpp:453
bool HasPoints() const
Returns 'true' if the point cloud contains points.
Definition: PointCloud.h:87
std::shared_ptr< PointCloud > SelectByIndex(const std::vector< size_t > &indices, bool invert=false) const
Function to select points from input pointcloud into output pointcloud.
Definition: PointCloud.cpp:193
PointCloud & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) override
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center ,...
Definition: PointCloud.cpp:93
void OrientNormalsToAlignWithDirection(const Eigen::Vector3d &orientation_reference=Eigen::Vector3d(0.0, 0.0, 1.0))
Function to orient the normals of a point cloud.
Definition: EstimateNormals.cpp:338
std::tuple< std::shared_ptr< PointCloud >, Eigen::MatrixXi, std::vector< std::vector< int > > > VoxelDownSampleAndTrace(double voxel_size, const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound, bool approximate_class=false) const
Function to downsample using geometry.PointCloud.VoxelDownSample.
Definition: PointCloud.cpp:379
~PointCloud() override
Definition: PointCloud.h:64
std::tuple< std::shared_ptr< PointCloud >, std::vector< size_t > > RemoveStatisticalOutliers(size_t nb_neighbors, double std_ratio, bool print_progress=false) const
Function to remove points that are further away from their nb_neighbor neighbors in average.
Definition: PointCloud.cpp:534
PointCloud & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
Definition: PointCloud.cpp:74
PointCloud()
Default Constructor.
Definition: PointCloud.h:58
static std::shared_ptr< PointCloud > CreateFromRGBDImage(const RGBDImage &image, const camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic=Eigen::Matrix4d::Identity(), bool project_valid_depth_only=true)
Factory function to create a pointcloud from an RGB-D image and a camera model.
Definition: PointCloudFactory.cpp:175
std::shared_ptr< PointCloud > CreateFromVoxelGrid(const VoxelGrid &voxel_grid)
Function to create a PointCloud from a VoxelGrid.
Definition: PointCloudFactory.cpp:201
std::shared_ptr< PointCloud > Crop(const AxisAlignedBoundingBox &bbox) const
Function to crop pointcloud into output pointcloud.
Definition: PointCloud.cpp:481
std::vector< Eigen::Vector3d > normals_
Points normals.
Definition: PointCloud.h:420
void OrientNormalsTowardsCameraLocation(const Eigen::Vector3d &camera_location=Eigen::Vector3d::Zero())
Function to orient the normals of a point cloud.
Definition: EstimateNormals.cpp:358
std::tuple< Eigen::Vector4d, std::vector< size_t > > SegmentPlane(const double distance_threshold=0.01, const int ransac_n=3, const int num_iterations=100, utility::optional< int > seed=utility::nullopt) const
Segment PointCloud plane using the RANSAC algorithm.
Definition: PointCloudSegmentation.cpp:135
std::shared_ptr< PointCloud > RandomDownSample(double sampling_ratio) const
Function to downsample input pointcloud into output pointcloud randomly.
Definition: PointCloud.cpp:465
std::vector< Eigen::Vector3d > points_
Points coordinates.
Definition: PointCloud.h:418
void EstimateCovariances(const KDTreeSearchParam &search_param=KDTreeSearchParamKNN())
Function to compute the covariance matrix for each point of a point cloud.
Definition: PointCloud.cpp:620
void OrientNormalsConsistentTangentPlane(size_t k)
Function to consistently orient estimated normals based on consistent tangent planes as described in ...
Definition: EstimateNormals.cpp:383
bool HasColors() const
Returns true if the point cloud contains point colors.
Definition: PointCloud.h:95
PointCloud & NormalizeNormals()
Normalize point normals to length 1.
Definition: PointCloud.h:105
bool HasCovariances() const
Returns 'true' if the point cloud contains per-point covariance matrix.
Definition: PointCloud.h:100
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: PointCloud.cpp:54
std::tuple< std::shared_ptr< PointCloud >, std::vector< size_t > > RemoveRadiusOutliers(size_t nb_points, double search_radius, bool print_progress=false) const
Function to remove points that have less than nb_points in a sphere of a given radius.
Definition: PointCloud.cpp:501
RGBDImage is for a pair of registered color and depth images,.
Definition: RGBDImage.h:46
VoxelGrid is a collection of voxels which are aligned in grid.
Definition: VoxelGrid.h:80
Definition: Optional.h:278
constexpr nullopt_t nullopt
Definition: Optional.h:171
Definition: PinholeCameraIntrinsic.cpp:35