Note
This tutorial is generated from a Jupyter notebook that can be downloaded and run interactively.
📓 Download notebook
Python Interface#
For the C++ interface, see here.
Install CloudViewer Python package#
For installing CloudViewer Python package, see here.
Install CloudViewer from source#
For installing from source, see here.
Getting started#
This tutorial shows how to import the cloudViewer module and use it to load and inspect a point cloud.
[1]:
import cloudViewer as cv3d
Using external CloudViewer-ML in /root/CloudViewer-ML
Note:
Depending on the environment, the name of the Python library may not be cloudViewer.so. Regardless of the file name, import cloudViewer should work.
[2]:
sample_pcd_data = cv3d.data.PCDPointCloud()
pcd = cv3d.io.read_point_cloud(sample_pcd_data.path)
print(pcd)
ccPointCloud with 113662 points.
This imports the read_point_cloud function from the cloudViewer module. It reads a point cloud file and returns an instance of the PointCloud class. print(pcd) prints some brief information about the point cloud.
Using built-in help function#
Browse CloudViewer#
help(cloudViewer) prints a description of the cloudViewer module.
[3]:
help(cv3d)
Help on package cloudViewer:
NAME
cloudViewer
DESCRIPTION
# ----------------------------------------------------------------------------
# - CloudViewer: www.cloudViewer.org -
# ----------------------------------------------------------------------------
# Copyright (c) 2018-2024 www.cloudViewer.org
# SPDX-License-Identifier: MIT
# ----------------------------------------------------------------------------
PACKAGE CONTENTS
_build_config
app
core
examples (package)
ml (package)
visualization (package)
web_visualizer
SUBMODULES
camera
cpu
data
geometry
io
pipelines
pybind
t
utility
DATA
LIB_PATH = '/root/ACloudViewer/build/lib/python_package/cloudViewer/li...
MAIN_LIB_PATH = PosixPath('/root/ACloudViewer/build/lib/python_package...
__DEVICE_API__ = 'cpu'
VERSION
3.9.4+3f1225c2e
FILE
/root/ACloudViewer/build/lib/python_package/cloudViewer/__init__.py
Description of a class in CloudViewer#
help(cloudViewer.PointCloud) provides a description of the PointCloud class.
[4]:
help(cv3d.geometry.ccPointCloud)
Help on class ccPointCloud in module cloudViewer.cpu.pybind.geometry:
class ccPointCloud(ccGenericPointCloud, ccHObject)
| ccPointCloud class. A point cloud consists of point coordinates, and optionally point colors and point normals.
|
| Method resolution order:
| ccPointCloud
| ccGenericPointCloud
| GenericIndexedCloudPersist
| GenericIndexedCloud
| GenericCloud
| ccHObject
| ccObject
| ccDrawableObject
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __add__(...)
| __add__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, arg0: cloudViewer.cpu.pybind.geometry.ccPointCloud) -> cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| __copy__(...)
| __copy__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud) -> cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| __deepcopy__(...)
| __deepcopy__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, arg0: dict) -> cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| __iadd__(...)
| __iadd__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, arg0: cloudViewer.cpu.pybind.geometry.ccPointCloud) -> cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| __init__(...)
| __init__(*args, **kwargs)
| Overloaded function.
|
| 1. __init__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud) -> None
|
| Default constructor
|
| 2. __init__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, arg0: cloudViewer.cpu.pybind.geometry.ccPointCloud) -> None
|
| Copy constructor
|
| 3. __init__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, name: str = 'cloud') -> None
|
| 4. __init__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, points: cloudViewer.cpu.pybind.utility.Vector3dVector, name: str = 'cloud') -> None
|
| Create a PointCloud from points
|
| __repr__(...)
| __repr__(self: cloudViewer.cpu.pybind.geometry.ccPointCloud) -> str
|
| add_grey_color(...)
| add_grey_color(self, grey)
| Pushes a grey color on stack (shortcut).
|
| Args:
| grey (typing.SupportsInt)
|
| Returns:
| None
|
| add_sf(...)
| add_sf(*args, **kwargs)
| Overloaded function.
|
|
| 1. add_sf(self, unique_name)
| Creates a new scalar field and registers it.
|
| Args:
| unique_name (str)
|
| Returns:
| int
|
| 2. add_sf(self, sf)
| Creates a new scalar field and registers it.
|
| Args:
| sf (cloudViewer.cpu.pybind.utility.ccScalarField)
|
| Returns:
| int
|
| append(...)
| append(self, input_cloud, start_count, ignore_children=False)
| Appends a cloud to this one
|
| Args:
| input_cloud (cloudViewer.cpu.pybind.geometry.ccPointCloud)
| start_count (typing.SupportsInt)
| ignore_children (bool, optional, default=False)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| capacity(...)
| capacity(self)
| Returns cloud capacity (i.e. reserved size).
|
| Returns:
| int
|
| clone_this(...)
| clone_this(self, ignore_children=True)
| All the main features of the entity are cloned, except from the octree and the points visibility information.
|
| Args:
| ignore_children (bool, optional, default=True)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| cluster_dbscan(...)
| cluster_dbscan(self, eps, min_points, print_progress=False)
| Cluster PointCloud using the DBSCAN algorithm Ester et al., 'A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise', 1996. Returns a list of point labels, -1 indicates noise according to the algorithm.
|
| Args:
| eps (typing.SupportsFloat): Density parameter that is used to find neighboring points.
| min_points (typing.SupportsInt): Minimum number of points to form a cluster.
| print_progress (bool, optional, default=False): If true the progress is visualized in the console.
|
| Returns:
| cloudViewer.cpu.pybind.utility.IntVector
|
| color(...)
| color(self, index)
| get point color by given index.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| colorize(...)
| colorize(self, r, g, b)
| Multiplies all color components of all points by coefficients.
|
| Args:
| r (typing.SupportsFloat)
| g (typing.SupportsFloat)
| b (typing.SupportsFloat)
|
| Returns:
| bool
|
| colors(...)
| colors(self)
| ``float64`` array of shape ``(num_points, 3)``, range ``[0, 1]`` , use ``numpy.asarray()`` to access data: RGB colors of points.
|
| Returns:
| cloudViewer.cpu.pybind.utility.Vector3dVector
|
| colors_have_changed(...)
| colors_have_changed(self)
| Notify a modification of color/scalar field display parameters or contents.
|
| Returns:
| None
|
| compute_closest_points(...)
| compute_closest_points(self, other_cloud, octree_level=0)
| Computes the closest point of this cloud relatively to another cloud
|
| Args:
| other_cloud (cloudViewer.cpu.pybind.geometry.ccGenericPointCloud)
| octree_level (typing.SupportsInt, optional, default=0)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ReferenceCloud
|
| compute_convex_hull(...)
| compute_convex_hull(self)
| Computes the convex hull of the point cloud.
|
| Returns:
| tuple[ccMesh, list[int]]
|
| compute_gravity_center(...)
| compute_gravity_center(self)
| Returns the cloud gravity center
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| compute_mahalanobis_distance(...)
| compute_mahalanobis_distance(self)
| Function to compute the Mahalanobis distance for points in a point cloud. See: https://en.wikipedia.org/wiki/Mahalanobis_distance.
|
| Returns:
| cloudViewer.cpu.pybind.utility.DoubleVector
|
| compute_nearest_neighbor_distance(...)
| compute_nearest_neighbor_distance(self)
| Function to compute the distance from a point to its nearest neighbor in the point cloud
|
| Returns:
| cloudViewer.cpu.pybind.utility.DoubleVector
|
| compute_point_cloud_distance(...)
| compute_point_cloud_distance(self, target)
| For each point in the source point cloud, compute the distance to the target point cloud.
|
| Args:
| target (cloudViewer.cpu.pybind.geometry.ccPointCloud): The target point cloud.
|
| Returns:
| cloudViewer.cpu.pybind.utility.DoubleVector
|
| compute_resolution(...)
| compute_resolution(self)
| Function to compute the point cloud resolution.
|
| Returns:
| float
|
| convert_current_sf_to_colors(...)
| convert_current_sf_to_colors(self, mix_with_existing_color=False)
| Converts current scalar field (values & display parameters) to RGB colors.
|
| Args:
| mix_with_existing_color (bool, optional, default=False)
|
| Returns:
| bool
|
| convert_normal_to_dipdir_sfs(...)
| convert_normal_to_dipdir_sfs(self)
| Converts normals to two scalar fields: 'dip' and 'dip direction'.
|
| Returns:
| tuple[cloudViewer.cpu.pybind.utility.ccScalarField, cloudViewer.cpu.pybind.utility.ccScalarField]
|
| convert_normal_to_rgb(...)
| convert_normal_to_rgb(self)
| Converts normals to RGB colors.
|
| Returns:
| bool
|
| convert_rgb_to_grey_scale(...)
| convert_rgb_to_grey_scale(self)
| Converts RGB to grey scale colors.
|
| Returns:
| bool
|
| crop(...)
| crop(*args, **kwargs)
| Overloaded function.
|
|
| 1. crop(self, bounding_box)
| Function to crop input pointcloud into output pointcloud
|
| Args:
| bounding_box (ccBBox): ccBBox to crop points
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| 2. crop(self, bounding_box)
| Function to crop input pointcloud into output pointcloud
|
| Args:
| bounding_box (ecvOrientedBBox): ccBBox to crop points
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| crop_2d(...)
| crop_2d(self, polyline, ortho_dim, inside=True)
| Crops the cloud inside (or outside) a 2D polyline
|
| Args:
| polyline (ccPolyline)
| ortho_dim (typing.SupportsInt)
| inside (bool, optional, default=True)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| delete_all_sfs(...)
| delete_all_sfs(self)
| Deletes all scalar fields associated to this cloud.
|
| Returns:
| None
|
| delete_sf(...)
| delete_sf(self, index)
| Deletes a specific scalar field.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| None
|
| enhance_rgb_with_intensity_sf(...)
| enhance_rgb_with_intensity_sf(self, sf_index, use_intensity_range=False, min_intensity=0.0, max_intensity=1.0)
| Enhances the RGB colors with the current scalar field (assuming it's intensities).
|
| Args:
| sf_index (typing.SupportsInt)
| use_intensity_range (bool, optional, default=False)
| min_intensity (typing.SupportsFloat, optional, default=0.0)
| max_intensity (typing.SupportsFloat, optional, default=1.0)
|
| Returns:
| bool
|
| estimate_covariances(...)
| estimate_covariances(self, search_param=geometry::KDTreeSearchParamKNN with knn = 30)
| Function to compute the covariance matrix for each point in the point cloud
|
| Args:
| search_param (cloudViewer.cpu.pybind.geometry.KDTreeSearchParam, optional, default=geometry::KDTreeSearchParamKNN with knn = 30): The KDTree search parameters for neighborhood search.
|
| Returns:
| None
|
| estimate_normals(...)
| estimate_normals(self, search_param=geometry::KDTreeSearchParamKNN with knn = 30, fast_normal_computation=True)
| Function to compute the normals of a point cloud. Normals are oriented with respect to the input point cloud if normals exist
|
| Args:
| search_param (cloudViewer.cpu.pybind.geometry.KDTreeSearchParam, optional, default=geometry::KDTreeSearchParamKNN with knn = 30): The KDTree search parameters for neighborhood search.
| fast_normal_computation (bool, optional, default=True): If true, the normal estiamtion uses a non-iterative method to extract the eigenvector from the covariance matrix. This is faster, but is not as numerical stable.
|
| Returns:
| bool
|
| execute_ransac(...)
| execute_ransac(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, params: cloudViewer.cpu.pybind.geometry.RansacParams = geometry::RansacParams with epsilon = 0.005000 and bitmapEpsilon = 0.010000 and supportPoints = 500 and maxNormalDev_deg = 25.000000 and probability = 0.010000 and randomColor = 1 and minRadius = 0.000000 and maxRadius = 1000000.000000, print_progress: bool = False) -> list[cloudViewer.cpu.pybind.geometry.RansacResult]
|
| Cluster ccPointCloud using the RANSAC algorithm, Wrapper to Schnabel et al. library for automatic shape detection in point cloud ,Efficient RANSAC for Point - Cloud Shape Detection, Ruwen Schnabel, Roland Wahl, Returns a list of ransac point labels and shape entity(ccGenericPrimitive)
|
| export_coord_to_sf(...)
| export_coord_to_sf(self, export_x=False, export_y=False, export_z=False)
| Exports the specified coordinate dimension(s) to scalar field(s).
|
| Args:
| export_x (bool, optional, default=False)
| export_y (bool, optional, default=False)
| export_z (bool, optional, default=False)
|
| Returns:
| bool
|
| export_normal_to_sf(...)
| export_normal_to_sf(self, export_x=False, export_y=False, export_z=False)
| Exports the specified normal dimension(s) to scalar field(s).
|
| Args:
| export_x (bool, optional, default=False)
| export_y (bool, optional, default=False)
| export_z (bool, optional, default=False)
|
| Returns:
| bool
|
| farthest_point_down_sample(...)
| farthest_point_down_sample(self: cloudViewer.cpu.pybind.geometry.ccPointCloud, num_samples: typing.SupportsInt, start_index: typing.SupportsInt = 0) -> cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| Index to start downsampling from. Valid index is a non-negative number less than number of points in the input pointcloud.
|
| filter_points_by_sf(...)
| filter_points_by_sf(*args, **kwargs)
| Overloaded function.
|
|
| 1. filter_points_by_sf(self, min_val, max_val, outside=False)
| Filters out points whose scalar values falls into an interval.
|
| Args:
| min_val (typing.SupportsFloat)
| max_val (typing.SupportsFloat)
| outside (bool, optional, default=False)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| 2. filter_points_by_sf(self, values, outside=False)
| Filters out points whose scalar values falls into an interval.
|
| Args:
| values (cloudViewer.cpu.pybind.utility.DoubleVector)
| outside (bool, optional, default=False)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| get_color(...)
| get_color(self, index)
| get point color by given index.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_colors(...)
| get_colors(self)
| ``float64`` array of shape ``(num_points, 3)``, range ``[0, 1]`` , use ``numpy.asarray()`` to access data: RGB colors of points.
|
| Returns:
| cloudViewer.cpu.pybind.utility.Vector3dVector
|
| get_current_displayed_sf(...)
| get_current_displayed_sf(self)
| Returns the currently displayed scalar (or 0 if none).
|
| Returns:
| cloudViewer.cpu.pybind.utility.ccScalarField
|
| get_current_input_sf(...)
| get_current_input_sf(self)
| Returns the scalar field currently associated to the cloud input.
|
| Returns:
| cloudViewer.cpu.pybind.utility.ScalarField
|
| get_current_input_sf_index(...)
| get_current_input_sf_index(self)
| Returns current INPUT scalar field index (or -1 if none).
|
| Returns:
| int
|
| get_current_output_sf(...)
| get_current_output_sf(self)
| Returns the scalar field currently associated to the cloud output.
|
| Returns:
| cloudViewer.cpu.pybind.utility.ScalarField
|
| get_current_output_sf_index(...)
| get_current_output_sf_index(self)
| Returns current OUTPUT scalar field index (or -1 if none).
|
| Returns:
| int
|
| get_current_sf_index(...)
| get_current_sf_index(self)
| Returns the currently displayed scalar field index (or -1 if none).
|
| Returns:
| int
|
| get_normal(...)
| get_normal(self, index)
| get point normal by given index.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_normals(...)
| get_normals(self)
| ``float64`` array of shape ``(num_points, 3)``, use ``numpy.asarray()`` to access data: Points normals.
|
| Returns:
| cloudViewer.cpu.pybind.utility.Vector3dVector
|
| get_point(...)
| get_point(self, index)
| get point coordinate by given index.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_points(...)
| get_points(self)
| ``float64`` array of shape ``(num_points, 3)``, use ``numpy.asarray()`` to access data: Points coordinates.
|
| Returns:
| cloudViewer.cpu.pybind.utility.Vector3dVector
|
| get_sf_by_index(...)
| get_sf_by_index(self, index)
| Returns a pointer to a specific scalar field.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| cloudViewer.cpu.pybind.utility.ScalarField
|
| get_sf_index_by_name(...)
| get_sf_index_by_name(self, name)
| Returns the index of a scalar field represented by its name.
|
| Args:
| name (str)
|
| Returns:
| int
|
| get_sf_name(...)
| get_sf_name(self, index)
| Returns the name of a specific scalar field.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| str
|
| has_covariances(...)
| has_covariances(self: cloudViewer.cpu.pybind.geometry.ccPointCloud) -> bool
|
| Returns ``True`` if the point cloud contains covariances.
|
| has_sensor(...)
| has_sensor(self)
| Returns whether the mesh as an associated sensor or not.
|
| Returns:
| bool
|
| hidden_point_removal(...)
| hidden_point_removal(self, camera_location, radius)
| Removes hidden points from a point cloud and returns a mesh of the remaining points. Based on Katz et al. 'Direct Visibility of Point Sets', 2007. Additional information about the choice of radius for noisy point clouds can be found in Mehra et. al. 'Visibility of Noisy Point Cloud Data', 2010.
|
| Args:
| camera_location (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): All points not visible from that location will be removed
| radius (typing.SupportsFloat): The radius of the sperical projection
|
| Returns:
| tuple[ccMesh, list[int]]
|
| hide_points_by_sf(...)
| hide_points_by_sf(*args, **kwargs)
| Overloaded function.
|
|
| 1. hide_points_by_sf(self, min_val, max_val)
| Hides points whose scalar values falls into an interval.
|
| Args:
| min_val (typing.SupportsFloat)
| max_val (typing.SupportsFloat)
|
| Returns:
| None
|
| 2. hide_points_by_sf(self, values)
| Hides points whose scalar values falls into an interval.
|
| Args:
| values (cloudViewer.cpu.pybind.utility.DoubleVector)
|
| Returns:
| None
|
| interpolate_colors_from(...)
| interpolate_colors_from(self, other_cloud, octree_level=0)
| Interpolate colors from another cloud (nearest neighbor only)
|
| Args:
| other_cloud (cloudViewer.cpu.pybind.geometry.ccPointCloud)
| octree_level (typing.SupportsInt, optional, default=0)
|
| Returns:
| bool
|
| invalidate_bbox(...)
| invalidate_bbox(self)
| Invalidates bounding box.
|
| Returns:
| None
|
| invert_normals(...)
| invert_normals(self)
| Inverts normals (if any).
|
| Returns:
| None
|
| normal(...)
| normal(self, index)
| get point normal by given index.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| normalize_normals(...)
| normalize_normals(self)
| Normalize point normals to length 1.
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| normals(...)
| normals(self)
| ``float64`` array of shape ``(num_points, 3)``, use ``numpy.asarray()`` to access data: Points normals.
|
| Returns:
| cloudViewer.cpu.pybind.utility.Vector3dVector
|
| normals_have_changed(...)
| normals_have_changed(self)
| Notify a modification of normals display parameters or contents.
|
| Returns:
| None
|
| orient_normals_consistent_tangent_plane(...)
| orient_normals_consistent_tangent_plane(self, k)
| Function to orient the normals with respect to consistent tangent planes
|
| Args:
| k (typing.SupportsInt): Number of k nearest neighbors used in constructing the Riemannian graph used to propogate normal orientation.
|
| Returns:
| None
|
| orient_normals_to_align_with_direction(...)
| orient_normals_to_align_with_direction(self, orientation_reference)
| Function to orient the normals of a point cloud
|
| Args:
| orientation_reference (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): Normals are oriented with respect to orientation_reference.
|
| Returns:
| bool
|
| orient_normals_towards_camera_location(...)
| orient_normals_towards_camera_location(self, camera_location)
| Function to orient the normals of a point cloud
|
| Args:
| camera_location (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): Normals are oriented with towards the camera_location.
|
| Returns:
| bool
|
| paint_uniform_color(...)
| paint_uniform_color(self, color)
| Assigns each point in the PointCloud the same color.
|
| Args:
| color (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): RGB color for the PointCloud.
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| partial_clone(...)
| partial_clone(self, selection)
| Creates a new point cloud object from a ReferenceCloud (selection).
|
| Args:
| selection (cloudViewer.cpu.pybind.geometry.ReferenceCloud)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| point(...)
| point(self, index)
| get point coordinate by given index.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| points(...)
| points(self)
| ``float64`` array of shape ``(num_points, 3)``, use ``numpy.asarray()`` to access data: Points coordinates.
|
| Returns:
| cloudViewer.cpu.pybind.utility.Vector3dVector
|
| points_have_changed(...)
| points_have_changed(self)
| Notify a modification of points display parameters or contents.
|
| Returns:
| None
|
| random_down_sample(...)
| random_down_sample(self, sampling_ratio)
| Function to downsample input pointcloud into output pointcloud randomly. The sample is generated by randomly sampling the indexes from the point cloud.
|
| Args:
| sampling_ratio (typing.SupportsFloat): Sampling ratio, the ratio of number of selected points to total number of points[0-1]
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| remove_non_finite_points(...)
| remove_non_finite_points(self, remove_nan=True, remove_infinite=True)
| Function to remove non-finite points from the PointCloud
|
| Args:
| remove_nan (bool, optional, default=True): Remove NaN values from the PointCloud
| remove_infinite (bool, optional, default=True): Remove infinite values from the PointCloud
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| remove_radius_outlier(...)
| remove_radius_outlier(self, nb_points, radius)
| Function to remove points that have less than nb_points in a given sphere of a given radius
|
| Args:
| nb_points (typing.SupportsInt): Number of points within the radius.
| radius (typing.SupportsFloat): Radius of the sphere.
|
| Returns:
| tuple[cloudViewer.cpu.pybind.geometry.ccPointCloud, list[int]]
|
| remove_statistical_outlier(...)
| remove_statistical_outlier(self, nb_neighbors, std_ratio)
| Function to remove points that are further away from their neighbors in average
|
| Args:
| nb_neighbors (typing.SupportsInt): Number of neighbors around the target point.
| std_ratio (typing.SupportsFloat): Standard deviation ratio.
|
| Returns:
| tuple[cloudViewer.cpu.pybind.geometry.ccPointCloud, list[int]]
|
| rename_sf(...)
| rename_sf(self, index, name)
| Renames a specific scalar field.
|
| Args:
| index (typing.SupportsInt)
| name (str)
|
| Returns:
| bool
|
| reserve(...)
| reserve(self, points_number)
| Reserves memory for all the active features.
|
| Args:
| points_number (typing.SupportsInt)
|
| Returns:
| bool
|
| reserve_colors(...)
| reserve_colors(self)
| Reserves memory to store the RGB colors.
|
| Returns:
| bool
|
| reserve_norms(...)
| reserve_norms(self)
| Reserves memory to store the compressed normals.
|
| Returns:
| bool
|
| reserve_points(...)
| reserve_points(self, points_number)
| Reserves memory to store the points coordinates.
|
| Args:
| points_number (typing.SupportsInt)
|
| Returns:
| bool
|
| reset(...)
| reset(self)
| Clears the cloud database.
|
| Returns:
| None
|
| resize(...)
| resize(self, points_number)
| Resizes all the active features arrays.
|
| Args:
| points_number (typing.SupportsInt)
|
| Returns:
| bool
|
| resize_colors(...)
| resize_colors(self, fill_with_white=False)
| Resizes the RGB colors array.
|
| Args:
| fill_with_white (bool, optional, default=False)
|
| Returns:
| bool
|
| resize_norms(...)
| resize_norms(self)
| Resizes the compressed normals array.
|
| Returns:
| bool
|
| segment_plane(...)
| segment_plane(self, distance_threshold, ransac_n, num_iterations)
| Segments a plane in the point cloud using the RANSAC algorithm.
|
| Args:
| distance_threshold (typing.SupportsFloat): Max distance a point can be from the plane model, and still be considered an inlier.
| ransac_n (typing.SupportsInt): Number of initial points to be considered inliers in each iteration.
| num_iterations (typing.SupportsInt): Number of iterations.
|
| Returns:
| tuple[typing.Annotated[numpy.typing.NDArray[numpy.float64], "[4, 1]"], list[int]]
|
| select_by_index(...)
| select_by_index(self, indices, invert=False)
| Function to select points from input pointcloud into output pointcloud.
|
| Args:
| indices (collections.abc.Sequence[typing.SupportsInt]): Indices of points to be selected.
| invert (bool, optional, default=False): Set to ``True`` to invert the selection of indices.
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| set_color(...)
| set_color(self, index, color)
| set point color by given index.
|
| Args:
| index (typing.SupportsInt)
| color (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
|
| Returns:
| None
|
| set_color_by_banding(...)
| set_color_by_banding(self, dim, frequency)
| Assigns color to points by 'banding'.
|
| Args:
| dim (typing.SupportsInt)
| frequency (typing.SupportsFloat)
|
| Returns:
| bool
|
| set_color_with_current_sf(...)
| set_color_with_current_sf(self, mix_with_existing_color=False)
| Sets RGB colors with current scalar field (values & parameters).
|
| Args:
| mix_with_existing_color (bool, optional, default=False)
|
| Returns:
| bool
|
| set_colors(...)
| set_colors(self, colors)
| ``float64`` array of shape ``(num_points, 3)``, range ``[0, 1]`` , use ``numpy.asarray()`` to access data: RGB colors of points.
|
| Args:
| colors (cloudViewer.cpu.pybind.utility.Vector3dVector)
|
| Returns:
| None
|
| set_current_displayed_sf(...)
| set_current_displayed_sf(self, index)
| Sets the currently displayed scalar field.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| None
|
| set_current_input_sf_index(...)
| set_current_input_sf_index(self, index)
| Sets the INPUT scalar field index (or -1 if none).
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| None
|
| set_current_output_sf_index(...)
| set_current_output_sf_index(self, index)
| Sets the OUTPUT scalar field index (or -1 if none).
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| None
|
| set_current_sf(...)
| set_current_sf(self, index)
| Sets both the INPUT & OUTPUT scalar field.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| None
|
| set_normal(...)
| set_normal(self, index, normal)
| set point normal by given index.
|
| Args:
| index (typing.SupportsInt)
| normal (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
|
| Returns:
| None
|
| set_normals(...)
| set_normals(self, normals)
| ``float64`` array of shape ``(num_points, 3)``, use ``numpy.asarray()`` to access data: Points normals.
|
| Args:
| normals (cloudViewer.cpu.pybind.utility.Vector3dVector)
|
| Returns:
| None
|
| set_point(...)
| set_point(self, index, point)
| set point coordinate by given index.
|
| Args:
| index (typing.SupportsInt)
| point (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
|
| Returns:
| None
|
| set_points(...)
| set_points(self, points)
| ``float64`` array of shape ``(num_points, 3)``, use ``numpy.asarray()`` to access data: Points coordinates.
|
| Args:
| points (cloudViewer.cpu.pybind.utility.Vector3dVector)
|
| Returns:
| None
|
| sf_color_scale_shown(...)
| sf_color_scale_shown(self)
| Returns whether color scale should be displayed or not.
|
| Returns:
| bool
|
| sfs_count(...)
| sfs_count(self)
| Returns the number of associated (and active) scalar fields.
|
| Returns:
| int
|
| show_sf_color_scale(...)
| show_sf_color_scale(self, state)
| Sets whether color scale should be displayed or not.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| shrink(...)
| shrink(self)
| Removes unused capacity.
|
| Returns:
| None
|
| unalloacte_colors(...)
| unalloacte_colors(self)
| Erases the cloud colors.
|
| Returns:
| None
|
| unalloacte_norms(...)
| unalloacte_norms(self)
| Erases the cloud normals.
|
| Returns:
| None
|
| unalloacte_points(...)
| unalloacte_points(self)
| Erases the cloud points.
|
| Returns:
| None
|
| uniform_down_sample(...)
| uniform_down_sample(self, every_k_points)
| Function to downsample input pointcloud into output pointcloud uniformly. The sample is performed in the order of the points with the 0-th point always chosen, not at random.
|
| Args:
| every_k_points (typing.SupportsInt): Sample rate, the selected point indices are [0, k, 2k, ...]
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| voxel_down_sample(...)
| voxel_down_sample(self, voxel_size)
| Function to downsample input pointcloud into output pointcloud with a voxel. Normals and colors are averaged if they exist.
|
| Args:
| voxel_size (typing.SupportsFloat): Voxel size to downsample into.
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| voxel_down_sample_and_trace(...)
| voxel_down_sample_and_trace(self, voxel_size, min_bound, max_bound, approximate_class=False)
| Function to downsample using ccPointCloud::VoxelDownSample. Also records point cloud index before down sampling
|
| Args:
| voxel_size (typing.SupportsFloat): Voxel size to downsample into.
| min_bound (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): Minimum coordinate of voxel boundaries
| max_bound (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): Maximum coordinate of voxel boundaries
| approximate_class (bool, optional, default=False)
|
| Returns:
| tuple[cloudViewer.cpu.pybind.geometry.ccPointCloud, typing.Annotated[numpy.typing.NDArray[numpy.int32], "[m, n]"], list[cloudViewer.cpu.pybind.utility.IntVector]]
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| create_from_depth_image(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| create_from_depth_image(depth, intrinsic, extrinsic, depth_scale=1000.0, depth_trunc=1000.0, stride=1, project_valid_depth_only=True)
| Factory function to create a pointcloud from a depth image and a
| camera. Given depth value d at (u, v) image coordinate, the corresponding 3d
| point is:
| - z = d / depth_scale
| - x = (u - cx) * z / fx
| - y = (v - cy) * z / fy
|
| Args:
| depth (cloudViewer::geometry::Image): The input depth image can be either a float image, or a uint16_t image.
| intrinsic (cloudViewer.cpu.pybind.camera.PinholeCameraIntrinsic): Intrinsic parameters of the camera.
| extrinsic (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
| depth_scale (typing.SupportsFloat, optional, default=1000.0): The depth is scaled by 1 / depth_scale.
| depth_trunc (typing.SupportsFloat, optional, default=1000.0): Truncated at depth_trunc distance.
| stride (typing.SupportsInt, optional, default=1): Sampling factor to support coarse point cloud extraction.
| project_valid_depth_only (bool, optional, default=True)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| create_from_rgbd_image(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| create_from_rgbd_image(image, intrinsic, extrinsic, project_valid_depth_only=True)
| Factory function to create a pointcloud from an RGB-D image and a camera. Given depth value d at (u, v) image coordinate, the corresponding 3d point is: - z = d / depth_scale
| - x = (u - cx) * z / fx
| - y = (v - cy) * z / fy
|
| Args:
| image (cloudViewer::geometry::RGBDImage): The input image.
| intrinsic (cloudViewer.cpu.pybind.camera.PinholeCameraIntrinsic): Intrinsic parameters of the camera.
| extrinsic (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
| project_valid_depth_only (bool, optional, default=True)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| estimate_point_covariances(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| estimate_point_covariances(input, search_param=geometry::KDTreeSearchParamKNN with knn = 30)
| Static function to compute the covariance matrix for each point in the given point cloud, doesn't change the input
|
| Args:
| input (cloudViewer.cpu.pybind.geometry.ccPointCloud): The input point cloud.
| search_param (cloudViewer.cpu.pybind.geometry.KDTreeSearchParam, optional, default=geometry::KDTreeSearchParamKNN with knn = 30): The KDTree search parameters for neighborhood search.
|
| Returns:
| cloudViewer.cpu.pybind.utility.Matrix3dVector
|
| from(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| from(*args, **kwargs)
| Overloaded function.
|
| 1. from(cloud: cloudViewer.cpu.pybind.geometry.GenericIndexedCloud, source_cloud: cloudViewer.cpu.pybind.geometry.ccGenericPointCloud = None) -> cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| 'GenericCloud' is a very simple and light interface from cloudViewer. It ismeant to give access to points coordinates of any cloud(on the condition it implements the GenericCloud interface of course). See cloudViewer documentation for more information about GenericClouds.As the GenericCloud interface is very simple, only points are imported.Note : throws an 'int' exception in case of error(see CTOR_ERRORS)-param cloud a GenericCloud structure-param source_cloud cloud from which main parameters will be imported(optional)
|
| 2. from(source_cloud: cloudViewer.cpu.pybind.geometry.ccPointCloud, indices: collections.abc.Sequence[typing.SupportsInt]) -> cloudViewer.cpu.pybind.geometry.ccPointCloud
|
| Function to select points from input ccPointCloud into output ccPointCloud.Points with indices in param indices are selected
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| covariances
| ``float64`` array of shape ``(num_points, 3, 3)``, use ``numpy.asarray()`` to access data: Points covariances.
|
| ----------------------------------------------------------------------
| Methods inherited from ccGenericPointCloud:
|
| clear(...)
| clear(self)
| Clears the entity from all its points and features.
|
| Returns:
| None
|
| clone(...)
| clone(self, ignore_children=False)
| Clones this entity.
|
| Args:
| ignore_children (bool, optional, default=False)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccGenericPointCloud
|
| compute_mean_and_covariance(...)
| compute_mean_and_covariance(self)
| Function to compute the mean and covariance matrix of a point cloud.
|
| Returns:
| tuple[typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]]
|
| create_cloud_from_visibility_selection(...)
| create_cloud_from_visibility_selection(self, remove_selected_points=False, vis_table, , silent=False)
| Creates a new point cloud with only the 'visible' points (as defined by the visibility array).
|
| Args:
| remove_selected_points (bool, optional, default=False)
| vis_table (std::vector)
| ()
| silent (bool, optional, default=False)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccGenericPointCloud
|
| get_point_color(...)
| get_point_color(self, point_index)
| Returns color corresponding to a given point.
|
| Args:
| point_index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_point_displayed_distance(...)
| get_point_displayed_distance(self, point_index)
| Returns scalar value associated to a given point.
|
| Args:
| point_index (typing.SupportsInt)
|
| Returns:
| float
|
| get_point_normal(...)
| get_point_normal(self, point_index)
| Returns normal corresponding to a given point.
|
| Args:
| point_index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_point_normal_index(...)
| get_point_normal_index(self, point_index)
| Returns compressed normal corresponding to a given point.
|
| Args:
| point_index (typing.SupportsInt)
|
| Returns:
| int
|
| get_point_scalar_value_color(...)
| get_point_scalar_value_color(self, point_index)
| Returns color corresponding to a given point associated scalar value.
|
| Args:
| point_index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_point_size(...)
| get_point_size(self)
| Returns current point size
|
| Returns:
| int
|
| get_scalar_value_color(...)
| get_scalar_value_color(self, value)
| Returns color corresponding to a given scalar value.
|
| Args:
| value (typing.SupportsFloat)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_visibility_array(...)
| get_visibility_array(*args, **kwargs)
| Overloaded function.
|
|
| 1. get_visibility_array(self, )
| <unsigned char, std::allocator<unsigned char> >
|
| Returns associated visibility array.
|
| Args:
| ()
|
| Returns:
| std::vector
|
| 2. get_visibility_array(self, )
| <unsigned char, std::allocator<unsigned char> >
|
| Returns associated visibility array (const version).
|
| Args:
| ()
|
| Returns:
| std::vector
|
| get_visible_points(...)
| get_visible_points(self, vis_table, , silent=False)
| Returns a ReferenceCloud equivalent to the visibility array.
|
| Args:
| vis_table (std::vector)
| ()
| silent (bool, optional, default=False)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ReferenceCloud
|
| import_parameters_from(...)
| import_parameters_from(self, source)
| Imports the parameters from another cloud
|
| Args:
| source (cloudViewer.cpu.pybind.geometry.ccGenericPointCloud)
|
| Returns:
| None
|
| invert_visibility_array(...)
| invert_visibility_array(self)
| Inverts the visibility array
|
| Returns:
| None
|
| is_visibility_table_instantiated(...)
| is_visibility_table_instantiated(self)
| Returns whether the visibility array is allocated or not
|
| Returns:
| bool
|
| refresh_bbox(...)
| refresh_bbox(self)
| Forces bounding-box update.
|
| Returns:
| None
|
| remove_points(...)
| remove_points(self, index)
| Remove points.
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| None
|
| reset_visibility_array(...)
| reset_visibility_array(self)
| Resets the associated visibility array
|
| Returns:
| bool
|
| set_point_size(...)
| set_point_size(self, size)
| Sets point size
|
| Args:
| size (typing.SupportsInt)
|
| Returns:
| None
|
| unallocate_visibility_array(...)
| unallocate_visibility_array(self)
| Erases the points visibility information
|
| Returns:
| None
|
| ----------------------------------------------------------------------
| Methods inherited from GenericIndexedCloudPersist:
|
| get_point_persistent(...)
| get_point_persistent(self, index)
| Returns the ith point as a persistent point).
|
| Args:
| index (typing.SupportsInt)
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| ----------------------------------------------------------------------
| Methods inherited from GenericCloud:
|
| enable_scalar_field(...)
| enable_scalar_field(self)
| Enables the scalar field associated to the cloud.
|
| Returns:
| bool
|
| get_bounding_box(...)
| get_bounding_box(self)
| Returns the cloud bounding box.
|
| Returns:
| tuple[typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"], typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]]
|
| get_next_point(...)
| get_next_point(self)
| Returns the next point (relatively to the global iterator position).
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_scalar_value(...)
| get_scalar_value(self, point_index)
| Returns the ith point associated scalar value.
|
| Args:
| point_index (typing.SupportsInt)
|
| Returns:
| float
|
| has_points(...)
| has_points(self)
| Returns whether has points.
|
| Returns:
| bool
|
| is_scalar_field_enabled(...)
| is_scalar_field_enabled(self)
| Returns true if the scalar field is enabled, false otherwise.
|
| Returns:
| bool
|
| place_iterator_at_beginning(...)
| place_iterator_at_beginning(self)
| Sets the cloud iterator at the beginning.
|
| Returns:
| None
|
| set_scalar_value(...)
| set_scalar_value(self, point_index, value)
| Sets the ith point associated scalar value.
|
| Args:
| point_index (typing.SupportsInt)
| value (typing.SupportsFloat)
|
| Returns:
| None
|
| size(...)
| size(self)
| Returns the number of points.
|
| Returns:
| int
|
| test_visibility(...)
| test_visibility(self, point)
| Returns a given point visibility state (relatively to a sensor for instance).
|
| Args:
| point (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): the 3D point to test, return visibility (default: POINT_VISIBLE)Generic method to request a point visibility (should be overloaded if this functionality is required).The point visibility is such as defined in Daniel Girardeau - Montaut's PhD manuscript (see Chapter 2, section 2 - 3 - 3).In this case, a ground based laser sensor model should be used to determine it.This method is called before performing any point - to - cloud comparison.If the result is notPOINT_VISIBLE, then the comparison won't be performed and the scalar field value associatedto this point will be this visibility value.
|
| Returns:
| int
|
| ----------------------------------------------------------------------
| Methods inherited from ccHObject:
|
| add_child(...)
| add_child(self, child, dependencyFlags=24, insertIndex=-1)
| Adds a child.
|
| Args:
| child (cloudViewer.cpu.pybind.geometry.ccHObject): child instance geometry
| dependencyFlags (typing.SupportsInt, optional, default=24): dependency flags
| insertIndex (typing.SupportsInt, optional, default=-1): insertion index (if <0, child is simply appended to the children list)
|
| Returns:
| bool
|
| filter_children(...)
| filter_children(self, recursive=False, filter=<Type.???: 0>, strict=False)
| Collects the children corresponding to a certain pattern.
|
| Args:
| recursive (bool, optional, default=False): specifies if the search should be recursive
| filter (typing.SupportsInt, optional, default=<Type.???: 0>): pattern for children selection
| strict (bool, optional, default=False): whether the search is strict on the type (i.e 'isA') or not (i.e. 'isKindOf')
|
| Returns:
| list[cloudViewer.cpu.pybind.geometry.ccHObject]
|
| find(...)
| find(self, unique_id)
| Finds an entity in this object hierarchy.
|
| Args:
| unique_id (typing.SupportsInt)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| from_file(...)
| from_file(self, filename, dataVersion, flags)
| Loads data from binary stream.
|
| Args:
| filename (str)
| dataVersion (typing.SupportsInt): file version
| flags (typing.SupportsInt): deserialization flags (see ccSerializableObject::DeserializationFlags)
|
| Returns:
| bool
|
| get_axis_aligned_bounding_box(...)
| get_axis_aligned_bounding_box(self)
| Returns an axis-aligned bounding box of the geometry.
|
| Returns:
| ccBBox
|
| get_center(...)
| get_center(self)
| Returns the center of the geometry coordinates.
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_child(...)
| get_child(self, childPos)
| Returns the ith child.
|
| Args:
| childPos (typing.SupportsInt): child position
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| get_children_number(...)
| get_children_number(self)
| Returns the number of children.
|
| Returns:
| int
|
| get_class_id(...)
| get_class_id(self)
| Returns class ID.
|
| Returns:
| int
|
| get_glTransformation_history(...)
| get_glTransformation_history(self)
| Returns the transformation 'history' matrix.
|
| Returns:
| ccGLMatrix
|
| get_max_2Dbound(...)
| get_max_2Dbound(self)
| Returns max 2d bounds for geometry coordinates.
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[2, 1]"]
|
| get_max_bound(...)
| get_max_bound(self)
| Returns max bounds for geometry coordinates.
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_min_2Dbound(...)
| get_min_2Dbound(self)
| Returns min 2d bounds for geometry coordinates.
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[2, 1]"]
|
| get_min_bound(...)
| get_min_bound(self)
| Returns min bounds for geometry coordinates.
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| get_oriented_bounding_box(...)
| get_oriented_bounding_box(self)
| Returns an oriented bounding box of the geometry.
|
| Returns:
| ecvOrientedBBox
|
| get_own_bounding_box(...)
| get_own_bounding_box(self, withGLFeatures=False)
| Returns an axis-aligned bounding box of the geometry.
|
| Args:
| withGLFeatures (bool, optional, default=False): whether use openGL features.
|
| Returns:
| ccBBox
|
| get_parent(...)
| get_parent(self)
| Returns parent object.
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| is_empty(...)
| is_empty(self)
| Returns ``True`` if the geometry is empty.
|
| Returns:
| bool
|
| is_group(...)
| is_group(self)
| Returns whether the instance is a group.
|
| Returns:
| bool
|
| is_serializable(...)
| is_serializable(self)
| Returns whether the instance is a serializable.
|
| Returns:
| bool
|
| minimum_file_version(...)
| minimum_file_version(self: cloudViewer.cpu.pybind.geometry.ccHObject) -> int
|
| Returns the minimum file version required to save this object
|
| remove_all_children(...)
| remove_all_children(self)
| Clear all children in the geometry.
|
| Returns:
| None
|
| remove_child(...)
| remove_child(*args, **kwargs)
| Overloaded function.
|
| 1. remove_child(self: cloudViewer.cpu.pybind.geometry.ccHObject, child: cloudViewer.cpu.pybind.geometry.ccHObject) -> None
|
| Removes a specific child.
|
| 2. remove_child(self: cloudViewer.cpu.pybind.geometry.ccHObject, pos: typing.SupportsInt) -> None
|
| Removes a specific child given its index.
|
| reset_glTransformation_history(...)
| reset_glTransformation_history(self)
| Resets the transformation 'history' matrix.
|
| Returns:
| None
|
| rotate(...)
| rotate(*args, **kwargs)
| Overloaded function.
|
|
| 1. rotate(self, R)
| Apply rotation to the geometry coordinates and normals.
|
| Args:
| R (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): The rotation matrix
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| 2. rotate(self, R, center)
| Apply rotation to the geometry coordinates and normals.
|
| Args:
| R (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): The rotation matrix
| center (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): Rotation center used for transformation
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| scale(...)
| scale(*args, **kwargs)
| Overloaded function.
|
|
| 1. scale(self, scale)
| Apply scaling to the geometry coordinates.
|
| Args:
| scale (typing.SupportsFloat)
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| 2. scale(self, scale, center)
| Apply scaling to the geometry coordinates.
|
| Args:
| scale (typing.SupportsFloat)
| center (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): Scale center used for transformation
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| set_glTransformation_history(...)
| set_glTransformation_history(self, mat)
| Sets the transformation 'history' matrix (handle with care!).
|
| Args:
| mat (ccGLMatrix): transformation 'history' matrix
|
| Returns:
| None
|
| set_lineWidth_recursive(...)
| set_lineWidth_recursive(self, width)
| Sets the line width.
|
| Args:
| width (typing.SupportsFloat): line width
|
| Returns:
| None
|
| set_pointSize_recursive(...)
| set_pointSize_recursive(self, pSize)
| Sets the point size.
|
| Args:
| pSize (typing.SupportsInt): point size
|
| Returns:
| None
|
| to_file(...)
| to_file(self, filename, data_version)
| Saves data to binary stream.
|
| Args:
| filename (str)
| data_version (typing.SupportsInt)
|
| Returns:
| bool
|
| transform(...)
| transform(self, arg0)
| Apply transformation (4x4 matrix) to the geometry coordinates.
|
| Args:
| arg0 (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| translate(...)
| translate(self, translation, relative=True)
| Apply translation to the geometry coordinates.
|
| Args:
| translation (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): A 3D vector to transform the geometry
| relative (bool, optional, default=True): If true, the translation vector is directly added to the geometry coordinates. Otherwise, the center is moved to the translation vector.
|
| Returns:
| cloudViewer.cpu.pybind.geometry.ccHObject
|
| ----------------------------------------------------------------------
| Static methods inherited from ccHObject:
|
| New(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| New(*args, **kwargs)
| Overloaded function.
|
| 1. New(objectType: typing.SupportsInt, name: str = None) -> cloudViewer.cpu.pybind.geometry.ccHObject
|
| 2. New(pluginId: QString, classId: QString, name: str = None) -> cloudViewer.cpu.pybind.geometry.ccHObject
|
| get_rotation_matrix_from_axis_angle(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_axis_angle(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_euler_angle(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_euler_angle(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_quaternion(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_quaternion(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[4, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_xyz(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_xyz(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_xzy(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_xzy(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_yxz(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_yxz(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_yzx(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_yzx(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_zxy(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_zxy(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| get_rotation_matrix_from_zyx(...) from builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1
| get_rotation_matrix_from_zyx(rotation: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 3]"]
|
| ----------------------------------------------------------------------
| Methods inherited from ccObject:
|
| get_name(...)
| get_name(self)
| Returns object name.
|
| Returns:
| str
|
| get_unique_id(...)
| get_unique_id(self)
| Returns object unique ID.
|
| Returns:
| int
|
| is_a(...)
| is_a(self, type)
| Returns whether the geometry is a type pointed.
|
| Args:
| type (typing.SupportsInt)
|
| Returns:
| bool
|
| is_custom(...)
| is_custom(self)
| Returns whether the geometry is custom.
|
| Returns:
| bool
|
| is_hierarchy(...)
| is_hierarchy(self)
| Returns whether the geometry is hierarchy.
|
| Returns:
| bool
|
| is_kind_of(...)
| is_kind_of(self, type)
| Returns whether the geometry is kind of the type pointed.
|
| Args:
| type (typing.SupportsInt)
|
| Returns:
| bool
|
| is_leaf(...)
| is_leaf(self)
| Returns whether the geometry is leaf.
|
| Returns:
| bool
|
| set_name(...)
| set_name(self, arg0)
| Sets object name.
|
| Args:
| arg0 (str)
|
| Returns:
| None
|
| set_unique_id(...)
| set_unique_id(self, ID)
| Changes unique ID.
|
| Args:
| ID (typing.SupportsInt)
|
| Returns:
| None
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from ccObject:
|
| BBOX = <Type.BBOX: 35184372088835>
|
| BOX = <Type.BOX: 524809>
|
| CAMERA_SENSOR = <Type.CAMERA_SENSOR: 4294975489>
|
| CONE = <Type.CONE: 262665>
|
| CUSTOM_H_OBJECT = <Type.CUSTOM_H_OBJECT: 129>
|
| CYLINDER = <Type.CYLINDER: 393737>
|
| DISH = <Type.DISH: 1049097>
|
| EXTRU = <Type.EXTRU: 2097673>
|
| FACET = <Type.FACET: 8388609>
|
| GBL_SENSOR = <Type.GBL_SENSOR: 134225921>
|
| IMAGE = <Type.IMAGE: 4097>
|
| IMAGE2 = <Type.IMAGE2: 562949953421315>
|
| LABEL_2D = <Type.LABEL_2D: 35>
|
| LINESET = <Type.LINESET: 2251799813685249>
|
| MATERIAL_SET = <Type.MATERIAL_SET: 16777222>
|
| MESH = <Type.MESH: 513>
|
| MESH_GROUP = <Type.MESH_GROUP: 517>
|
| OLD_CYLINDER_ID = <Type.OLD_CYLINDER_ID: 131593>
|
| ORIENTED_BBOX = <Type.ORIENTED_BBOX: 70368744177667>
|
| PLANE = <Type.PLANE: 16905>
|
| POINT_CLOUD = <Type.POINT_CLOUD: 257>
|
| POINT_KDTREE = <Type.POINT_KDTREE: 4194307>
|
| POINT_OCTREE = <Type.POINT_OCTREE: 1027>
|
| POINT_OCTREE2 = <Type.POINT_OCTREE2: 140737488355331>
|
| POLY_LINE = <Type.POLY_LINE: 2049>
|
| PRIMITIVE = <Type.PRIMITIVE: 521>
|
| QUADRIC = <Type.QUADRIC: 8589935113>
|
| RGBD_IMAGE = <Type.RGBD_IMAGE: 1125899906842627>
|
| SENSOR = <Type.SENSOR: 8193>
|
| SPHERE = <Type.SPHERE: 33289>
|
| SUB_MESH = <Type.SUB_MESH: 515>
|
| TETRA_MESH = <Type.TETRA_MESH: 27021597764222977>
|
| TORUS = <Type.TORUS: 66057>
|
| Type = <class 'cloudViewer.cpu.pybind.geometry.ccObject.Type'>
|
| VIEWPORT_2D_LABEL = <Type.VIEWPORT_2D_LABEL: 99>
|
| VIEWPORT_2D_OBJECT = <Type.VIEWPORT_2D_OBJECT: 67>
|
| VOXEL_GRID = <Type.VOXEL_GRID: 281474976710657>
|
| ----------------------------------------------------------------------
| Methods inherited from ccDrawableObject:
|
| colors_shown(...)
| colors_shown(self)
| Returns whether colors are shown or not.
|
| Returns:
| bool
|
| enable_gl_transformation(...)
| enable_gl_transformation(self, state)
| Enables/disables associated GL transformation.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| enable_temp_color(...)
| enable_temp_color(self, state)
| Set temporary color activation state.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| get_gl_transformation(...)
| get_gl_transformation(self)
| Returns associated GL transformation.
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float32], "[4, 4]"]
|
| get_opacity(...)
| get_opacity(self)
| Get opacity.
|
| Returns:
| float
|
| get_temp_color(...)
| get_temp_color(self)
| Returns current temporary (unique) color.
|
| Returns:
| typing.Annotated[numpy.typing.NDArray[numpy.float64], "[3, 1]"]
|
| has_colors(...)
| has_colors(self)
| Returns whether colors are enabled or not.
|
| Returns:
| bool
|
| has_displayed_scalar_field(...)
| has_displayed_scalar_field(self)
| Returns whether an active scalar field is available or not.
|
| Returns:
| bool
|
| has_normals(...)
| has_normals(self)
| Returns whether normals are enabled or not.
|
| Returns:
| bool
|
| has_scalar_fields(...)
| has_scalar_fields(self)
| Returns whether one or more scalar fields are instantiated.
|
| Returns:
| bool
|
| is_color_overriden(...)
| is_color_overriden(self)
| Returns whether colors are currently overridden by a temporary (unique) color.
|
| Returns:
| bool
|
| is_gl_trans_enabled(...)
| is_gl_trans_enabled(self)
| Returns whether a GL transformation is enabled or not.
|
| Returns:
| bool
|
| is_selected(...)
| is_selected(self)
| Returns whether entity is selected or not.
|
| Returns:
| bool
|
| is_visible(...)
| is_visible(self)
| Returns whether entity is visible or not.
|
| Returns:
| bool
|
| is_visiblity_locked(...)
| is_visiblity_locked(self)
| Returns whether visibility is locked or not.
|
| Returns:
| bool
|
| lock_visibility(...)
| lock_visibility(self, state)
| Locks/unlocks visibility.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| name_3d_shown(...)
| name_3d_shown(self)
| Returns whether name is displayed in 3D or not.
|
| Returns:
| bool
|
| normals_shown(...)
| normals_shown(self)
| Returns whether normals are shown or not.
|
| Returns:
| bool
|
| reset_gl_transformation(...)
| reset_gl_transformation(self)
| Resets associated GL transformation.
|
| Returns:
| None
|
| rotate_gl(...)
| rotate_gl(self, rotation)
| Multiplies (left) current GL transformation by a rotation matrix.
|
| Args:
| rotation (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
|
| Returns:
| None
|
| set_gl_transformation(...)
| set_gl_transformation(self, transformation)
| Associates entity with a GL transformation (rotation + translation).
|
| Args:
| transformation (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
|
| Returns:
| None
|
| set_opacity(...)
| set_opacity(self, opacity)
| Set opacity activation state.
|
| Args:
| opacity (typing.SupportsFloat)
|
| Returns:
| None
|
| set_selected(...)
| set_selected(self, state)
| Selects/Unselects entity.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| set_temp_color(...)
| set_temp_color(self, color, auto_activate=True)
| Sets current temporary (unique).
|
| Args:
| color (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, ): rgb color
| auto_activate (bool, optional, default=True): auto activates temporary color
|
| Returns:
| None
|
| set_visible(...)
| set_visible(self, state)
| Sets entity visibility.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| sf_shown(...)
| sf_shown(self)
| Returns whether active scalar field is visible.
|
| Returns:
| bool
|
| show_3d_name(...)
| show_3d_name(self, state)
| Sets whether name should be displayed in 3D.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| show_colors(...)
| show_colors(self, state)
| Sets colors visibility.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| show_normals(...)
| show_normals(self, state)
| Sets normals visibility.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| show_sf(...)
| show_sf(self, state)
| Sets active scalar field visibility.
|
| Args:
| state (bool)
|
| Returns:
| None
|
| toggle_colors(...)
| toggle_colors(self)
| Toggles colors display state.
|
| Returns:
| None
|
| toggle_materials(...)
| toggle_materials(self)
| Toggles material display state.
|
| Returns:
| None
|
| toggle_normals(...)
| toggle_normals(self)
| Toggles normals display state.
|
| Returns:
| None
|
| toggle_sf(...)
| toggle_sf(self)
| Toggles SF display state.
|
| Returns:
| None
|
| toggle_show_name(...)
| toggle_show_name(self)
| Toggles name in 3D display state.
|
| Returns:
| None
|
| toggle_visibility(...)
| toggle_visibility(self)
| Toggles visibility.
|
| Returns:
| None
|
| translate_gl(...)
| translate_gl(self, translation)
| Translates current GL transformation by a rotation matrix.
|
| Args:
| translation (typing.Annotated[numpy.typing.ArrayLike, numpy.float64, )
|
| Returns:
| None
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.
Description of a function in CloudViewer#
help(cloudViewer.read_point_cloud) provides a description of the input arguments and return type of the read_point_cloud function.
[5]:
help(cv3d.io.read_point_cloud)
Help on built-in function read_point_cloud in module cloudViewer.cpu.pybind.io:
read_point_cloud(...) method of builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1 instance
read_point_cloud(filename, format='auto', remove_nan_points=False, remove_infinite_points=False, print_progress=False)
Function to read PointCloud from file
Args:
filename (Union[os.PathLike, str, bytes]): Path to file.
format (str, optional, default='auto'): The format of the input file. When not specified or set as ``auto``, the format is inferred from file extension name.
remove_nan_points (bool, optional, default=False): If true, all points that include a NaN are removed from the PointCloud.
remove_infinite_points (bool, optional, default=False): If true, all points that include an infinite value are removed from the PointCloud.
print_progress (bool, optional, default=False): If set to true a progress bar is visualized in the console
Returns:
cloudViewer.cpu.pybind.geometry.ccPointCloud