Class representing a fused point cloud and containing the geometric and color data of the scene captured by the spatial mapping module. More...
Functions | |
| list[PointCloudChunk] | chunks (self) |
| List of chunks constituting the sl.FusedPointCloud. | |
| PointCloudChunk | __getitem__ (self, x) |
| Gets a chunk from chunks. | |
| np.array[float] | vertices (self) |
| NumPy array of vertices. More... | |
| np.array[float] | normals (self) |
| NumPy array of normals. More... | |
| bool | save (self, str filename, typeMesh=MESH_FILE_FORMAT.OBJ, id=[]) |
| Saves the current sl.FusedPointCloud into a file. More... | |
| bool | load (self, str filename, update_chunk_only=False) |
| Loads the fused point cloud from a file. More... | |
| None | clear (self) |
| Clears all the data. | |
| None | update_from_chunklist (self, id=[]) |
| Updates vertices and normals from chunk data pointed by the given list of id. More... | |
| int | get_number_of_points (self) |
| Computes the total number of points stored in all chunks. More... | |
Class representing a fused point cloud and containing the geometric and color data of the scene captured by the spatial mapping module.
By default the fused point cloud is defined as a set of point cloud chunks.
This way we update only the required data, avoiding a time consuming remapping process every time a small part of the sl.FusedPointCloud cloud is changed.
| np.array[float] vertices | ( | self | ) |
NumPy array of vertices.
Vertices are defined by a colored 3D point [x, y, z, rgba].
| np.array[float] normals | ( | self | ) |
NumPy array of normals.
Normals are defined by three components [nx, ny, nz].
| bool save | ( | self, | |
| str | filename, | ||
typeMesh = MESH_FILE_FORMAT.OBJ, |
|||
id = [] |
|||
| ) |
Saves the current sl.FusedPointCloud into a file.
| filename | : Path of the file to store the fused point cloud in. |
| typeMesh | : File extension type. Default: sl.MESH_FILE_FORMAT.OBJ. |
| id | : Set of chunks to be saved. Default: (empty) (all chunks are saved) |
| bool load | ( | self, | |
| str | filename, | ||
update_chunk_only = False |
|||
| ) |
Loads the fused point cloud from a file.
| filename | : Path of the file to load the fused point cloud from. |
| update_chunk_only | : Whether to only load data in chunks (and not vertices / normals). Default: False. |
| None update_from_chunklist | ( | self, | |
id = [] |
|||
| ) |
Updates vertices and normals from chunk data pointed by the given list of id.
| id | : Indices of chunks which will be concatenated. Default: (empty). |
| int get_number_of_points | ( | self | ) |
Computes the total number of points stored in all chunks.