Public Member Functions | |
| PointCloud | create_from_xyz_image (cls, XYZImage xyz_image, Union[Image, ids_peak_ipl.Image, None] intensity_image=None) |
| Creates a point cloud from a xyz image and optional metadata. | |
| PointCloud | create_from_undistorted_depth_map (cls, UndistortedImage undistorted_depth_map, Union[Image, ids_peak_ipl.Image, None] intensity_image=None) |
| Creates a point cloud from an undistorted depth map and optional metadata. | |
| PointCloud | create_from_points (cls, Union[XYZArray, XYZIArray] points, PointCloudPointType point_type) |
| Creates a point cloud from points. | |
| PointCloud | create_from_file (cls, str file_path, PointCloudPointType point_type=PointCloudPointType.XYZ) |
| Loads a point cloud from a file. | |
| None | __init__ (self, *Any args, **Any kwargs) |
| In order to create a point cloud, please refer to the class methods. | |
| PointCloud | transform (self, npt.NDArray matrix) |
| Applies a transformation of a point cloud based on the given matrix. | |
| PointCloud | transform_to_workspace (self, ExtrinsicParameters extrinsic_parameters) |
| Transforms a point cloud to the workspace coordinate system using the extrinsic parameters. | |
| Union[XYZArray, XYZIArray] | points (self) |
| Get the points of the point cloud. | |
| bool | __eq__ (self, object other) |
| Check if two point clouds are equal. | |
| bool | __ne__ (self, object other) |
| Check if two point clouds are not equal. | |
| None | __del__ (self) |
| str | __repr__ (self) |
| Get a string representation of the Point Cloud represented by points. | |
| None | save (self, str file_path) |
| Saves point cloud to file. | |
Data Fields | |
| points | |
| list | _sorted_points_cache = [PointXYZ(p[0], p[1], p[2]) for p in other] |
Protected Member Functions | |
| None | _init_points (self, Type[ctypes.Structure] c_type, Type python_type, Callable[[ctypes.Array], Iterable[Any]] func) |
| None | _init_point_type (self) |
Protected Attributes | |
| _handle = None | |
| np.ndarray|None | _sorted_points_cache = None |
| np.ndarray|None | _points = None |
| _point_type = None | |
A point cloud is a set of data points defined in a three-dimensional (3D) coordinate system.
Each point is represented by its X, Y, and Z coordinates, specifying its exact position in 3D space. Optionally it can contain intensity metadata. Point clouds are often generated from depth maps, such as those obtained from a time-of-flight camera. They serve as a detailed digital representation of the shape and size of physical objects, enabling precise measurements and analysis.
Definition at line 50 of file point_cloud.py.
| None __init__ | ( | self, | |
| *Any | args, | ||
| **Any | kwargs ) |
In order to create a point cloud, please refer to the class methods.
Definition at line 191 of file point_cloud.py.
| None __del__ | ( | self | ) |
Definition at line 370 of file point_cloud.py.
| bool __eq__ | ( | self, | |
| object | other ) |
Check if two point clouds are equal.
| other | Another point cloud object |
Definition at line 317 of file point_cloud.py.
| bool __ne__ | ( | self, | |
| object | other ) |
Check if two point clouds are not equal.
| other | Another point cloud object |
Definition at line 357 of file point_cloud.py.
| str __repr__ | ( | self | ) |
Get a string representation of the Point Cloud represented by points.
Definition at line 374 of file point_cloud.py.
|
protected |
Definition at line 437 of file point_cloud.py.
|
protected |
Definition at line 412 of file point_cloud.py.
| PointCloud create_from_file | ( | cls, | |
| str | file_path, | ||
| PointCloudPointType | point_type = PointCloudPointType.XYZ ) |
Loads a point cloud from a file.
The chosen file type is determined by the given extension.
The following file formats are supported:
| file_path | The file is loaded from the file path, which should encompass both the directory path and the filename. |
| point_type | Defines whether the point cloud is loaded with or without meta information and how the meta information is interpreted. |
| IOException | If the specified file path is invalid, you lack the necessary permissions, or the file already exists. |
Definition at line 157 of file point_cloud.py.
| PointCloud create_from_points | ( | cls, | |
| Union[XYZArray, XYZIArray] | points, | ||
| PointCloudPointType | point_type ) |
Creates a point cloud from points.
| points | An array of PointXYZ or PointXYZI. |
| point_type | The type of point. |
| MismatchException | If Parameter points is not a numpy array of PointXYZ or PointXYZI objects matching the point_type. |
Definition at line 107 of file point_cloud.py.
| PointCloud create_from_undistorted_depth_map | ( | cls, | |
| UndistortedImage | undistorted_depth_map, | ||
| Union[ Image, ids_peak_ipl.Image, None] | intensity_image = None ) |
Creates a point cloud from an undistorted depth map and optional metadata.
| undistorted_depth_map | Undistorted image providing the radial depth information. |
| intensity_image | Image that holds the meta information (e.g. an intensity image). |
| MismatchException | If the undistorted_depth_map and the intensity image don't have the same size. |
Definition at line 86 of file point_cloud.py.
| PointCloud create_from_xyz_image | ( | cls, | |
| XYZImage | xyz_image, | ||
| Union[Image, ids_peak_ipl.Image, None] | intensity_image = None ) |
Creates a point cloud from a xyz image and optional metadata.
| xyz_image | XYZ image providing the spatial information. |
| intensity_image | Image that holds the meta information (e.g. an intensity image). |
| MismatchException | If the xyz_image and the intensity image don't have the same size. |
Definition at line 67 of file point_cloud.py.
Get the points of the point cloud.
Definition at line 292 of file point_cloud.py.
| None save | ( | self, | |
| str | file_path ) |
Saves point cloud to file.
The chosen file type is determined by the given extension.
The following file formats are supported:
If no file extension is provided, .ply is automatically added.
| file_path | The file is saved to the file_path, which should encompass both the directory path and the filename. |
| IOException | If the specified file path is invalid or lacks write permissions. |
| NotSupportedException | If the specified file extension or point type is not supported or the point cloud is empty. |
Definition at line 385 of file point_cloud.py.
| PointCloud transform | ( | self, | |
| npt.NDArray | matrix ) |
Applies a transformation of a point cloud based on the given matrix.
| matrix | The transformation matrix |
| NotPossibleException | If the dtype of numpy array isn't type float32 or the matrix size isn't 4x4. |
Definition at line 238 of file point_cloud.py.
| PointCloud transform_to_workspace | ( | self, | |
| ExtrinsicParameters | extrinsic_parameters ) |
Transforms a point cloud to the workspace coordinate system using the extrinsic parameters.
The point cloud is transformed from the camera coordinate system to the workspace coordinate system using the inverse of the extrinsic parameters.
| extrinsic_parameters | Extrinsic parameters of the workspace calibration. |
Definition at line 267 of file point_cloud.py.
|
protected |
Definition at line 199 of file point_cloud.py.
|
protected |
Definition at line 202 of file point_cloud.py.
|
protected |
Definition at line 201 of file point_cloud.py.
|
protected |
Definition at line 200 of file point_cloud.py.
| list _sorted_points_cache = [PointXYZ(p[0], p[1], p[2]) for p in other] |
Definition at line 345 of file point_cloud.py.
| points |
Definition at line 341 of file point_cloud.py.