PclViewer¶
- class PclViewer(self: visp._visp.gui.PclViewer, title: str, width: int = 640, height: int = 480, posU: int = 720, posV: int = 560, outFolder: str = std::string(), ignoreThreshold: float = 0.95)¶
Bases:
pybind11_object
This class enables real time plotting of 3D point clouds. It relies on the PCL library. To see how to install PCL library, please refer to the soft_tool_pcl section. You can either plot in a non-blocking threaded manner or in a blocking manner. The point clouds can be displayed using their original colors, or using uniform colors to match a legend. Additionally, it is possible to use confidence weights to hide points that are not trusted. These weights can result from a robust estimation using for instance the vpRobust class.
Warning
If you face some runtime errors with the following class, please refer to the pcl_viewer_known_issues section to see if it is a known problem.
Note
See tutorial-pcl-viewer
Construct a new vpPclViewer object.
- Parameters:
- title
The title of the window of the viewer.
- width
The width of the window of the viewer.
- height
The height of the window of the viewer.
- posU
The position on the horizontal axis of the screen of the window of the viewer.
- posV
The position on the vertical axis of the screen of the window of the viewer.
- outFolder
If different from the empty string, the point clouds will be saved in this folder.
- ignoreThreshold
A point for which the weight is below this threshold will be displayed in black.
Methods
Construct a new vpPclViewer object.
Overloaded function.
Blocking-mode display of the viewer.
Start the drawing thread that permits to have a non-blocking display.
Refresh the display.
Set the threshold below which a point must be displayed in black.
Set the name of the PCL viewer window.
Set the path to the output folder.
Stop the drawing thread that permits to have a non-blocking display.
Overloaded function.
Inherited Methods
Operators
__doc__
Construct a new vpPclViewer object.
__module__
Attributes
__annotations__
- __init__(self: visp._visp.gui.PclViewer, title: str, width: int = 640, height: int = 480, posU: int = 720, posV: int = 560, outFolder: str = std::string(), ignoreThreshold: float = 0.95)¶
Construct a new vpPclViewer object.
- Parameters:
- title
The title of the window of the viewer.
- width
The width of the window of the viewer.
- height
The height of the window of the viewer.
- posU
The position on the horizontal axis of the screen of the window of the viewer.
- posV
The position on the vertical axis of the screen of the window of the viewer.
- outFolder
If different from the empty string, the point clouds will be saved in this folder.
- ignoreThreshold
A point for which the weight is below this threshold will be displayed in black.
- addSurface(*args, **kwargs)¶
Overloaded function.
addSurface(self: visp._visp.gui.PclViewer, surface: pcl::PointCloud<pcl::PointXYZRGB>, name: str = , v_color: list[int] = []) -> int
Add a surface to the list of point clouds known by the viewer.
- Parameters:
- surface
The surface that must be knwon to be displayed by the PCL viewer.
- name
The name of the surface that will be displayed in the legend. If empty, it will be automatically generated.
- v_color
A vector containing the 3 RGB values.
- Returns:
unsigned int The ID by which is known the point cloud by the viewer.
addSurface(self: visp._visp.gui.PclViewer, surface: pcl::PointCloud<pcl::PointXYZRGB>, weights: visp._visp.core.ColVector, name: str = , v_color: list[int] = []) -> int
Add a surface to the list of point clouds known by the viewer. The points whose weights are below the ** vpPclViewer::s_ignoreThresh ** wil be displayed in black.
- Parameters:
- surface
The surface that must be knwon to be displayed by the PCL viewer.
- weights
The confidence weights of each points. Must be between 0 and 1.
- name
The name of the surface that will be displayed in the legend. If empty, it will be automatically generated.
- v_color
A vector containing the 3 RGB values.
- Returns:
unsigned int The ID by which is known the point cloud by the viewer.
- setIgnoreThreshold(self, thresh: float) None ¶
Set the threshold below which a point must be displayed in black.
- setNameWindow(self, nameWindow: str) None ¶
Set the name of the PCL viewer window.
- setOutFolder(self, outputFolder: str) None ¶
Set the path to the output folder. If different from the empty string, the point clouds will be saved in this folder.
- updateSurface(*args, **kwargs)¶
Overloaded function.
updateSurface(self: visp._visp.gui.PclViewer, surface: pcl::PointCloud<pcl::PointXYZRGB>, id: int, hasToKeepColor: bool = false) -> None
Update the surface known by id by the viewer.
- Parameters:
- surface
The updated surface.
- id
The ID of the surface that must be updated.
- hasToKeepColor
If true, will be displayed in its original color. Otherwise, will be displayed in its default color.
updateSurface(self: visp._visp.gui.PclViewer, surface: pcl::PointCloud<pcl::PointXYZRGB>, id: int, weights: visp._visp.core.ColVector, hasToKeepColor: bool = false) -> None
Update the surface known by id by the viewer.
- Parameters:
- surface
The updated surface.
- id
The ID of the surface that must be updated.
- weights
The confidence weights of each points.
- hasToKeepColor
If true, will be displayed in its original color. Otherwise, will be displayed in its default color.