A point cloud object. More...
Inherited by DensePointCloud, and SparsePointCloud.
Public Member Functions | |
| cvb.Cuboid | calculate_bounding_box (self, Optional[bool] ignore_non_confident_points) |
| Calculates the minimum and maximum extent of the point cloud. | |
| cvb.Cuboid | calculate_bounding_box_filtered_confidence (self, Callable[[float], bool] confidencePredicate) |
| Calculates the minimum and maximum extent of the point cloud using a predicate that filters points based on their confidence value. | |
| cvb.Cuboid | calculate_bounding_box_filtered_xyz (self, Callable[[float, float, float], bool] xyzPredicate) |
| Calculates the minimum and maximum extent of the point cloud using a predicate that filters points based on their x, y, z coordinates. | |
| cvb.Point3D | calculate_center_of_gravity (self) |
| Gets the center of gravity of the point cloud. | |
| cvb.Matrix3D | calculate_covariance_matrix (self) |
| Get the covariance matrix of the point cloud. | |
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] | convert (self, int flags) |
| Creates a new point cloud, which is a copy from this point cloud, but with possibly different data type and number of components. | |
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] | down_sample (self, int mode, int value) |
| Creates a new point cloud which has several points being removed dependent on the down sample mode and value. | |
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] | duplicate (self) |
| Creates a new point cloud which is a copy from this point cloud. | |
| cvb.Plane3D | fit_plane (self, Optional[cvb.Cuboid] aoi) |
| Fits a plane in the points of the point cloud. | |
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] | from_composite (cvb.Composite composite) |
| Creates a point cloud from a composite. | |
| cvb.SparsePointCloud | matrix_transform (self, cvb.Matrix3DH matrix) |
| Creates a new point cloud with all points being transformed by the given transformation. | |
| cvb.Image | range_map (self, cvb.NumberRange x_range, cvb.NumberRange y_range, cvb.Size2D size, float background) |
| Creates a new range map image via linear projection in negative z-direction. | |
| None | save (self, str file_name, Optional[int] flags=cvb.PointCloudFlags.Float) |
| Saves the given point cloud to the file with the given file_name. | |
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] | scale (self, Union[cvb.Factors3D, List[float]] factors) |
| Creates a new point cloud with all points being scaled by the given factors. | |
| cvb.SparsePointCloud | transform (self, cvb.AffineMatrix3D transformation) |
| Creates a new point cloud with all points being transformed by the given transformation. | |
Properties | |
| data_type = property | |
| cvb.DataType: Gets the DataType of the x, y, z(, w) components of the given PointCloud. | |
| layout = property | |
| int: Gets the layout of the available buffers / planes of the given point cloud (see cvb.PointCloudLayout). | |
| num_points = property | |
| int: Gets the number of x, y, z(, w) points in the given point cloud. | |
| plane_count = property | |
| int: Gets the number of planes enumerated by this object. | |
| planes = property | |
| List[cvb.Plane]: Gets all available planes enumerated by this object. | |
A point cloud object.
At its core the point cloud is a collection of 3D points (x, y, z and optionally w).
| cvb.Cuboid calculate_bounding_box | ( | self, | |
| Optional[bool] | ignore_non_confident_points ) |
Calculates the minimum and maximum extent of the point cloud.
ignore_non_confident_points : Optional[bool] If true, points with confidence < 1 are ignored (default: true). This flag is only valid for point clouds containing a confidence plane.
cvb.Cuboid The bounding box.
| cvb.Cuboid calculate_bounding_box_filtered_confidence | ( | self, | |
| Callable[[float], bool] | confidencePredicate ) |
Calculates the minimum and maximum extent of the point cloud using a predicate that filters points based on their confidence value.
The supplied predicate is invoked the confidence value of for each point.Points for which the predicate returns True are included in the bounding box calculation; all others are ignored.
confidencePredicate : Callable[[float], bool] A callable receiving confidence value that returns True for points to be included in the calculated bounding box.
cvb.Cuboid The bounding box.
| cvb.Cuboid calculate_bounding_box_filtered_xyz | ( | self, | |
| Callable[[float, float, float], bool] | xyzPredicate ) |
Calculates the minimum and maximum extent of the point cloud using a predicate that filters points based on their x, y, z coordinates.
The supplied predicate is invoked for each point x, y, z in the point cloud.Points for which the predicate returns True are included in the bounding box calculation; all others are ignored.
xyzPredicate : Callable[[float, float, float], bool] A callable receiving x, y, z that returns True for points to be included in the calculated bounding box.
cvb.Cuboid The bounding box.
| cvb.Point3D calculate_center_of_gravity | ( | self | ) |
Gets the center of gravity of the point cloud.
cvb.Point3D The variable to receive the extent.
| cvb.Matrix3D calculate_covariance_matrix | ( | self | ) |
Get the covariance matrix of the point cloud.
cvb.Matrix3D The covariance Matrix to be filled.
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] convert | ( | self, | |
| int | flags ) |
Creates a new point cloud, which is a copy from this point cloud, but with possibly different data type and number of components.
flags : int Flags specifying the kind of point cloud to be created (see cvb.PointCloudFlags).
Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] down_sample | ( | self, | |
| int | mode, | ||
| int | value ) |
Creates a new point cloud which has several points being removed dependent on the down sample mode and value.
mode : int Downsample strategy (see cvb.DownSampleMode).
value : int Every Value-th point will be removed (must be greater than one).
Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] duplicate | ( | self | ) |
Creates a new point cloud which is a copy from this point cloud.
Attention: The duplicated point cloud may have a different point cloud layout.
Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.
| cvb.Plane3D fit_plane | ( | self, | |
| Optional[cvb.Cuboid] | aoi ) |
Fits a plane in the points of the point cloud.
Also fits a plane in points lying on one line, thus make sure that the points really span a plane.
aoi : Optional[cvb.Cuboid] Bounding cuboid to extract points from; if nothing is supplied then self.calculate_bounding_box() is applied.
cvb.Plane3D Newly created Plane object fitted in the points from the point cloud.
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] from_composite | ( | cvb.Composite | composite | ) |
Creates a point cloud from a composite.
composite : cvb.Composite A composite to share.
Union[cvb.DensePointCloud, cvb.SparsePointCloud] An object that shares resources with the composite.
| cvb.SparsePointCloud matrix_transform | ( | self, | |
| cvb.Matrix3DH | matrix ) |
Creates a new point cloud with all points being transformed by the given transformation.
matrix : cvb.Matrix3DH Homogeneous transformation matrix.
cvb.SparsePointCloud The new point cloud.
| cvb.Image range_map | ( | self, | |
| cvb.NumberRange | x_range, | ||
| cvb.NumberRange | y_range, | ||
| cvb.Size2D | size, | ||
| float | background ) |
Creates a new range map image via linear projection in negative z-direction.
x_range : cvb.NumberRange Input window along the x-axis (inclusive).
y_range : cvb.NumberRange Input window along the y-axis (inclusive).
size : cvb.Size2D Target size of RangeMap in pixels (greater or equal to 2x2).
background : float Background value (initialization value for RangeMap).
cvb.Image The range map image.
| None save | ( | self, | |
| str | file_name, | ||
| Optional[int] | flags = cvb.PointCloudFlags.Float ) |
Saves the given point cloud to the file with the given file_name.
file_name : str Complete path where to save the file to.
flags : Optional[int] Flags specifying the kind of point cloud to be created (see cvb.PointCloudFlags).
| Union[cvb.DensePointCloud, cvb.SparsePointCloud] scale | ( | self, | |
| Union[cvb.Factors3D, List[float]] | factors ) |
Creates a new point cloud with all points being scaled by the given factors.
factors : Union[cvb.Factors3D, List[float]] Scale factors to be applied to each point.
Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.
| cvb.SparsePointCloud transform | ( | self, | |
| cvb.AffineMatrix3D | transformation ) |
Creates a new point cloud with all points being transformed by the given transformation.
transformation : cvb.AffineMatrix3D 3D transformation.
cvb.SparsePointCloud The new point cloud.