utils3d.pctodepthimage
Functions
|
Convert point clouds to a depth image. |
Module Contents
- utils3d.pctodepthimage.pctodepthimage(path: str, extrinsics: numpy.ndarray, intrinsics: numpy.ndarray, height: int, width: int, scaling_factor: int = 0.15) PIL.Image[source]
Convert point clouds to a depth image. Returns a B&W image.
- Parameters:
path (str) – path to your point cloud file
extrinsics (np.ndarray) – 3x4 matrix containing the extrinsic parameters.
intrinsics (np.ndarray) – 3x3 matrix containing the intrinsic parameters.
height (int) – height of the depth image.
width (int) – width of the depth image.
scaling_factor (int) – scaling factor decides the intensity of the pixel in the image. (defaults to 0.15)
- Returns:
depth image created after tranforming the point cloud
- Return type:
PIL.Image
Examples
>>> from utils3d.pctodepthimage import pctodepthimage >>> depth_image = pctodepthimage(path, extrinsics, intrinsics, height, width, 0.15) >>> depth_image.show()