Structure containing a set of parameters for the body tracking module. More...
Functions | |
BodyTrackingParameters (bool enable_tracking_=true, bool enable_segmentation_=false, BODY_TRACKING_MODEL detection_model=BODY_TRACKING_MODEL::HUMAN_BODY_ACCURATE, bool enable_body_fitting_=false, float max_range_=-1.f, BODY_FORMAT body_format_=BODY_FORMAT::BODY_18, BODY_KEYPOINTS_SELECTION body_selection=BODY_KEYPOINTS_SELECTION::FULL, float prediction_timeout_s=0.2f, bool allow_reduced_precision_inference=false, unsigned int instance_id=0) | |
Default constructor. More... | |
bool | save (String filename, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) const |
Saves the current set of parameters into a file to be reloaded with the load() method. More... | |
bool | load (String filename, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) |
Loads a set of parameters from the values contained in a previously saved file. More... | |
bool | encode (String &serialized_content, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string. More... | |
bool | decode (const String &serialized_content, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) |
Fill the structure from the serialized json object contained in the input string. More... | |
bool | operator== (const BodyTrackingParameters ¶m1) const |
bool | operator!= (const BodyTrackingParameters ¶m1) const |
Attributes | |
unsigned int | instance_module_id = 0 |
Id of the module instance. More... | |
bool | enable_tracking = true |
Whether the body tracking system includes body/person tracking capabilities across a sequence of images. More... | |
bool | enable_segmentation = false |
Whether the body/person masks will be computed. More... | |
BODY_TRACKING_MODEL | detection_model = BODY_TRACKING_MODEL::HUMAN_BODY_ACCURATE |
sl::BODY_TRACKING_MODEL to use. More... | |
bool | enable_body_fitting = false |
Whether to apply the body fitting. More... | |
BODY_FORMAT | body_format = BODY_FORMAT::BODY_18 |
Body format to be outputted by the ZED SDK with sl::Camera.retrieveBodies(). More... | |
BODY_KEYPOINTS_SELECTION | body_selection = BODY_KEYPOINTS_SELECTION::FULL |
Selection of keypoints to outputted by the ZED SDK with sl::Camera.retrieveBodies(). More... | |
float | max_range = -1.f |
Upper depth range for detections. More... | |
float | prediction_timeout_s |
Prediction duration of the ZED SDK when an object is not detected anymore before switching its state to sl::OBJECT_TRACKING_STATE::SEARCHING. More... | |
bool | allow_reduced_precision_inference |
Whether to allow inference to run at a lower precision to improve runtime and memory usage. More... | |
Structure containing a set of parameters for the body tracking module.
The default constructor sets all parameters to their default settings.
BodyTrackingParameters | ( | bool | enable_tracking_ = true , |
bool | enable_segmentation_ = false , |
||
BODY_TRACKING_MODEL | detection_model = BODY_TRACKING_MODEL::HUMAN_BODY_ACCURATE , |
||
bool | enable_body_fitting_ = false , |
||
float | max_range_ = -1.f , |
||
BODY_FORMAT | body_format_ = BODY_FORMAT::BODY_18 , |
||
BODY_KEYPOINTS_SELECTION | body_selection = BODY_KEYPOINTS_SELECTION::FULL , |
||
float | prediction_timeout_s = 0.2f , |
||
bool | allow_reduced_precision_inference = false , |
||
unsigned int | instance_id = 0 |
||
) |
Default constructor.
All the parameters are set to their default values.
bool save | ( | String | filename, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) | const |
Saves the current set of parameters into a file to be reloaded with the load() method.
filename | : Name of the file which will be created to store the parameters (extension '.yml' will be added if not set). |
bool load | ( | String | filename, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) |
Loads a set of parameters from the values contained in a previously saved file.
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). |
bool encode | ( | String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) | const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string.
serialized_content | output string containing the JSON Object |
format | serialization format, default is JSON |
bool decode | ( | const String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) |
Fill the structure from the serialized json object contained in the input string.
serialized_content | input string containing the JSON Object |
format | serialization format, default is JSON |
bool operator== | ( | const BodyTrackingParameters & | param1 | ) | const |
Comparison operator ==
BodyTrackingParameters | to compare |
bool operator!= | ( | const BodyTrackingParameters & | param1 | ) | const |
Comparison operator !=
BodyTrackingParameters | to compare |
unsigned int instance_module_id = 0 |
Id of the module instance.
This is used to identify which body tracking module instance is used.
bool enable_tracking = true |
Whether the body tracking system includes body/person tracking capabilities across a sequence of images.
bool enable_segmentation = false |
Whether the body/person masks will be computed.
BODY_TRACKING_MODEL detection_model = BODY_TRACKING_MODEL::HUMAN_BODY_ACCURATE |
sl::BODY_TRACKING_MODEL to use.
bool enable_body_fitting = false |
Whether to apply the body fitting.
BODY_FORMAT body_format = BODY_FORMAT::BODY_18 |
Body format to be outputted by the ZED SDK with sl::Camera.retrieveBodies().
BODY_KEYPOINTS_SELECTION body_selection = BODY_KEYPOINTS_SELECTION::FULL |
Selection of keypoints to outputted by the ZED SDK with sl::Camera.retrieveBodies().
float max_range = -1.f |
Upper depth range for detections.
Default: -1.f (value set in sl::InitParameters.depth_maximum_distance)
float prediction_timeout_s |
Prediction duration of the ZED SDK when an object is not detected anymore before switching its state to sl::OBJECT_TRACKING_STATE::SEARCHING.
It prevents the jittering of the object state when there is a short misdetection.
The user can define their own prediction time duration.
bool allow_reduced_precision_inference |
Whether to allow inference to run at a lower precision to improve runtime and memory usage.
It might increase the initial optimization time and could include downloading calibration data or calibration cache and slightly reduce the accuracy.