RuntimeParameters Class Reference

Class containing parameters that defines the behavior of sl.Camera.grab(). More...

Functions

RuntimeParameters __cinit__ (self, enable_depth=True, enable_fill_mode=False, confidence_threshold=95, texture_confidence_threshold=100, measure3D_reference_frame=REFERENCE_FRAME.CAMERA, remove_saturated_areas=True)
 Default constructor. More...
 
bool save (self, str filename)
 Saves the current set of parameters into a file to be reloaded with the load() method. More...
 
bool load (self, str filename)
 Loads a set of parameters from the values contained in a previously saved file. More...
 
bool enable_depth (self)
 Defines if the depth map should be computed. More...
 
bool enable_fill_mode (self)
 Defines if the depth map should be completed or not. More...
 
REFERENCE_FRAME measure3D_reference_frame (self)
 Reference frame in which to provides the 3D measures (point cloud, normals, etc.). More...
 
int confidence_threshold (self)
 Threshold to reject depth values based on their confidence. More...
 
int texture_confidence_threshold (self)
 Threshold to reject depth values based on their texture confidence. More...
 
bool remove_saturated_areas (self)
 Defines if the saturated area (luminance>=255) must be removed from depth map estimation. More...
 

Detailed Description

Class containing parameters that defines the behavior of sl.Camera.grab().

The default constructor sets all parameters to their default settings.

Note
Parameters can be adjusted by the user.

Functions

◆ __cinit__()

RuntimeParameters __cinit__ (   self,
  enable_depth = True,
  enable_fill_mode = False,
  confidence_threshold = 95,
  texture_confidence_threshold = 100,
  measure3D_reference_frame = REFERENCE_FRAME.CAMERA,
  remove_saturated_areas = True 
)

Default constructor.

All the parameters are set to their default values.

Parameters
enable_depth: Activates enable_depth
enable_fill_mode: Activates enable_fill_mode
confidence_threshold: Chosen confidence_threshold
texture_confidence_threshold: Chosen texture_confidence_threshold
measure3D_reference_frame: Chosen measure3D_reference_frame
remove_saturated_areas: Activates remove_saturated_areas

◆ save()

bool save (   self,
str  filename 
)

Saves the current set of parameters into a file to be reloaded with the load() method.

Parameters
filename: Name of the file which will be created to store the parameters (extension '.yml' will be added if not set).
Returns
True if the file was successfully saved, otherwise False.
Warning
For security reasons, the file must not already exist.
In case a file already exists, the method will return False and existing file will not be updated.

◆ load()

bool load (   self,
str  filename 
)

Loads a set of parameters from the values contained in a previously saved file.

Parameters
filename: Path to the file from which the parameters will be loaded (extension '.yml' will be added at the end of the filename if not detected).
Returns
True if the file was successfully loaded, otherwise False.

◆ enable_depth()

bool enable_depth (   self)

Defines if the depth map should be computed.

Default: True

Note
If set to False, only the images are available.

◆ enable_fill_mode()

bool enable_fill_mode (   self)

Defines if the depth map should be completed or not.

Default: False

Note
It is similar to the removed sl.SENSING_MODE.FILL.
Warning
Enabling this will override the confidence values confidence_threshold and texture_confidence_threshold as well as remove_saturated_areas.

◆ measure3D_reference_frame()

REFERENCE_FRAME measure3D_reference_frame (   self)

Reference frame in which to provides the 3D measures (point cloud, normals, etc.).

Default: sl.REFERENCE_FRAME.CAMERA

◆ confidence_threshold()

int confidence_threshold (   self)

Threshold to reject depth values based on their confidence.

Each depth pixel has a corresponding confidence (sl.MEASURE.CONFIDENCE) in the range [1, 100].
Decreasing this value will remove depth data from both objects edges and low textured areas, to keep only confident depth estimation data.
Default: 95 (no depth pixel will be rejected)

Note
Pixels with a value close to 100 are not to be trusted. Accurate depth pixels tends to be closer to lower values.
It can be seen as a probability of error, scaled to 100.

◆ texture_confidence_threshold()

int texture_confidence_threshold (   self)

Threshold to reject depth values based on their texture confidence.

The texture confidence range is [1, 100].
Decreasing this value will remove depth data from image areas which are uniform.
Default: 100 (no depth pixel will be rejected)

Note
Pixels with a value close to 100 are not to be trusted. Accurate depth pixels tends to be closer to lower values.

◆ remove_saturated_areas()

bool remove_saturated_areas (   self)

Defines if the saturated area (luminance>=255) must be removed from depth map estimation.

Default: True

Note
It is recommended to keep this parameter at True because saturated area can create false detection.