CVBpy 14.1
PointCloud Class Reference

A point cloud object. More...

Inherits object.

Inherited by DensePointCloud, and SparsePointCloud.

Public Member Functions

cvb.Cuboid calculate_bounding_box (self)
 Calculates the minimum and maximum extent of the point cloud. More...
 
cvb.Point3D calculate_center_of_gravity (self)
 Gets the center of gravity of the point cloud. More...
 
cvb.Matrix3D calculate_covariance_matrix (self)
 Get the covariance matrix of the point cloud. More...
 
Union[cvb.DensePointCloud, cvb.SparsePointCloudconvert (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. More...
 
Union[cvb.DensePointCloud, cvb.SparsePointClouddown_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. More...
 
Union[cvb.DensePointCloud, cvb.SparsePointCloudduplicate (self)
 Creates a new point cloud which is a copy from this point cloud. More...
 
cvb.Plane3D fit_plane (self, Optional[cvb.Cuboid] aoi)
 Fits a plane in the points of the point cloud. More...
 
Union[cvb.DensePointCloud, cvb.SparsePointCloudfrom_composite (cvb.Composite composite)
 Creates a point cloud from a composite. More...
 
Union[cvb.DensePointCloud, cvb.SparsePointCloudmatrix_transform (self, cvb.Matrix3DH matrix)
 Creates a new point cloud with all points being transformed by the given transformation. More...
 
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. More...
 
None save (self, str file_name, Optional[int] flags)
 Saves the given point cloud to the file with the given file_name. More...
 
Union[cvb.DensePointCloud, cvb.SparsePointCloudscale (self, Union[cvb.Factors3D, List[float]] factors)
 Creates a new point cloud with all points being scaled by the given factors. More...
 
Union[cvb.DensePointCloud, cvb.SparsePointCloudtransform (self, cvb.AffineMatrix3D transformation)
 Creates a new point cloud with all points being transformed by the given transformation. More...
 

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.
 

Detailed Description

A point cloud object.

At its core the point cloud is a collection of 3D points (x, y, z and optionally w).

Member Function Documentation

◆ calculate_bounding_box()

cvb.Cuboid calculate_bounding_box (   self)

Calculates the minimum and maximum extent of the point cloud.

Returns

cvb.Cuboid The variable to receive the extent.

◆ calculate_center_of_gravity()

cvb.Point3D calculate_center_of_gravity (   self)

Gets the center of gravity of the point cloud.

Returns

cvb.Point3D The variable to receive the extent.

◆ calculate_covariance_matrix()

cvb.Matrix3D calculate_covariance_matrix (   self)

Get the covariance matrix of the point cloud.

Returns

cvb.Matrix3D The covariance Matrix to be filled.

◆ convert()

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.

Parameters

flags : int Flags specifying the kind of point cloud to be created (see cvb.PointCloudFlags).

Returns

Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.

◆ down_sample()

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.

Parameters

mode : int Downsample strategy (see cvb.DownSampleMode).

value : int Every Value-th point will be removed (must be greater than one).

Returns

Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.

◆ duplicate()

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.

Returns

Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.

◆ fit_plane()

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.

Parameters

aoi : Optional[cvb.Cuboid] Bounding cuboid to extract points from; if nothing is supplied then self.calculate_bounding_box() is applied.

Returns

cvb.Plane3D Newly created Plane object fitted in the points from the point cloud.

◆ from_composite()

Union[cvb.DensePointCloud, cvb.SparsePointCloud] from_composite ( cvb.Composite  composite)

Creates a point cloud from a composite.

Parameters

composite : cvb.Composite A composite to share.

Returns

Union[cvb.DensePointCloud, cvb.SparsePointCloud] An object that shares resources with the composite.

◆ matrix_transform()

Union[cvb.DensePointCloud, cvb.SparsePointCloud] matrix_transform (   self,
cvb.Matrix3DH  matrix 
)

Creates a new point cloud with all points being transformed by the given transformation.

Parameters

matrix : cvb.Matrix3DH Homogeneous transformation matrix.

Returns

Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.

◆ range_map()

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.

Parameters

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).

Returns

cvb.Image The range map image.

◆ save()

None save (   self,
str  file_name,
Optional[int]  flags 
)

Saves the given point cloud to the file with the given file_name.

Parameters

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).

◆ scale()

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.

Parameters

factors : Union[cvb.Factors3D, List[float]] Scale factors to be applied to each point.

Returns

Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.

◆ transform()

Union[cvb.DensePointCloud, cvb.SparsePointCloud] transform (   self,
cvb.AffineMatrix3D  transformation 
)

Creates a new point cloud with all points being transformed by the given transformation.

Parameters

transformation : cvb.AffineMatrix3D 3D transformation.

Returns

Union[cvb.DensePointCloud, cvb.SparsePointCloud] The new point cloud.