Sets the spatial mapping parameters. More...
Functions | |
def | __cinit__ (self, resolution=MAPPING_RESOLUTION.MEDIUM, mapping_range=MAPPING_RANGE.AUTO, max_memory_usage=2048, save_texture=False, use_chunk_only=False, reverse_vertex_order=False, map_type=SPATIAL_MAP_TYPE.MESH) |
Constructor. More... | |
def | set_resolution (self, resolution=MAPPING_RESOLUTION.HIGH) |
Sets the resolution corresponding to the given MAPPING_RESOLUTION preset. More... | |
def | set_range (self, mapping_range=MAPPING_RANGE.AUTO) |
Sets the range corresponding to the given MAPPING_RANGE preset. More... | |
def | get_range_preset (self, mapping_range=MAPPING_RANGE.AUTO) |
Returns the maximum value of depth corresponding to the given MAPPING_RANGE presets. More... | |
def | get_resolution_preset (self, resolution=MAPPING_RESOLUTION.HIGH) |
Returns the resolution corresponding to the given MAPPING_RESOLUTION preset. More... | |
def | get_recommended_range (self, resolution, Camera py_cam) |
Returns the recommended maximum depth value for the given resolution. More... | |
def | map_type (self) |
The type of spatial map to be created. More... | |
def | max_memory_usage (self) |
The maximum CPU memory (in mega bytes) allocated for the meshing process. | |
def | save_texture (self) |
Set to true if you want to be able to apply the texture to your mesh after its creation. More... | |
def | use_chunk_only (self) |
Set to false if you want to ensure consistency between the mesh and its inner chunk data. More... | |
def | reverse_vertex_order (self) |
Specify if the order of the vertices of the triangles needs to be inverted. More... | |
def | allowed_range (self) |
Gets the range of the minimal/maximal depth value allowed by the spatial mapping in a numpy array. More... | |
def | range_meter (self) |
Depth range in meters. More... | |
def | allowed_resolution (self) |
Gets the range of the maximal depth value allowed by the spatial mapping in a numpy array. More... | |
def | resolution_meter (self) |
Spatial mapping resolution in meters, should fit allowed_resolution. | |
def | save (self, str filename) |
Saves the current set of parameters into a file. More... | |
def | load (self, str filename) |
Loads the values of the parameters contained in a file. More... | |
Sets the spatial mapping parameters.
Instantiating with the default constructor will set all parameters to their default values. You can customize these values to fit your application, and then save them to a preset to be loaded in future executions.
def __cinit__ | ( | self, | |
resolution = MAPPING_RESOLUTION.MEDIUM , |
|||
mapping_range = MAPPING_RANGE.AUTO , |
|||
max_memory_usage = 2048 , |
|||
save_texture = False , |
|||
use_chunk_only = False , |
|||
reverse_vertex_order = False , |
|||
map_type = SPATIAL_MAP_TYPE.MESH |
|||
) |
Constructor.
resolution | : the chosen MAPPING_RESOLUTION |
mapping_range | : the chosen MAPPING_RANGE |
max_memory_usage | : the chosen max_memory_usage |
save_texture | : activates save_texture |
use_chunk_only | : activates use_chunk_only |
reverse_vertex_order | : activates reverse_vertex_order |
map_type | : the chosen map_type |
def set_resolution | ( | self, | |
resolution = MAPPING_RESOLUTION.HIGH |
|||
) |
Sets the resolution corresponding to the given MAPPING_RESOLUTION preset.
resolution | : the desired MAPPING_RESOLUTION. default : MAPPING_RESOLUTION.HIGH. |
def set_range | ( | self, | |
mapping_range = MAPPING_RANGE.AUTO |
|||
) |
Sets the range corresponding to the given MAPPING_RANGE preset.
mapping_range | : the desired MAPPING_RANGE . default : MAPPING_RANGE.AUTO |
def get_range_preset | ( | self, | |
mapping_range = MAPPING_RANGE.AUTO |
|||
) |
Returns the maximum value of depth corresponding to the given MAPPING_RANGE presets.
range | : the desired MAPPING_RANGE . default : MAPPING_RANGE.AUTO |
def get_resolution_preset | ( | self, | |
resolution = MAPPING_RESOLUTION.HIGH |
|||
) |
Returns the resolution corresponding to the given MAPPING_RESOLUTION preset.
resolution | : the desired MAPPING_RESOLUTION . default : MAPPING_RESOLUTION.HIGH |
def get_recommended_range | ( | self, | |
resolution, | |||
Camera | py_cam | ||
) |
Returns the recommended maximum depth value for the given resolution.
resolution | : the desired resolution, either defined by a MAPPING_RESOLUTION preset or a resolution value in meters |
py_cam | : the Camera object which will run the spatial mapping. |
def map_type | ( | self | ) |
The type of spatial map to be created.
This dictates the format that will be used for the mapping(e.g. mesh, point cloud). See SPATIAL_MAP_TYPE
def save_texture | ( | self | ) |
Set to true if you want to be able to apply the texture to your mesh after its creation.
def use_chunk_only | ( | self | ) |
Set to false if you want to ensure consistency between the mesh and its inner chunk data.
def reverse_vertex_order | ( | self | ) |
Specify if the order of the vertices of the triangles needs to be inverted.
If your display process does not handle front and back face culling you can use this to set it right.
def allowed_range | ( | self | ) |
Gets the range of the minimal/maximal depth value allowed by the spatial mapping in a numpy array.
The first value of the array is the minimum value allowed. The second value of the array is the maximum value allowed.
def range_meter | ( | self | ) |
Depth range in meters.
Can be different from the value set by Camera.set_depth_max_range_value() Set to 0 by default. In this case, the range is computed from resolution_meter and from the current internal parameters to fit your application. Deprecated : Since SDK 2.6, we recommend leaving this to 0.
def allowed_resolution | ( | self | ) |
Gets the range of the maximal depth value allowed by the spatial mapping in a numpy array.
The first value of the array is the minimum value allowed. The second value of the array is the maximum value allowed.
def save | ( | self, | |
str | filename | ||
) |
Saves the current set of parameters into a file.
filename | : the path to the file in which the parameters will be stored. |
def load | ( | self, | |
str | filename | ||
) |
Loads the values of the parameters contained in a file.
filename | : the path to the file from which the parameters will be loaded. |