geo3d.visualization.visualizer ============================== .. py:module:: geo3d.visualization.visualizer Classes ------- .. autoapisummary:: geo3d.visualization.visualizer.PointCloudColorizer geo3d.visualization.visualizer.ValidationVisualizer Functions --------- .. autoapisummary:: geo3d.visualization.visualizer.visualize Module Contents --------------- .. py:class:: PointCloudColorizer(object_cmap: str = 'plasma', background_cmap: str = 'viridis', background_dim: str = 'Intensity', labels_cmap: dict = COLOR_MAP, background_subclasses: list = CUSTOM_VIZ_MAPPING) Handles different methods of colorizing point clouds. .. py:attribute:: object_cmap :value: 'plasma' .. py:attribute:: background_cmap :value: 'viridis' .. py:attribute:: background_dim :value: 'Intensity' .. py:attribute:: labels_cmap .. py:attribute:: background_subclasses .. py:method:: colorize(method: str, pcd_array: numpy.ndarray, label: int) -> List[open3d.geometry.PointCloud] Get the colorize function. :param method: A choice from 3 methods: 'background_colors', 'label_colors', or 'subclass_colors'. :type method: str :param pcd_array: The point cloud array as a structured numpy array. :type pcd_array: np.ndarray :param label: The label of the object to highlight. :type label: int :returns: The colorization method. :rtype: Callable .. py:method:: _colorize_with_background(pcd_array: numpy.ndarray, label: int) -> List[open3d.geometry.PointCloud] Colorize an array containing an object and other labels. The main object is colorized using a colormap defined according to the object's 'Z' axis. The rest of the point cloud is colorized using a colormap defined according to a dimension. :param pcd_array: An array of point cloud as read from pdal. It should contain coordinates as well as other dimensions like 'Intensity'. :type pcd_array: np.ndarray :param label: The label number of the object. :type label: int :returns: (np.ndarray) An array containing colorized point clouds. .. py:method:: _colorize_with_label(pcd_array: numpy.ndarray, label: int) -> List[open3d.geometry.PointCloud] Colorize an array containing an object and other labels. The main object is colorized using a colormap defined according to the object's 'Z' axis. For the rest of the point cloud, each label is colorized uniformly using a colormap dictionary. :param pcd_array: An array of point cloud as read from pdal. It should contain coordinates as well as other dimensions like 'Intensity'. :type pcd_array: np.ndarray :param label: The label number of the object. :type label: int :returns: (np.ndarray) An array containing colorized point clouds. .. py:method:: _colorize_with_subclass(pcd_array: numpy.ndarray, label: int) -> List[open3d.geometry.PointCloud] Colorize an array containing an object and other labels. The main object is colorized using a colormap defined according to the object's 'Z' axis. For the rest of the point cloud, each label is colorized uniformly using a colormap dictionary. :param pcd_array: An array of point cloud as read from pdal. It should contain coordinates as well as other dimensions like 'Intensity'. :type pcd_array: np.ndarray :param label: The label number of the object. :type label: int :returns: (np.ndarray) An array containing colorized point clouds. .. py:method:: _colorize_with_default(pcd_array: numpy.ndarray) -> List[open3d.geometry.PointCloud] Colorize in default the entered point cloud array. :param pcd_array: An array of point cloud as read from pdal. It should contain coordinates as well as other dimensions like 'Intensity'. :type pcd_array: np.ndarray :returns: (np.ndarray) An array containing uncolored point clouds. .. py:class:: ValidationVisualizer(method: str, object_cmap: str = 'plasma', background_cmap: str = 'viridis', background_dim: str = 'Intensity', labels_cmap: dict = COLOR_MAP, background_subclasses: list = CUSTOM_VIZ_MAPPING, visualizer_background: tuple = (1, 1, 1), visualizer_point_size: int = 3) A class for visualizing objects for validation. .. py:attribute:: method .. py:attribute:: colorizer .. py:attribute:: object_cmap :value: 'plasma' .. py:attribute:: background_cmap :value: 'viridis' .. py:attribute:: background_dim :value: 'Intensity' .. py:attribute:: labels_cmap .. py:attribute:: background_subclasses .. py:attribute:: visualizer_background :value: (1, 1, 1) .. py:attribute:: visualizer_point_size :value: 3 .. py:attribute:: colorized_pcd :value: [] .. py:method:: plot(pcd_array: numpy.ndarray, label: int) -> None Plot method. :param pcd_array: The point cloud array. :type pcd_array: np.ndarray :param label: The label to highlight. :type label: str .. py:function:: visualize(geometries: list, background_color: tuple = (1, 1, 1), point_size: int = 3) -> None Create a visualization window for the list of geometries. :param geometries: A list of geometries to be visualized (open3d.geometry.Geometry). :type geometries: list :param background_color: A tuple of RGB values of the background color. Defaults to white (1, 1, 1). :type background_color: tuple :param point_size: The size of points in the visualization. Defaults to 3. :type point_size: int :returns: None