FusedPointCloud Class Reference

A fused point cloud contains both geometric and color data of the scene captured by spatial mapping. More...

Functions

def chunks (self)
 contains the list of chunks
 
def __getitem__ (self, x)
 gets a chunk from the list
 
def vertices (self)
 Vertices are defined by colored 3D points {x, y, z, rgba}. More...
 
def normals (self)
 Normals are defined by three components, {nx, ny, nz}. More...
 
def save (self, str filename, typeMesh=MESH_FILE_FORMAT.OBJ, id=[])
 Saves the current fused point cloud into a file. More...
 
def load (self, str filename, update_chunk_only=True)
 Loads the fused point cloud from a file. More...
 
def clear (self)
 Clears all the data.
 
def update_from_chunklist (self, id=[])
 Updates vertices / normals / colors from chunks' data pointed by the given chunk list. More...
 
def get_number_of_points (self)
 Computes the total number of triangles stored in all chunks. More...
 

Detailed Description

A fused point cloud contains both geometric and color data of the scene captured by spatial mapping.

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 fused point cloud is changed.

Functions

◆ vertices()

def vertices (   self)

Vertices are defined by colored 3D points {x, y, z, rgba}.

The information is stored in a numpy array.

◆ normals()

def normals (   self)

Normals are defined by three components, {nx, ny, nz}.

Normals are defined for each vertices. The information is stored in a numpy array.

◆ save()

def save (   self,
str  filename,
  typeMesh = MESH_FILE_FORMAT.OBJ,
  id = [] 
)

Saves the current fused point cloud into a file.

Parameters
filename: the path and filename of the mesh.
typeMesh: defines the file type (extension). default : MESH_FILE_FORMAT.OBJ.
id: Specifies a set of chunks to be saved, if none provided all chunks are saved. default : (empty).
Returns
True if the file was successfully saved, false otherwise.
Note
Only MESH_FILE_FORMAT.OBJ support textures data.
This function operates on the fused point cloud not on the chunks. This way you can save different parts of your fused point cloud (update with update_from_chunklist).

◆ load()

def load (   self,
str  filename,
  update_chunk_only = True 
)

Loads the fused point cloud from a file.

Parameters
filename: the path and filename of the fused point cloud (do not forget the extension).
update_chunk_only: if set to false the fused point cloud data (vertices/normals) are updated otherwise only the chunk data is updated. default : true.
Returns
True if the loading was successful, false otherwise.
Note
Updating the fused point cloud is time consuming, consider using only chunks for better performances.

◆ update_from_chunklist()

def update_from_chunklist (   self,
  id = [] 
)

Updates vertices / normals / colors from chunks' data pointed by the given chunk list.

Parameters
id: the indices of chunks which will be concatenated. default : (empty).
Note
If the given chunkList is empty, all chunks will be used.

◆ get_number_of_points()

def get_number_of_points (   self)

Computes the total number of triangles stored in all chunks.

Returns
The number of points stored in all chunks.