# ZED SDK 5.3.1 — c API reference > Per-symbol API reference for the ZED SDK c API, generated from the > source headers/stubs. For concepts, tutorials and usage examples see the > main documentation: https://docs.stereolabs.com/llms-full.txt > (index: https://docs.stereolabs.com/llms.txt). ## Contents - c_api/zed_interface.h - SL_InitParameters - SL_RuntimeParameters - sl - c_api/types_c.h - SL_CameraParameters - SL_CalibrationParameters - SL_SensorsData - SL_PositionalTrackingParameters - SL_RecordingParameters - SL_StreamingParameters - SL_ObjectDetectionParameters - SL_BodyTrackingParameters - SL_AI_Model_status - SL_BarometerData - SL_BatchParameters - SL_Bodies - SL_BodyData - SL_BodyTrackingFusionParameters - SL_BodyTrackingFusionRuntimeParameters - SL_BodyTrackingRuntimeParameters - SL_CameraConfiguration - SL_CameraIdentifier - SL_CameraInformation - SL_CameraMetrics - SL_CommunicationParameters - SL_CustomBoxObjectData - SL_CustomMaskObjectData - SL_CustomObjectDetectionProperties - SL_CustomObjectDetectionRuntimeParameters - SL_DeviceProperties - SL_ECEF - SL_ENU - SL_FusedPositionalTrackingStatus - SL_FusionConfiguration - SL_FusionMetrics - SL_GNSSCalibrationParameters - SL_GNSSData - SL_GeoPose - SL_HealthStatus - SL_IMUData - SL_InitFusionParameters - SL_InputType - SL_Landmark - SL_Landmark2D - SL_LatLng - SL_MagnetometerData - SL_Matrix3f - SL_Matrix4f - SL_ObjectData - SL_ObjectDetectionRuntimeParameters - SL_ObjectTrackingParameters - SL_Objects - SL_ObjectsBatch - SL_PlaneData - SL_PlaneDetectionParameters - SL_PoseData - SL_PositionalTrackingFusionParameters - SL_PositionalTrackingStatus - SL_Quaternion - SL_RecordingStatus - SL_Rect - SL_RegionOfInterestParameters - SL_Resolution - SL_SVOData - SL_SensorParameters - SL_SensorsConfiguration - SL_SpatialMappingParameters - SL_StreamingProperties - SL_SynchronizationParameter - SL_TemperatureData - SL_Transform - SL_UTM - SL_Uchar2 - SL_Uchar3 - SL_Uchar4 - SL_Uint2 - SL_Vector2 - SL_Vector3 - SL_Vector4 - SL_VoxelMeasureParameters - add-on-c.txt - c_api - c-api - include - release-notes.md --- # c_api/zed_interface.h ## Defines | | Name | | -------------- | -------------- | | | **INTERFACE_API** | ## Functions Documentation ### function sl_free ```cpp INTERFACE_API void sl_free( void * ptr ) ``` ### function sl_unload_all_instances ```cpp INTERFACE_API void sl_unload_all_instances() ``` Forces unload of all instances. ### function sl_unload_instance ```cpp INTERFACE_API void sl_unload_instance( int camera_id ) ``` Forces unload of one instance. **Parameters**: * **camera_id** : id of the instance to unload. ### function sl_create_camera ```cpp INTERFACE_API bool sl_create_camera( int camera_id ) ``` Creates a camera with resolution mode, fps and id for linux. **Parameters**: * **camera_id** : id of the camera to be added. * **verbose** : Enable verbose mode. **Return**: true if the camera has been created successfully. ### function sl_get_camera_handle ```cpp INTERFACE_API void * sl_get_camera_handle( int camera_id ) ``` Returns an opaque pointer to the ZEDController instance for the given camera. **Parameters**: * **camera_id** : Id of the camera. **Return**: Pointer to the ZEDController, or nullptr if the camera has not been created yet. ### function sl_is_opened ```cpp INTERFACE_API bool sl_is_opened( int camera_id ) ``` Reports if the camera has been successfully opened. **Parameters**: * **camera_id** : Id of the camera. **Return**: true if the ZED camera is already setup, otherwise false. ### function sl_open_camera ```cpp INTERFACE_API int sl_open_camera( int camera_id, struct SL_InitParameters * init_parameters, const unsigned int serial_number, const char * path_svo, const char * ip, int stream_port, int gmsl_port, const char * output_file, const char * opt_settings_path, const char * opencv_calib_path ) ``` Opens the ZED camera from the provided SL_InitParameters. **Parameters**: * **camera_id** : Id of the camera to open. * **init_parameters** : A structure containing all the initial parameters. Default: a preset of SL_InitParameters. * **serial_number** : Serial number of the camera to open. * **path_svo** : Filename of the svo to read (for SVO input). * **ip** : IP of the camera to open (for Stream input). * **stream_port** : Port of the camera to open (for Stream input). * **gmsl_port** : GMSL port number for camera selection (only used when input_type is GMSL). Default: -1 (do nothing). * **bus_type** : Whether the camera is a USB or a GMSL camera (when opening with camera ID). * **output_file** : ZED SDK verbose log file. Redirect the SDK verbose message to the file. * **opt_settings_path[optional]** : Settings path. * **opencv_calib_path[optional]** : openCV calibration file. **Return**: An error code giving information about the internal process. If SL_ERROR_CODE_SUCCESS (0) is returned, the camera is ready to use. Every other code indicates an error and the program should be stopped. ### function sl_open_camera_from_camera_id ```cpp INTERFACE_API int sl_open_camera_from_camera_id( int camera_id, struct SL_InitParameters * init_parameters, const char * output_file, const char * opt_settings_path, const char * opencv_calib_path ) ``` Opens the ZED camera from the provided SL_InitParameters using its camera ID. **Parameters**: * **camera_id** : Id of the camera to open. * **init_parameters** : A structure containing all the initial parameters. Default: a preset of SL_InitParameters. * **output_file** : ZED SDK verbose log file. Redirect the SDK verbose message to the file. * **opt_settings_path[optional]** : Settings path. * **opencv_calib_path[optional]** : openCV calibration file. **Return**: An error code giving information about the internal process. If SL_ERROR_CODE_SUCCESS (0) is returned, the camera is ready to use. Every other code indicates an error and the program should be stopped. ### function sl_open_camera_from_serial_number ```cpp INTERFACE_API int sl_open_camera_from_serial_number( int camera_id, struct SL_InitParameters * init_parameters, const unsigned int serial_number, const char * output_file, const char * opt_settings_path, const char * opencv_calib_path ) ``` Opens the ZED camera from the provided SL_InitParameters using its serial number. **Parameters**: * **camera_id** : Id of the camera to open. * **init_parameters** : A structure containing all the initial parameters. Default: a preset of SL_InitParameters. * **serial_number** : Serial number of the camera to open. * **output_file** : ZED SDK verbose log file. Redirect the SDK verbose message to the file. * **opt_settings_path[optional]** : Settings path. * **opencv_calib_path[optional]** : openCV calibration file. **Return**: An error code giving information about the internal process. If SL_ERROR_CODE_SUCCESS (0) is returned, the camera is ready to use. Every other code indicates an error and the program should be stopped. ### function sl_open_camera_from_svo_file ```cpp INTERFACE_API int sl_open_camera_from_svo_file( int camera_id, struct SL_InitParameters * init_parameters, const char * path_svo, const char * output_file, const char * opt_settings_path, const char * opencv_calib_path ) ``` Opens the ZED camera from the provided SL_InitParameters using an SVO file. **Parameters**: * **camera_id** : Id of the camera to open. * **init_parameters** : A structure containing all the initial parameters. Default: a preset of SL_InitParameters. * **path_svo** : Filename of the svo to read (for SVO input). * **output_file** : ZED SDK verbose log file. Redirect the SDK verbose message to the file. * **opt_settings_path[optional]** : Settings path. * **opencv_calib_path[optional]** : openCV calibration file. **Return**: An error code giving information about the internal process. If SL_ERROR_CODE_SUCCESS (0) is returned, the camera is ready to use. Every other code indicates an error and the program should be stopped. ### function sl_open_camera_from_stream ```cpp INTERFACE_API int sl_open_camera_from_stream( int camera_id, struct SL_InitParameters * init_parameters, const char * ip, int stream_port, const char * output_file, const char * opt_settings_path, const char * opencv_calib_path ) ``` Opens the ZED camera from the provided SL_InitParameters using its IP and stream port. **Parameters**: * **camera_id** : Id of the camera to open. * **init_parameters** : A structure containing all the initial parameters. Default: a preset of SL_InitParameters. * **ip** : IP of the camera to open (for Stream input). * **stream_port** : Port of the camera to open (for Stream input). * **output_file** : ZED SDK verbose log file. Redirect the SDK verbose message to the file. * **opt_settings_path[optional]** : Settings path. * **opencv_calib_path[optional]** : openCV calibration file. **Return**: An error code giving information about the internal process. If SL_ERROR_CODE_SUCCESS (0) is returned, the camera is ready to use. Every other code indicates an error and the program should be stopped. ### function sl_start_publishing ```cpp INTERFACE_API enum SL_ERROR_CODE sl_start_publishing( int camera_id, struct SL_CommunicationParameters * comm_params ) ``` Set this camera as a data provider for the Fusion module. **Parameters**: * **camera_id** : Id of the camera instance. * **configuration** : A structure containing all the initial parameters. Default: a preset of SL_CommunicationParameters. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. Metadata is exchanged with the Fusion. ### function sl_stop_publishing ```cpp INTERFACE_API enum SL_ERROR_CODE sl_stop_publishing( int camera_id ) ``` Set this camera as normal camera(without data providing). Stop to send camera data to fusion. **Return**: SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise ### function sl_get_cuda_context ```cpp INTERFACE_API CUcontext sl_get_cuda_context( int camera_id ) ``` Gets the Camera-created CUDA context for sharing it with other CUDA-capable libraries. **Parameters**: * **camera_id** : Id of the camera instance. This can be useful for sharing GPU memories. ### function sl_get_init_parameters ```cpp INTERFACE_API struct SL_InitParameters * sl_get_init_parameters( int camera_id ) ``` Returns the SL_InitParameters used. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_InitParameters containing the parameters used to initialize the camera. It corresponds to the structure given as argument to the sl_open_camera() function. ### function sl_get_runtime_parameters ```cpp INTERFACE_API struct SL_RuntimeParameters * sl_get_runtime_parameters( int camera_id ) ``` Returns the SL_RuntimeParameters used. **Parameters**: * **camera_id** : id of the camera instance. **Return**: SL_RuntimeParameters containing the parameters that define the behavior of the sl_grab function. It corresponds to the structure given as argument to the sl_grab() function. ### function sl_get_positional_tracking_parameters ```cpp INTERFACE_API struct SL_PositionalTrackingParameters * sl_get_positional_tracking_parameters( int camera_id ) ``` Returns the SL_PositionalTrackingParameters used. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_PositionalTrackingParameters containing the parameters used for positional tracking initialization. It corresponds to the structure given as argument to the sl_enable_positional_tracking() method. ### function sl_close_camera ```cpp INTERFACE_API void sl_close_camera( int camera_id ) ``` Close an opened camera and disable the textures. **Parameters**: * **camera_id** : Id of the camera instance. ### function sl_set_region_of_interest ```cpp INTERFACE_API int sl_set_region_of_interest( int camera_id, void * roi_mask, bool module[SL_MODULE_LAST] ) ``` Defines a region of interest to focus on for all the SDK, discarding other parts. **Parameters**: * **camera_id** : Id of the camera instance. * **roi_mask** : The matrix defining the requested region of interest, pixels lower than 127 will be discarded from all modules: depth, positional tracking, etc. If empty, set all pixels as valid. The mask can be either at lower or higher resolution than the current images. * **module** Apply the ROI to a list of SDK module, all by default. **Return**: An SL_ERROR_CODE if something went wrong. **Note**: The function support SL_MAT_TYPE_U8_C1 / SL_MAT_TYPE_UU8_C3 / SL_MAT_TYPE_UU8_C4 images type. ### function sl_get_region_of_interest ```cpp INTERFACE_API int sl_get_region_of_interest( int camera_id, void * roi_mask, int width, int height, enum SL_MODULE module ) ``` Get the previously set or computed region of interest. **Parameters**: * **camera_id** : Id of the camera instance. * **roi_mask** The Mat returned. * **image_size** The optional size of the returned mask. * **module** Specify which module to get the ROI. **Return**: An SL_ERROR_CODE if something went wrong. ### function sl_start_region_of_interest_auto_detection ```cpp INTERFACE_API int sl_start_region_of_interest_auto_detection( int camera_id, struct SL_RegionOfInterestParameters * roi_param ) ``` Start the auto detection of a region of interest to focus on for all the SDK, discarding other parts. This detection is based on the general motion of the camera combined with the motion in the scene. The camera must move for this process, an internal motion detector is used, based on the Positional Tracking module. It requires a few hundreds frames of motion to compute the mask. **Parameters**: * **roi_param** The SL_RegionOfInterestParameters defining parameters for the detection **Return**: An SL_ERROR_CODE if something went wrong. **Note**: This module is expecting a static portion, typically a fairly close vehicle hood at the bottom of the image. This module may not work correctly or detect incorrect background area, especially with slow motion, if there's no static element. This module work asynchronously, the status can be obtained using sl_get_region_of_interest_auto_detection_status(), the result is either auto applied, or can be retrieve using sl_get_region_of_interest function. ### function sl_get_region_of_interest_auto_detection_status ```cpp INTERFACE_API enum SL_REGION_OF_INTEREST_AUTO_DETECTION_STATE sl_get_region_of_interest_auto_detection_status( int camera_id ) ``` Return the status of the automatic Region of Interest Detection The automatic Region of Interest Detection is enabled by using sl_start_region_of_interest_auto_detection. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_REGION_OF_INTEREST_AUTO_DETECTION_STATE the status ### function sl_grab ```cpp INTERFACE_API int sl_grab( int camera_id, struct SL_RuntimeParameters * runtime ) ``` Grabs the latest images from the camera. **Parameters**: * **camera_id** : Id of the camera instance. * **runtime** : A structure containing all the runtime parameters. Default: a preset of SL_RuntimeParameters. **Return**: An error code giving information about the internal process. SL_ERROR_CODE_SUCCESS if the method succeeded. ### function sl_read ```cpp INTERFACE_API int sl_read( int camera_id ) ``` Read the latest images and IMU from the camera and rectify the images. **Return**: SL_ERROR_CODE_SUCCESS means that no problem was encountered. **Note**: * If no new frames is available until timeout is reached, read() will return SL_ERROR_CODE_CAMERA_NOT_DETECTED since the camera has probably been disconnected. * Returned errors can be displayed using toString(). This method is meant to be called frequently in the main loop of your application. ### function sl_get_device_list ```cpp INTERFACE_API void sl_get_device_list( struct SL_DeviceProperties device_list[MAX_CAMERA_PLUGIN], int * nb_devices ) ``` Lists all the connected devices with their associated information. **Parameters**: * **device_list** [Out] : The devices properties for each connected camera. * **nb_devices** [Out] : The number of cameras connected. This method lists all the cameras available and provides their serial number, models and other information. ### function sl_get_streaming_device_list ```cpp INTERFACE_API void sl_get_streaming_device_list( struct SL_StreamingProperties streaming_device_list[MAX_CAMERA_PLUGIN], int * nb_devices ) ``` List all the streaming devices with their associated information. **Parameters**: * **device_list** [Out] : The devices properties for each connected camera. * **nb_devices** [Out]: The number of cameras connected. **Return**: The streaming properties for each connected camera. ### function sl_reboot ```cpp INTERFACE_API int sl_reboot( int sn, bool full_reboot ) ``` Performs a hardware reset of the ZED 2 and the ZED 2i. **Parameters**: * **sn** : Serial number of the camera to reset, or 0 to reset the first camera detected. * **fullReboot** : Perform a full reboot (sensors and video modules) if true, otherwise only the video module will be rebooted. **Return**: * SL_ERROR_CODE_SUCCESS if everything went fine. * SL_ERROR_CODE_CAMERA_NOT_DETECTED if no camera was detected. * SL_ERROR_CODE_FAILURE otherwise. **Note**: This method only works for ZED 2, ZED 2i, and newer camera models. ### function sl_enable_recording ```cpp INTERFACE_API int sl_enable_recording( int camera_id, const char * filename, enum SL_SVO_COMPRESSION_MODE compression_mode, unsigned int bitrate, int target_fps, bool transcode, unsigned char encryption_key[256], enum SL_SVO_ENCODING_PRESET encoding_preset ) ``` Creates a file for recording the ZED's output into a .SVO or .AVI video. **Parameters**: * **camera_id** : Id of the camera instance. * **filename** : Filename of the SVO file. * **compression_mode** : Compression mode. It can be one for the SL_SVO_COMPRESSION_MODE enum. * **bitrate** : overrides default bitrate of the SVO file, in KBits/s. Only works if SL_SVO_COMPRESSION_MODE is H264 or H265. * **target_fps** : Defines the target framerate for the recording module. * **transcode** : In case of streaming input, if set to false, it will avoid decoding/re-encoding and convert directly streaming input to a SVO file. This saves a encoding session and can be especially useful on NVIDIA Geforce cards where the number of encoding session is limited. * **encryption_key** : An optional 256-bytes array to encrypt the SVO file. If the array is not empty, the generated SVO file will be encrypted and will require the same key to be read. * **encryption_key** : Optional encryption key or passphrase to protect the SVO file. * **encoding_preset** : Encoding preset for the hardware encoder. **Return**: An SL_ERROR_CODE that defines if SVO file was successfully created and can be filled with images. An SVO is Stereolabs' own format designed for the ZED. It holds the video feed with timestamps as well as info about the camera used to record it. ### function sl_enable_recording_from_params ```cpp INTERFACE_API int sl_enable_recording_from_params( int camera_id, struct SL_RecordingParameters * recording_parameters ) ``` Creates a file for recording the ZED's output, accepting the full SL_RecordingParameters structure. **Parameters**: * **camera_id** : Id of the camera instance. * **recording_parameters** : A structure containing all the recording parameters. **Return**: An SL_ERROR_CODE that defines if the SVO file was successfully created. Supports all recording options including encryption and encoding preset (added in SDK 5.3.0). ### function sl_get_recording_status ```cpp INTERFACE_API struct SL_RecordingStatus * sl_get_recording_status( int camera_id ) ``` Get the recording information. **Return**: The recording state structure. For more details, see SL_RecordingStatus. ### function sl_disable_recording ```cpp INTERFACE_API void sl_disable_recording( int camera_id ) ``` Disables the recording initiated by sl_enable_recording() and closes the generated file. **Parameters**: * **camera_id** : Id of the camera instance. ### function sl_get_recording_parameters ```cpp INTERFACE_API struct SL_RecordingParameters * sl_get_recording_parameters( int camera_id ) ``` Returns the SL_RecordingParameters used. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_RecordingParameters containing the parameters used for recording initialization. It corresponds to the structure given as argument to the sl_enable_recording() function. ### function sl_pause_recording ```cpp INTERFACE_API void sl_pause_recording( int camera_id, bool status ) ``` Pauses or resumes the recording. **Parameters**: * **camera_id** : Id of the camera instance. * **status** : If true, the recording is paused. If false, the recording is resumed. ### function sl_ingest_data_into_svo ```cpp INTERFACE_API enum SL_ERROR_CODE sl_ingest_data_into_svo( int camera_id, struct SL_SVOData * data ) ``` Ingests SL_SVOData in a SVO file. **Parameters**: * **camera_id** : Id of the camera instance. * **data** : Data to ingest in the SVO file. **Return**: sl_ERROR_CODE_SUCCESS in case of success, sl_ERROR_CODE_FAILURE otherwise. **Note**: The method works only if the camera is recording. ### function sl_get_svo_data_size ```cpp INTERFACE_API int sl_get_svo_data_size( int camera_id, char key[128], unsigned long long ts_begin, unsigned long long ts_end ) ``` Gets the size of data available for a given key. Must be called before sl_retrieve_svo_data to initialize the array at the correct size. **Parameters**: * **camera_id** : Id of the camera instance. * **key** : The key of the SVOData that is going to be retrieved. * **ts_begin** : The beginning of the range. * **ts_end** : The end of the range. **Return**: The number of data available for this key. **Note**: The method will always return -1 if not in SVO mode. ### function sl_retrieve_svo_data ```cpp INTERFACE_API enum SL_ERROR_CODE sl_retrieve_svo_data( int camera_id, char * key, int nb_data, struct SL_SVOData ** data, unsigned long long ts_begin, unsigned long long ts_end ) ``` Retrieves SVOData from an SVO file. The user is reponsible for correctly allocating the size of the data array using sl_get_svo_data_size. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_data** : Size of the array of data. * **data** : The map to be filled with SVOData objects, with timestamps as keys. * **ts_begin** : The beginning of the range. * **ts_end** : The end of the range. **Return**: sl_ERROR_CODE_SUCCESS in case of success, sl_ERROR_CODE_FAILURE otherwise. **Note**: The method will return sl_ERROR_CODE_FAILURE if not in SVO mode. **Warning**: You need to call sl_get_svo_data_size for the key before calling this method to correctly retrieve the data. ### function sl_get_svo_data_keys_size ```cpp INTERFACE_API int sl_get_svo_data_keys_size( int camera_id ) ``` Gets the number of external channels that can be retrieved from the SVO file. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: the number of keys available. **Note**: The method will return 0 if not in SVO mode. ### function sl_get_svo_data_keys ```cpp INTERFACE_API void sl_get_svo_data_keys( int camera_id, int nb_keys, char ** keys ) ``` Gets the external channels that can be retrieved from the SVO file. The user is reponsible for correctly allocating the size of the keys array using sl_get_svo_data_keys_size. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_keys** : number of keys. * **[Out]** keys : List of available keys. **Note**: The method will not fill the keys array if not in SVO mode. ### function sl_enable_positional_tracking ```cpp INTERFACE_API int sl_enable_positional_tracking( int camera_id, struct SL_PositionalTrackingParameters * tracking_param, const char * area_file_path ) ``` Initializes and starts the positional tracking processes. **Parameters**: * **camera_id** : Id of the camera instance. * **tracking_param** : A structure containing all the specific parameters for the positional tracking. Default: a preset of SL_PositionalTrackingParameters. * **area_file_path** : .area localization file that describes the surroundings, saved from a previous tracking session. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. This function allows you to enable the position estimation of the SDK. It only has to be called once in the camera's lifetime. ### function sl_disable_positional_tracking ```cpp INTERFACE_API void sl_disable_positional_tracking( int camera_id, const char * area_file_path ) ``` Disables the positional tracking. **Parameters**: * **camera_id** : Id of the camera instance. * **area_file_path** : If set, saves the spatial memory into an '.area' file. ### function sl_save_area_map ```cpp INTERFACE_API int sl_save_area_map( int camera_id, const char * area_file_path ) ``` Saves the current area learning file. The file will contain spatial memory data generated by the tracking. **Parameters**: * **camera_id** : Id of the camera instance. * **area_file_path** : Save the spatial memory database in an '.area' file. **Return**: SL_ERROR_CODE_FAILURE if the **area_file_path** file wasn't found, SL_ERROR_CODE_SUCCESS otherwise. ### function sl_get_area_export_state ```cpp INTERFACE_API int sl_get_area_export_state( int camera_id ) ``` Returns the state of the spatial memory export process. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The current state of the spatial memory export process As sl_save_area_map only starts the exportation, this method allows you to know when the exportation finished or if it failed. ### function sl_set_svo_position ```cpp INTERFACE_API enum SL_ERROR_CODE sl_set_svo_position( int camera_id, int position ) ``` Sets the playback cursor to the desired frame number in the SVO file. **Parameters**: * **camera_id** : Id of the camera instance. * **position** : The position of the desired frame to be decoded. **Return**: SL_ERROR_CODE to indicate if the method was successful. This function allows you to move around within a played-back SVO file. After calling, the next call to sl_grab() will read the provided position. ### function sl_pause_svo_reading ```cpp INTERFACE_API void sl_pause_svo_reading( int camera_id, bool status ) ``` Pauses or resumes SVO reading. **Parameters**: * **camera_id** : Id of the camera instance. * **status** : If true, the reading is paused. If false, the reading is resumed. **Note**: This is only relevant for SVO InitParameters::svo_real_time_mode ### function sl_get_camera_fps ```cpp INTERFACE_API float sl_get_camera_fps( int camera_id ) ``` Returns the camera FPS. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The current frame rate. ### function sl_get_current_fps ```cpp INTERFACE_API float sl_get_current_fps( int camera_id ) ``` Returns the current FPS. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The current frame rate. ### function sl_get_width ```cpp int INTERFACE_API sl_get_width( int camera_id ) ``` Returns the width of the current image. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: Width of the image. ### function sl_get_height ```cpp int INTERFACE_API sl_get_height( int camera_id ) ``` Returns the height of the current image. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: Height of the image. ### function sl_get_confidence_threshold ```cpp INTERFACE_API int sl_get_confidence_threshold( int camera_id ) ``` Gets the current confidence threshold value for the disparity map (and by extension the depth map). **Parameters**: * **camera_id** : id of the camera instance. **Return**: The confidence threshold. -1 if failure. ### function sl_get_camera_information ```cpp INTERFACE_API struct SL_CameraInformation * sl_get_camera_information( int camera_id, int res_width, int res_height ) ``` Returns the SL_CameraInformation associated the camera. **Parameters**: * **camera_id** : Id of the camera instance. * **res_width** : You can specify a size different from default image size to get the scaled camera information. * **res_height** : You can specify a size different from default image size to get the scaled camera information. **Return**: SL_CameraInformation containing the calibration parameters of the ZED, as well as serial number and firmware version. To ensure accurate calibration, it is possible to specify a custom resolution as a parameter when obtaining scaled information, as calibration parameters are resolution-dependent. ### function sl_update_self_calibration ```cpp INTERFACE_API void sl_update_self_calibration( int camera_id ) ``` Performs a new self calibration process. **Parameters**: * **camera_id** : Id of the camera instance. In some cases, due to temperature changes or strong vibrations, the stereo calibration becomes less accurate. Use this function to update the self-calibration data and get more reliable depth values. ### function sl_get_calibration_parameters ```cpp INTERFACE_API struct SL_CalibrationParameters * sl_get_calibration_parameters( int camera_id, bool raw_params ) ``` Gets the Calibration Parameters. **Parameters**: * **camera_id** : id of the camera instance. * **r_params** : if true, returns Intrinsic and Extrinsic stereo parameters for original images (unrectified/distorded), else returns parameters for rectified/undistorded images. **Return**: Structure containing Intrinsic and Extrinsic stereo parameters ### function sl_get_sensors_configuration ```cpp INTERFACE_API struct SL_SensorsConfiguration * sl_get_sensors_configuration( int camera_id ) ``` Gets the Sensors configuration. **Parameters**: * **camera_id** : id of the camera instance. **Return**: Structure containing information about all the sensors available in the current device. ### function sl_get_camera_imu_transform ```cpp INTERFACE_API void sl_get_camera_imu_transform( int camera_id, struct SL_Vector3 * translation, struct SL_Quaternion * rotation ) ``` Gets the IMU to the left camera transform matrix. **Parameters**: * **camera_id** : Id of the camera instance. * **translation** : Translation between IMU frame and camera frame. * **rotation** : Rotation between IMU frame and camera frame. **Return**: * SL_ERROR_CODE_SUCCESS if sensors data have been extracted. * SL_ERROR_CODE_SENSORS_NOT_AVAILABLE if the camera model is a SL_MODEL_ZED. * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct but the sensors module is not opened. * SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS if the **reference_time** is not valid. **Note**: This function is only effective if the camera has a model other than a SL_MODEL_ZED, which does not contains internal sensors. ### function sl_get_input_type ```cpp INTERFACE_API int sl_get_input_type( int camera_id ) ``` Gets the input type (see SL_INPUT_TYPE). **Parameters**: * **camera_id** : id of the camera instance. **Return**: The input type. ### function sl_get_zed_serial ```cpp INTERFACE_API int sl_get_zed_serial( int camera_id ) ``` Gets the ZED Serial Number. **Parameters**: * **camera_id** : id of the camera instance. **Return**: The serial number of the camera. ### function sl_get_camera_firmware ```cpp INTERFACE_API int sl_get_camera_firmware( int camera_id ) ``` Gets the ZED camera current firmware version. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The firmware of the camera. ### function sl_get_sensors_firmware ```cpp INTERFACE_API int sl_get_sensors_firmware( int camera_id ) ``` Gets the sensor module current firmware version. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The firmware version of the sensor module, 0 if no sensors are available. ### function sl_get_camera_model ```cpp INTERFACE_API int sl_get_camera_model( int camera_id ) ``` Gets the ZED Camera model (see SL_MODEL). **Parameters**: * **camera_id** : id of the camera instance. **Return**: The ZED Camera model. ### function sl_get_image_timestamp ```cpp INTERFACE_API unsigned long long sl_get_image_timestamp( int camera_id ) ``` Get the timestamp at the time the frame has been extracted from USB stream. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The camera timestamp. **Note**: It should be called after a sl_grab(). ### function sl_get_current_timestamp ```cpp INTERFACE_API unsigned long long sl_get_current_timestamp( int camera_id ) ``` Get the current timestamp at the time the function is called. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The current timestamp. Can be compared to the camera timestamp for synchronization. ### function sl_set_timestamp_clock ```cpp INTERFACE_API void sl_set_timestamp_clock( enum SL_TIMESTAMP_CLOCK clock ) ``` Sets the clock source used for all timestamps produced by the ZED SDK. **Parameters**: * **clock** : The desired SL_TIMESTAMP_CLOCK. ### function sl_get_timestamp_clock ```cpp INTERFACE_API enum SL_TIMESTAMP_CLOCK sl_get_timestamp_clock() ``` Returns the active clock source used for timestamps. **Return**: The active SL_TIMESTAMP_CLOCK. ### function sl_set_max_system_clock_step_ms ```cpp INTERFACE_API void sl_set_max_system_clock_step_ms( float limit_ms ) ``` Sets an upper bound on the step size of system-clock adjustments applied to SDK timestamps. **Parameters**: * **limit_ms** : Maximum allowed clock step in milliseconds. ### function sl_get_max_system_clock_step_ms ```cpp INTERFACE_API float sl_get_max_system_clock_step_ms() ``` Returns the current maximum system clock step limit in milliseconds. **Return**: The current limit in milliseconds. ### function sl_get_svo_number_of_frames ```cpp INTERFACE_API int sl_get_svo_number_of_frames( int camera_id ) ``` Returns the number of frames in the SVO file. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The total number of frames in the SVO file. -1 if the SDK is not reading a SVO. ### function sl_is_camera_setting_supported ```cpp INTERFACE_API bool sl_is_camera_setting_supported( int camera_id, enum SL_VIDEO_SETTINGS setting ) ``` Test if the video setting is supported by the camera. **Parameters**: * **camera_id** : Id of the camera instance. * **setting** : The video setting to test **Return**: true if the SL_VIDEO_SETTINGS is supported by the camera, false otherwise ### function sl_set_camera_settings ```cpp INTERFACE_API enum SL_ERROR_CODE sl_set_camera_settings( int camera_id, enum SL_VIDEO_SETTINGS mode, int value ) ``` Sets the value of the requested camera setting (gain, brightness, hue, exposure, etc.). **Parameters**: * **camera_id** : Id of the camera instance. * **mode** : The setting to be set. * **value** : The value to set. **Return**: SL_ERROR_CODE to indicate if the function was successful. **Note**: The function works only if the camera is open in LIVE or STREAM mode. ### function sl_set_camera_settings_min_max ```cpp INTERFACE_API enum SL_ERROR_CODE sl_set_camera_settings_min_max( int camera_id, enum SL_VIDEO_SETTINGS mode, int min, int max ) ``` Sets the range values of the requested camera setting (gain, brightness, hue, exposure, etc.). Works for the following settings: SL_VIDEO_SETTINGS SL_VIDEO_SETTINGS_AUTO_EXPOSURE_TIME_RANGE SL_VIDEO_SETTINGS SL_VIDEO_SETTINGS_AUTO_ANALOG_GAIN_RANGE SL_VIDEO_SETTINGS SL_VIDEO_SETTINGS_AUTO_DIGITAL_GAIN_RANGE. **Parameters**: * **camera_id** : Id of the camera instance. * **mode** : The setting to be set. * **min** : The min value to set. * **max** : The max value to set. **Return**: SL_ERROR_CODE to indicate if the function was successful. **Note**: The function works only if the camera is open in LIVE or STREAM mode. ### function sl_set_roi_for_aec_agc ```cpp INTERFACE_API enum SL_ERROR_CODE sl_set_roi_for_aec_agc( int camera_id, enum SL_SIDE side, struct SL_Rect * roi, bool reset ) ``` Sets the region of interest for automatic exposure/gain computation. **Parameters**: * **camera_id** : Id of the camera instance. * **side** : SL_SIDE on which to be applied for AEC/AGC computation. * **roi** : SL_Rect that defines the target to be applied for AEC/AGC computation. Must be given according to camera resolution. * **reset** : Cancel the manual ROI and reset it to the full image. **Return**: SL_ERROR_CODE to indicate if the function was successful. **Note**: The function works only if the camera is open in LIVE or STREAM mode. ### function sl_get_camera_settings ```cpp INTERFACE_API enum SL_ERROR_CODE sl_get_camera_settings( int c_id, enum SL_VIDEO_SETTINGS mode, int * value ) ``` Returns the current value of the requested camera setting (gain, brightness, hue, exposure, etc.). **Parameters**: * **camera_id** : Id of the camera instance. * **mode** : Setting to be retrieved (see SL_VIDEO_SETTINGS). * **value** : The requested setting value. **Return**: SL_ERROR_CODE to indicate if the function was successful. If successful, setting will be filled with the corresponding value. **Note**: * The function works only if the camera is open in LIVE or STREAM mode. * Settings are not exported in the SVO file format. ### function sl_get_camera_settings_min_max ```cpp INTERFACE_API enum SL_ERROR_CODE sl_get_camera_settings_min_max( int c_id, enum SL_VIDEO_SETTINGS mode, int * minvalue, int * maxvalue ) ``` Returns the current range of the requested camera setting (setting with range value). **Parameters**: * **camera_id** : Id of the camera instance. * **mode** : Setting to be retrieved (see SL_VIDEO_SETTINGS). * **value** : The requested setting value. **Return**: SL_ERROR_CODE to indicate if the function was successful. If successful, setting will be filled with the corresponding value. **Note**: * The function works only if the camera is open in LIVE or STREAM mode. * Settings are not exported in the SVO file format. ### function sl_get_roi_for_aec_agc ```cpp INTERFACE_API enum SL_ERROR_CODE sl_get_roi_for_aec_agc( int id, enum SL_SIDE side, struct SL_Rect * roi ) ``` Gets the region of interest for automatic exposure/gain computation. **Parameters**: * **camera_id** : Id of the camera instance. * **side** : SL_SIDE on which to get the ROI from. * **roi** [Out] : Region of interest. **Return**: SL_ERROR_CODE_SUCCESS if ROI has been applied. Other SL_ERROR_CODE otherwise. **Note**: * The function works only if the camera is open in LIVE or STREAM mode. * Settings are not exported in the SVO file format. ### function sl_get_depth_min_range_value ```cpp INTERFACE_API float sl_get_depth_min_range_value( int camera_id ) ``` Gets the depth min value from InitParameters (see SL_InitParameters::depth_minimum_distance). **Parameters**: * **camera_id** : id of the camera instance. **Return**: The min depth value available. -1 if failure. ### function sl_get_depth_max_range_value ```cpp INTERFACE_API float sl_get_depth_max_range_value( int camera_id ) ``` Gets the depth max value from InitParameters (see SL_InitParameters::depth_maximum_distance). **Parameters**: * **camera_id** : id of the camera instance. **Return**: The max depth value available. -1 if failure. ### function sl_get_current_min_max_depth ```cpp INTERFACE_API int sl_get_current_min_max_depth( int camera_id, float * min, float * max ) ``` Gets the current range of perceived depth. **Parameters**: * **camera_id** : Id of the camera instance. * **min** : [Out] Minimum depth detected (in selected SL_UNIT) * **max** : [Out] Maximum depth detected (in selected SL_UNIT). **Return**: SL_ERROR_CODE_SUCCESS if values have been extracted. Other SL_ERROR_CODE otherwise. ### function sl_get_number_zed_connected ```cpp INTERFACE_API int sl_get_number_zed_connected() ``` Gets the number of zed connected. **Return**: The number of Zed cameras connected. ### function sl_get_sdk_version ```cpp INTERFACE_API char * sl_get_sdk_version() ``` Returns the version of the currently installed ZED SDK. **Return**: The ZED SDK version installed. ### function sl_convert_coordinate_system ```cpp INTERFACE_API int sl_convert_coordinate_system( struct SL_Quaternion * rotation, struct SL_Vector3 * translation, enum SL_COORDINATE_SYSTEM coord_system_src, enum SL_COORDINATE_SYSTEM coord_system_dest ) ``` Change the coordinate system of a transform matrix. **Parameters**: * **rotation** [In, Out] : rotation to transform. * **translation** [In, Out] : translation to transform. * **coord_system_src** : the current coordinate system of the translation/rotation. * **coord_system_dest** the destination coordinate system for the translation/rotation. ### function sl_get_svo_position ```cpp INTERFACE_API int sl_get_svo_position( int camera_id ) ``` Returns the current playback position in the SVO file. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The current frame position in the SVO file. Returns -1 if the SDK is not reading an SVO. ### function sl_get_svo_position_at_timestamp ```cpp INTERFACE_API int sl_get_svo_position_at_timestamp( int camera_id, unsigned long long timestamp ) ``` Retrieves the frame index within the SVO file corresponding to the provided timestamp. **Parameters**: * **camera_id** : Id of the camera instance. * **timestamp** The target timestamp for which the frame index is to be determined. **Return**: The frame index within the SVO file that aligns with the given timestamp. Returns -1 if the timestamp falls outside the bounds of the SVO file. ### function sl_get_frame_dropped_count ```cpp INTERFACE_API unsigned int sl_get_frame_dropped_count( int camera_id ) ``` Gets the number of frames dropped since sl_grab() was called for the first time. Based on camera timestamps and an FPS comparison. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The number of frames dropped since the first sl_grab() call. ### function sl_get_health_status ```cpp INTERFACE_API struct SL_HealthStatus * sl_get_health_status( int camera_id ) ``` Gets the current status of the camera. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: HealthStatus Structure containing the self diagnostic results of the image/depth/sensors ### function sl_get_retrieve_image_resolution ```cpp INTERFACE_API struct SL_Resolution * sl_get_retrieve_image_resolution( int camera_id, struct SL_Resolution * res ) ``` ### function sl_get_retrieve_measure_resolution ```cpp INTERFACE_API struct SL_Resolution * sl_get_retrieve_measure_resolution( int camera_id, struct SL_Resolution * res ) ``` ### function sl_is_positional_tracking_enabled ```cpp INTERFACE_API bool sl_is_positional_tracking_enabled( int camera_id ) ``` Tells if the tracking module is enabled. **Parameters**: * **camera_id** : Id of the camera instance. ### function sl_get_position_at_target_frame ```cpp INTERFACE_API int sl_get_position_at_target_frame( int camera_id, struct SL_Quaternion * rotation, struct SL_Vector3 * position, struct SL_Quaternion * target_quaternion, struct SL_Vector3 * target_translation, enum SL_REFERENCE_FRAME reference_frame ) ``` Gets the current position of the camera and state of the tracking, with an optional offset to the tracking frame. **Parameters**: * **camera_id** : Id of the camera instance. * **rotation** : Quaternion filled with the current rotation of the camera depending on its reference frame. * **position** : Vector filled with the current position of the camera depending on its reference frame. * **target_quaternion** : Rotational offset applied to the tracking frame. * **target_translation** : Positional offset applied to the tracking frame. * **reference_frame** : Reference frame for setting the rotation/position. **Return**: The current state of the tracking process (see SL_POSITIONAL_TRACKING_STATE). ### function sl_get_position_data ```cpp INTERFACE_API int sl_get_position_data( int camera_id, struct SL_PoseData * poseData, enum SL_REFERENCE_FRAME reference_frame ) ``` Gets the current position of the camera and state of the tracking, filling a SL_PoseData struck useful for AR pass-though. **Parameters**: * **camera_id** : Id of the camera instance. * **poseData** : Current Pose. * **reference_frame** : Reference frame sor setting the rotation/position. **Return**: The current state of the tracking process (see SL_POSITIONAL_TRACKING_STATE). ### function sl_get_position ```cpp INTERFACE_API int sl_get_position( int camera_id, struct SL_Quaternion * rotation, struct SL_Vector3 * position, enum SL_REFERENCE_FRAME reference_frame ) ``` Retrieves the estimated position and orientation of the camera in the specified reference frame. **Parameters**: * **camera_id** : Id of the camera instance. * **rotation** : Quaternion filled with the current rotation of the camera depending on its reference frame. * **position** : Vector filled with the current position of the camera depending on its reference frame. * **reference_frame** : Reference frame for setting the rotation/position. **Return**: The current state of the tracking process (see SL_POSITIONAL_TRACKING_STATE). ### function sl_get_position_array ```cpp INTERFACE_API int sl_get_position_array( int camera_id, float * pose, enum SL_REFERENCE_FRAME reference_frame ) ``` Gets the position of the camera and the current state of the ZED Tracking as a float array (4x4). **Parameters**: * **camera_id** : id of the camera instance. * **pose** : pose of the camera as a float array (float[16]). * **reference_frame** : the reference from which you want the pose to be expressed (see SL_REFERENCE_FRAME::WORLD). **Return**: The Positional tracking state. ### function sl_get_positional_tracking_landmarks ```cpp INTERFACE_API int sl_get_positional_tracking_landmarks( int camera_id, struct SL_Landmark ** landmarks, uint32_t * count ) ``` Get the current positional tracking landmarks. \Note the landmarks array has to be freed by the user. **Parameters**: * **camera_id** : id of the camera instance. * **landmarks** Array of presents landmarks. * **count** number of landmarks (size of the landmarks array). **Return**: ERROR_CODE that indicate if the function succeed or not. ### function sl_get_positional_tracking_landmarks_2d ```cpp INTERFACE_API int sl_get_positional_tracking_landmarks_2d( int camera_id, struct SL_Landmark2D ** landmarks2d, uint32_t * count ) ``` Get the current positional tracking 2d landmarks. \Note the landmarks array has to be freed by the user. **Parameters**: * **camera_id** : id of the camera instance. * **landmarks** 2d Array of landmarks. * **count** number of landmarks (size of the landmarks array). **Return**: ERROR_CODE that indicate if the function succeed or not. ### function sl_get_positional_tracking_status ```cpp INTERFACE_API struct SL_PositionalTrackingStatus * sl_get_positional_tracking_status( int camera_id ) ``` Return the current status of positional tracking module. **Return**: SL_POSITIONAL_TRACKING_STATUS current status of positional tracking module. ### function sl_reset_positional_tracking ```cpp INTERFACE_API int sl_reset_positional_tracking( int camera_id, struct SL_Quaternion rotation, struct SL_Vector3 translation ) ``` Resets the tracking, and re-initializes the position with the given pose. **Parameters**: * **camera_id** : Id of the camera instance. * **rotation** : Rotation of the camera in the world frame when the function is called. * **translation** : Position of the camera in the world frame when the function is called. **Return**: SL_ERROR_CODE_SUCCESS if the tracking has been reset, SL_ERROR_CODE_FAILURE otherwise. ### function sl_reset_positional_tracking_with_offset ```cpp INTERFACE_API int sl_reset_positional_tracking_with_offset( int camera_id, struct SL_Quaternion rotation, struct SL_Vector3 translation, struct SL_Quaternion target_quaternion, struct SL_Vector3 target_translation ) ``` Resets the tracking with an offset. **Parameters**: * **camera_id** : Id of the camera instance. * **rotation** : Rotation of the camera in the world frame when the function is called. * **translation** : Position of the camera in the world frame when the function is called. * **target_quaternion** : Rotation offset to apply. * **target_translation** : Translation offset to apply. **Return**: SL_ERROR_CODE_SUCCESS if the tracking has been reset, SL_ERROR_CODE_FAILURE otherwise. ### function sl_set_imu_prior_orientation ```cpp INTERFACE_API int sl_set_imu_prior_orientation( int camera_id, struct SL_Quaternion rotation ) ``` Set an optional IMU orientation hint that will be used to assist the tracking during the next sl_grab(). **Parameters**: * **rotation** : Prior rotation. **Return**: * SL_ERROR_CODE_SUCCESS if sensors data have been extracted. * SL_ERROR_CODE_SENSORS_NOT_AVAILABLE if the camera model is a SL_MODEL_ZED. * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct but the sensors module is not opened. * SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS if the **reference_time** is not valid. **Note**: This function is only effective if the camera has a model other than a SL_MODEL_ZED, which does not contains internal sensors. Prior must come from a external IMU, such as the HMD orientation and should be in a time frame that's as close as possible to the camera. ### function sl_get_imu_orientation ```cpp INTERFACE_API int sl_get_imu_orientation( int camera_id, struct SL_Quaternion * quat, enum SL_TIME_REFERENCE time_reference ) ``` Gets the rotation given by the IMU. **Parameters**: * **camera_id** : id of the camera instance. * **quat** : [Out] Rotation from the IMU. * **time_reference** : time reference. **Return**: * SL_ERROR_CODE_SUCCESS if sensors data have been extracted. * SL_ERROR_CODE_SENSORS_NOT_AVAILABLE if the camera model is a SL_MODEL_ZED. * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct but the sensors module is not opened. * SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS if the **reference_time** is not valid. **Note**: This function is only effective if the camera has a model other than a SL_MODEL_ZED, which does not contains internal sensors. ### function sl_get_sensors_data ```cpp INTERFACE_API int sl_get_sensors_data( int camera_id, struct SL_SensorsData * data, enum SL_TIME_REFERENCE time_reference ) ``` Gets SL_SensorsData (IMU, magnetometer, barometer) at a specific time reference. **Parameters**: * **camera_id** : Id of the camera instance. * **data** : The SL_SensorsData variable to store the data. * **time_reference** : Defines the reference from which you want the data to be expressed. **Return**: * SL_ERROR_CODE_SUCCESS if sensors data have been extracted. * SL_ERROR_CODE_SENSORS_NOT_AVAILABLE if the camera model is a SL_MODEL_ZED. * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct but the sensors module is not opened. * SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS if the **reference_time** is not valid. **Note**: This function is only effective if the camera has a model other than a SL_MODEL_ZED, which does not contains internal sensors. ### function sl_get_sensors_data_batch_count ```cpp INTERFACE_API int sl_get_sensors_data_batch_count( int camera_id, int * count ) ``` Retrieves the size of the imu batch array. Needs to be called before sl_get_sensors_data_batch(). **Parameters**: * **count** : The number of sensors data available in the batch. * **camera_id** : Id of the camera instance. **Return**: * SL_ERROR_CODE_SUCCESS if sensors data have been extracted. * SL_ERROR_CODE_SENSORS_NOT_AVAILABLE if the camera model is a SL_MODEL_ZED. * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct but the sensors module is not opened. * SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS if the **reference_time** is not valid. ### function sl_get_sensors_data_batch ```cpp INTERFACE_API int sl_get_sensors_data_batch( int camera_id, struct SL_SensorsData ** data ) ``` Retrieves all SL_SensorsData associated to most recent grabbed frame in the specified COORDINATE_SYSTEM of InitParameters. **Parameters**: * **data** : The SensorsData array to store the data. * **camera_id** : Id of the camera instance. **Return**: * SL_ERROR_CODE_SUCCESS if sensors data have been extracted. * SL_ERROR_CODE_SENSORS_NOT_AVAILABLE if the camera model is a SL_MODEL_ZED. * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct but the sensors module is not opened. * SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS if the **reference_time** is not valid. **Note**: sl_get_sensors_data_batch needs to be called before this function to retrieve the size of the imu batch array. ### function sl_spatial_mapping_merge_chunks ```cpp INTERFACE_API void sl_spatial_mapping_merge_chunks( int camera_id, int nb_faces, int * nb_vertices, int * nb_triangles, int * nb_updated_submeshes, int * updated_indices, int * nb_vertices_tot, int * nb_triangles_tot, const int max_submesh ) ``` Consolidates the chucks from a scan. This is used to turn a lots of small meshes (which are efficient for the scanning process) into several large meshes (which are more convenient to work with). **Parameters**: * **camera_id** : id of the camera instance. * **nb_faces** : define the new number of faces per chunk (useful for Unity that doesn't handle chunks over 65K vertices). * **nb_vertices** : Array of the number of vertices in each sub-mesh. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **nb_updated_submeshes** : Number of sub-meshes. * **updates_indices** : List of all sub-meshes updated since the last update. * **nb_vertices_tot** : Total number of updated vertices in all sub-meshes. * **nb_triangles_tot** : Total number of updated triangles in all sub-meshes. * **max_sub_mesh** : Maximum number of sub-meshes. ### function sl_enable_spatial_mapping ```cpp INTERFACE_API int sl_enable_spatial_mapping( int camera_id, struct SL_SpatialMappingParameters * mapping_param ) ``` Initializes and starts the spatial mapping processes. **Parameters**: * **camera_id** : Id of the camera instance. * **type** : Spatial mapping type (see SL_SPATIAL_MAP_TYPE). * **resolution_meter** : Spatial mapping resolution in meters. * **max_range_meter** : Maximum scanning range in meters. * **save_texture** : True to scan surface textures in addition to geometry. * **max_memory_usage** : The maximum CPU memory (in megabytes) allocated for the meshing process. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. ### function sl_disable_spatial_mapping ```cpp INTERFACE_API void sl_disable_spatial_mapping( int camera_id ) ``` Disables the spatial mapping process. **Parameters**: * **camera_id** : Id of the camera instance. ### function sl_get_spatial_mapping_parameters ```cpp INTERFACE_API struct SL_SpatialMappingParameters * sl_get_spatial_mapping_parameters( int camera_id ) ``` Returns the SL_SpatialMappingParameters used. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_SpatialMappingParameters containing the parameters used for spatial mapping initialization. It corresponds to the structure given as argument to the sl_enable_spatial_mapping() method. ### function sl_pause_spatial_mapping ```cpp INTERFACE_API void sl_pause_spatial_mapping( int camera_id, bool status ) ``` **Parameters**: * **camera_id** : Id of the camera instance. * **status** : If true, the integration is paused. If false, the spatial mapping is resumed. Pauses or resumes the spatial mapping processes. ### function sl_request_mesh_async ```cpp INTERFACE_API void sl_request_mesh_async( int camera_id ) ``` Starts the spatial map generation process in a non-blocking thread from the spatial mapping process. **Parameters**: * **camera_id** : Id of the camera instance. ### function sl_get_mesh_request_status_async ```cpp INTERFACE_API int sl_get_mesh_request_status_async( int camera_id ) ``` Returns the spatial map generation status. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_ERROR_CODE_SUCCESS if the mesh or the point cloud is ready and not yet retrieved, otherwise SL_ERROR_CODE_FAILURE. Useful for knowing when to update and retrieve the mesh or the point cloud. ### function sl_get_spatial_mapping_state ```cpp INTERFACE_API enum SL_SPATIAL_MAPPING_STATE sl_get_spatial_mapping_state( int camera_id ) ``` Returns the current spatial mapping state. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: The current state of the spatial mapping process. As the spatial mapping runs asynchronously, this function allows you to get reported errors or status info. ### function sl_update_mesh ```cpp INTERFACE_API int sl_update_mesh( int camera_id, int * nb_vertices_per_submesh, int * nb_triangles_per_submesh, int * nb_submeshes, int * updated_indices, int * nb_vertices_tot, int * nb_triangles_tot, const int max_submesh ) ``` Updates the internal version of the mesh and returns the sizes of the meshes. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_vertices** : Array of the number of vertices in each sub-mesh. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **nb_submeshes** : Number of sub-meshes. * **updates_indices** : List of all sub-meshes updated since the last update. * **num_vertices_tot** : Total number of updated vertices in all sub-meshes. * **num_triangles_tot** : Total number of updated triangles in all sub-meshes. * **max_sub_mesh** : Maximum number of sub-meshes. **Return**: SL_ERROR_CODE_SUCCESS if the mesh is updated. ### function sl_retrieve_mesh ```cpp INTERFACE_API int sl_retrieve_mesh( int camera_id, float * vertices, int * triangles, unsigned char * colors, float * uvs, unsigned char * texture_ptr, const int max_submeshes ) ``` Retrieves all chunks of the current mesh. **Parameters**: * **camera_id** : Id of the camera instance. * **vertices** : Vertices of the mesh * **triangles** : Triangles of the mesh. * **colors** : BGR colors of each vertex. * **max_submeshes** : Maximum number of sub-mesh that can be handled. * **uvs** : UVs of the texture. * **texture_ptr** : Texture of the mesh (if enabled). **Return**: SL_ERROR_CODE_SUCCESS if the mesh is retrieved. **Note**: Call sl_update_mesh before calling this. Vertex and triangles arrays must be at least of the sizes returned by sl_update_mesh (nb_vertices and nb_triangles). ### function sl_update_chunks ```cpp INTERFACE_API int sl_update_chunks( int camera_id, int * nb_vertices_per_submesh, int * nb_triangles_per_submesh, int * nb_submeshes, int * updated_indices, int * nb_vertices_tot, int * nb_triangles_tot, const int max_submesh ) ``` Updates the Internal version of the mesh and returns the sizes of the meshes. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_vertices** : Array of the number of vertices in each sub-mesh. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **nb_submeshes** : Number of sub-meshes. * **updates_indices** : List of all sub-meshes updated since the last update. * **num_vertices_tot** : Total number of updated vertices in all sub-meshes. * **num_triangles_tot** : Total number of updated triangles in all sub-meshes. * **max_sub_mesh** : Maximum number of sub-meshes. **Return**: SL_ERROR_CODE_SUCCESS if the chunks are updated. ### function sl_retrieve_chunks ```cpp INTERFACE_API int sl_retrieve_chunks( int camera_id, float * vertices, int * triangles, unsigned char * colors, float * uvs, unsigned char * texture_ptr, const int max_submesh ) ``` Retrieves all chunks of the full mesh. **Parameters**: * **camera_id** : Id of the camera instance. * **max_submesh** : Maximum number of sub-mesh that can be handled. * **vertices** : Vertices of the chunk. * **triangles** : Triangles of the chunk. * **colors** : BGR colors of the chunk. * **uvs** : UVs of the texture. * **texture_ptr** : Texture of the mesh (if enabled). **Return**: SL_ERROR_CODE_SUCCESS if the chunk is retrieved. **Note**: Call sl_update_mesh before calling this. Vertex and triangles arrays must be at least of the sizes returned by sl_update_mesh (nbVertices and nbTriangles). ### function sl_update_fused_point_cloud ```cpp INTERFACE_API int sl_update_fused_point_cloud( int camera_id, int * nb_vertices_tot ) ``` Updates the fused point cloud (if spatial map type was SL_SPATIAL_MAP_TYPE_FUSED_POINT_CLOUD). **Parameters**: * **camera_id** : Id of the camera instance. * **num_vertices_tot** : The total number of vertices. **Return**: SL_ERROR_CODE_SUCCESS if the fused point cloud is updated. ### function sl_retrieve_fused_point_cloud ```cpp INTERFACE_API int sl_retrieve_fused_point_cloud( int camera_id, float * vertices ) ``` Retrieves all points of the fused point cloud. **Parameters**: * **camera_id** : Id of the camera instance. * **vertices** : Points of the fused point cloud. **Return**: SL_ERROR_CODE_SUCCESS if the fused point cloud is retrieved. **Note**: Call sl_update_fused_point_cloud before calling this. ### function sl_extract_whole_spatial_map ```cpp INTERFACE_API int sl_extract_whole_spatial_map( int camera_id ) ``` Extracts the current spatial map from the spatial mapping process. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_ERROR_CODE_SUCCESS if the mesh is filled and available, otherwise SL_ERROR_CODE_FAILURE. ### function sl_save_mesh ```cpp INTERFACE_API bool sl_save_mesh( int camera_id, const char * filename, enum SL_MESH_FILE_FORMAT format ) ``` Saves the scanned mesh in a specific file format. **Parameters**: * **camera_id** : Id of the camera instance. * **filename** : Path and filename of the mesh. * **format** : File format (extension). Can be .obj, .ply or .bin. **Return**: Has the mesh been save successfully. ### function sl_save_point_cloud ```cpp INTERFACE_API bool sl_save_point_cloud( int c_id, const char * filename, enum SL_MESH_FILE_FORMAT format ) ``` Saves the scanned point cloud in a specific file format. **Parameters**: * **camera_id** : Id of the camera instance. * **filename** : Path and filename of the point cloud. * **format** : File format (extension). Can be .obj, .ply or .bin. **Return**: Has the point cloud been save successfully. ### function sl_load_mesh ```cpp INTERFACE_API bool sl_load_mesh( int camera_id, const char * filename, int * nb_vertices_per_submesh, int * nb_triangles_per_submesh, int * num_submeshes, int * updated_indices, int * nb_vertices_tot, int * nb_triangles_tot, int * textures_size, const int max_submesh ) ``` Loads a saved mesh file. **Parameters**: * **camera_id** : Id of the camera instance. * **filename** : Path and filename of the mesh. Should include the extension (.obj, .ply or .bin). * **nb_ertices** : Array of the number of vertices in each sub-mesh. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **nb_sub_meshes** : Number of sub-meshes. * **updated_indices** : List of all sub-meshes updated since the last update. * **nb_vertices_tot** : Total number of updated vertices in all sub-meshes. * **nb_triangles_tot** : Array of the number of triangles in each sub-mesh. * **max_submesh** : Maximum number of sub-meshes that can be handled. * **texture_size** : Array containing the sizes of all the textures (width, height) if applicable. **Return**: Has the mesh been loaded successfully. ### function sl_apply_texture ```cpp INTERFACE_API bool sl_apply_texture( int camera_id, int * nb_vertices_per_submesh, int * nb_triangles_per_submesh, int * nb_updated_submeshes, int * updated_indices, int * nb_vertices_tot, int * nb_triangles_tot, int * textures_size, const int max_submesh ) ``` Applies the scanned texture onto the internal scanned mesh. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_vertices** : Array of the number of vertices in each sub-mesh. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **nb_sub_meshes** : Number of sub-meshes. * **updated_indices** : List of all sub-meshes updated since the last update. * **nb_vertices_tot** : Total number of updated vertices in all sub-meshes. * **nb_triangles_tot** : Array of the number of triangles in each sub-mesh. * **max_submesh** : Maximum number of sub-meshes that can be handled. * **texture_size** : Array containing the sizes of all the textures (width, height) if applicable. **Return**: Has the texture been applied successfully. ### function sl_filter_mesh ```cpp INTERFACE_API bool sl_filter_mesh( int camera_id, enum SL_MESH_FILTER filter_params, int * nb_vertices_per_submesh, int * nb_triangles_per_submesh, int * nb_updated_submeshes, int * updated_indices, int * nb_vertices_tot, int * nb_triangles_tot, const int max_submesh ) ``` Filters a mesh to removes triangles while still preserving its overall shaper (though less accurate). **Parameters**: * **camera_id** : Id of the camera instance. * **filter_params** : Filter level. Higher settings remove more triangles (SL_MESH_FILTER). * **nb_vertices** : Array of the number of vertices in each sub-mesh. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **nb_sub_meshes** : Number of sub-meshes. * **updated_indices** : List of all sub-meshes updated since the last update. * **nb_vertices_tot** : Total number of updated vertices in all sub-meshes. * **nb_triangles_tot** : Array of the number of triangles in each sub-mesh. * **max_submesh** : Maximum number of sub-meshes that can be handled. **Return**: Has the mesh been filtered successfully. ### function sl_spatial_mapping_get_gravity_estimation ```cpp INTERFACE_API void sl_spatial_mapping_get_gravity_estimation( int camera_id, struct SL_Vector3 * gravity ) ``` Gets a vector pointing toward the direction of gravity. This is estimated from a 3D scan of the environment, and such, a scan must be started and finished for this value to be calculated. If using a model other than SL_MODEL_ZED, this isn't required thanks to its IMU. **Parameters**: * **camera_id** : Id of the camera instance. * **gravity** : [Out] The vector of gravity. ### function sl_update_whole_mesh ```cpp INTERFACE_API int sl_update_whole_mesh( int camera_id, int * nb_vertices, int * nb_triangles ) ``` Updates the internal version of the whole mesh and returns the size of its data. **Parameters**: * **camera_id** : id of the camera instance. * **nb_vertices** : Total number of updated vertices in all sub-meshes. * **nb_triangles** : Total number of updated triangles in all sub-meshes. **Return**: SUCCESS if the chunks are updated. ### function sl_retrieve_whole_mesh ```cpp INTERFACE_API int sl_retrieve_whole_mesh( int camera_id, float * vertices, int * triangles, unsigned char * colors, float * uvs, unsigned char * texture_ptr ) ``` Retrieves the full mesh. Call update_mesh before calling this. Vertex and triangles arrays must be at least of the sizes returned by update_mesh (nb_vertices and nbTriangles). **Parameters**: * **camera_id** : id of the camera instance. * **vertices** : Vertices of the mesh * **triangles** : Triangles of the mesh. * **colors** : (b,g,r) colors of the mesh. * **uvs** : uvs of the texture. * **texture_ptr** : Texture of the mesh (if enabled). **Return**: SUCCESS if the chunk is retrieved. ### function sl_load_whole_mesh ```cpp INTERFACE_API bool sl_load_whole_mesh( int camera_id, const char * filename, int * nb_vertices, int * nb_triangles, int * texture_size ) ``` Loads a saved mesh file. **Parameters**: * **camera_id** : id of the camera instance. * **filename** : Path and filename of the mesh. Should include the extension (.obj, .ply or .bin). * **nb_vertices** : Total number of updated vertices in all sub-meshes. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **max_submesh** : Maximum number of sub-meshes that can be handled. * **texture_size** : Array containing the sizes of all the textures (width ,height) if applicable. **Return**: Has the mesh been loaded successfully. ### function sl_apply_whole_texture ```cpp INTERFACE_API bool sl_apply_whole_texture( int camera_id, int * nb_vertices, int * nb_triangles, int * texture_size ) ``` Applies the scanned texture onto the internal scanned mesh. **Parameters**: * **camera_id** : id of the camera instance. * **nb_vertices** : Total number of updated vertices in all sub-meshes. * **nb_triangles** : Array of the number of triangles in each sub-mesh. * **texture_size** : Array containing the sizes of all the textures (width ,height) if applicable. **Return**: Has the texture been applied successfully. ### function sl_filter_whole_mesh ```cpp INTERFACE_API bool sl_filter_whole_mesh( int camera_id, enum SL_MESH_FILTER filter_params, int * nb_vertices, int * nb_triangles ) ``` Filters a mesh to removes triangles while still preserving its overall shaper (though less accurate). **Parameters**: * **camera_id** : id of the camera instance. * **nb_vertices** : Total number of updated vertices in all sub-meshes. * **nb_triangles** : Array of the number of triangles in each sub-mesh. **Return**: Has the mesh been filtered successfully. ### function sl_find_floor_plane ```cpp INTERFACE_API struct SL_PlaneData * sl_find_floor_plane( int camera_id, struct SL_Quaternion * reset_quaternion, struct SL_Vector3 * reset_translation, struct SL_Quaternion prior_rotation, struct SL_Vector3 prior_translation ) ``` Detect the floor plane of the scene. **Parameters**: * **camera_id** : Id of the camera instance. * **reset_quaternion** : The rotation to align the axis with the gravity. * **reset_translation** : The translation to align the tracking with the floor plane. The initial position will then be at ground height. * **prior_rotation** : Prior rotation. * **prior_translation** : Prior translation. **Return**: The detected floor plane if the function succeeded. ### function sl_find_plane_at_hit ```cpp INTERFACE_API struct SL_PlaneData * sl_find_plane_at_hit( int camera_id, struct SL_Vector2 pixel, struct SL_PlaneDetectionParameters * params, bool thres ) ``` Checks the plane at the given left image coordinates. **Parameters**: * **camera_id** : Id of the camera instance. * **pixel** : The image coordinate. The coordinate must be taken from the full-size image. * **params** : A structure containing all the specific parameters for the plane detection. Default: a preset of SL_PlaneDetectionParameters. * **thres** : Check if area is enough for Unity. If true, removes smaller planes. **Return**: Data of the detected plane. ### function sl_convert_floorplane_to_mesh ```cpp INTERFACE_API int sl_convert_floorplane_to_mesh( int camera_id, float * vertices, int * triangles, int * nb_vertices_tot, int * nb_triangles_tot ) ``` Using data from a detected floor plane, updates supplied vertex and triangles arrays with data needed to make a mesh that represents it. **Parameters**: * **camera_id** : id of the camera instance. * **vertices** : Array to be filled with mesh vertices. * **triangles** : Array to be filled with mesh triangles, stored as indexes of each triangle's points. * **nb_vertices_tot** : Total number of vertices in the mesh. * **nb_triangles_tot** : Total triangles indexes (3x number of triangles). **Return**: SUCCESS if the mesh conversion was successful. ### function sl_convert_hitplane_to_mesh ```cpp INTERFACE_API int sl_convert_hitplane_to_mesh( int camera_id, float * vertices, int * triangles, int * nb_vertices_tot, int * nb_triangles_tot ) ``` Using data from a detected hit plane, updates supplied vertex and triangles arrays with data needed to make a mesh that represents it. **Parameters**: * **camera_id** : id of the camera instance. * **vertices** : Array to be filled with mesh vertices. * **triangles** : Array to be filled with mesh triangles, stored as indexes of each triangle's points. * **nb_vertices_tot** : Total number of vertices in the mesh. * **nb_triangles_tot** : Total triangles indexes (3x number of triangles). **Return**: SUCCESS if the mesh conversion was successful. ### function sl_retrieve_measure ```cpp INTERFACE_API int sl_retrieve_measure( int camera_id, void * measure_ptr, enum SL_MEASURE type, enum SL_MEM mem, int width, int height, void * custream ) ``` Retrieves a measure texture from the ZED SDK. **Parameters**: * **camera_id** : Id of the camera instance. * **measure_ptr** : Pointer to the measure texture. * **type** : Measure type (depth, confidence, xyz, etc). See SL_MEASURE. * **mem** : Whether the measure should be on CPU or GPU memory. See SL_MEM. * **width** : Width of the texture in pixel. If set to 0, the camera resolution or SL_InitParameters.maximum_working_resolution will be taken, whichever is the smallest. * **height** : Height of the texture in pixel. If set to 0, the camera resolution or SL_InitParameters.maximum_working_resolution will be taken, whichever is the smallest. **Return**: * SL_ERROR_CODE_SUCCESS if the retrieve succeeded. * SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS if the view mode requires a module not enabled (VIEW::DEPTH with DEPTH_MODE::NONE for example). * SL_ERROR_CODE_INVALID_RESOLUTION if the resolution is higher than one provided by getCameraInformation().camera_configuration.resolution. * SL_ERROR_CODE_FAILURE if another error occurred. Use this to get an individual texture from the last grabbed frame with measurements in every pixel - such as depth map, confidence map etc. Measure textures are not human-viewable but don't lose accuracy, unlike image textures. ### function sl_retrieve_voxel_measure ```cpp INTERFACE_API int sl_retrieve_voxel_measure( int camera_id, void * measure_ptr, enum SL_MEASURE type, enum SL_MEM mem, struct SL_VoxelMeasureParameters * params, void * stream ) ``` Retrieves a voxel-decimated point cloud from the ZED SDK. **Parameters**: * **camera_id** : Id of the camera instance. * **measure_ptr** : Pointer to the output Mat that will receive the voxel measure result. * **type** : Measure type. Must be a point-cloud type (e.g. SL_MEASURE_XYZRGBA). * **mem** : Whether the output should be on CPU or GPU memory (SL_MEM). * **params** : Voxelization parameters controlling voxel size and depth-adaptive mode. See SL_VoxelMeasureParameters. * **stream** : CUDA stream to use for the computation (0 for default stream). **Return**: SL_ERROR_CODE_SUCCESS if the retrieve succeeded. Applies spatial decimation (voxelization) to the depth map before returning the point cloud, reducing point density while preserving structure. Useful for reducing data volume for downstream processing. ### function sl_retrieve_image ```cpp INTERFACE_API int sl_retrieve_image( int camera_id, void * image_ptr, enum SL_VIEW type, enum SL_MEM mem, int width, int height, void * custream ) ``` Retrieves an image texture from the ZED SDK in a human-viewable format. **Parameters**: * **camera_id** : Id of the camera instance. * **image_ptr** : Pointer to the image texture. * **type** : Image type (left RGB, right depth map, etc). See SL_VIEW. * **mem** : Whether the image should be on CPU or GPU memory (SL_MEM). * **width** : Width of the texture in pixel. If set to 0, the camera resolution or SL_InitParameters.maximum_working_resolution will be taken, whichever is the smallest. * **height** : Height of the texture in pixel. If set to 0, the camera resolution or SL_InitParameters.maximum_working_resolution will be taken, whichever is the smallest. **Return**: SL_ERROR_CODE_SUCCESS if the retrieve succeeded. Image textures work for when you want the result to be visible, such as the direct RGB image from the camera, or a greyscale image of the depth. However it will lose accuracy if used to show measurements like depth or confidence, unlike measure textures. ### function sl_convert_image ```cpp INTERFACE_API int sl_convert_image( void * image_in_ptr, void * image_signed_ptr, void * stream ) ``` Convert Image format from Unsigned char to Signed char, designed for Unreal Engine pipeline, works on GPU memory. **Parameters**: * **image_in** : input image to convert * **image_signed** : output image to converted * **stream** : a cuda stream to put the compute to (def. 0) **Note**: If the Output Mat does not satisfies the requirements, it is freed and re-allocated. ### function sl_enable_streaming ```cpp INTERFACE_API int sl_enable_streaming( int camera_id, enum SL_STREAMING_CODEC codec, unsigned int bitrate, unsigned short port, int gop_size, int adaptative_bitrate, int chunk_size, int target_framerate ) ``` Creates a streaming pipeline. **Parameters**: * **camera_id** : Id of the camera instance. * **codec** : defines the codec used for streaming (see SL_STREAMING_CODEC). * **bitrate** : defines the streaming bitrate in Kbits/s. * **port** : Defines the port used for streaming. * **gop_size** : Defines the gop size in number of frames. * **adaptative_bitrate** : Enable/disable adaptive bitrate. * **chunk_size** : Defines a single chunk size. * **target_framrate** : Defines the target framerate for the streaming output. **Return**: An SL_ERROR_CODE that defines if the stream was started. **Note**: Available range for **bitrate**: [1000 - 60000] | STREAMING_CODEC | Resolution | FPS | bitrate (kbps) | | -------- | -------- | -------- | -------- | | H264 | HD2K | 15 | 8500 | | H264 | HD1080 | 30 | 12500 | | H264 | HD720 | 60 | 7000 | | H265 | HD2K | 15 | 7000 | | H265 | HD1080 | 30 | 11000 | | H265 | HD720 | 60 | 6000 | ### function sl_disable_streaming ```cpp INTERFACE_API void sl_disable_streaming( int camera_id ) ``` Disables the streaming initiated by sl_enable_streaming(). **Parameters**: * **camera_id** : Id of the camera instance. ### function sl_is_streaming_enabled ```cpp INTERFACE_API int sl_is_streaming_enabled( int camera_id ) ``` Tells if the streaming is running. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: Is the streaming running successfully. ### function sl_get_streaming_parameters ```cpp INTERFACE_API struct SL_StreamingParameters * sl_get_streaming_parameters( int camera_id ) ``` Returns the SL_StreamingParameters used. **Return**: SL_StreamingParameters containing the parameters used for streaming initialization. It corresponds to the structure given as argument to the sl_enable_streaming() function. ### function sl_save_current_image ```cpp INTERFACE_API int sl_save_current_image( int camera_id, enum SL_VIEW view, const char * file_name ) ``` Writes the image into a file defined by its extension. **Parameters**: * **camera_id** : id of the camera instance. * **view** : View of the image (SL_VIEW). * **file_name** : file path including the name and extension. **Return**: SUCCESS if the image was successfuly saved. ### function sl_save_current_depth ```cpp INTERFACE_API int sl_save_current_depth( int camera_id, enum SL_SIDE side, const char * file_name ) ``` Writes the depth map into a file defined by its extension. **Parameters**: * **camera_id** : id of the camera instance. * **side** : side of the image (0 = left, 1 = right). * **file_name** : file path including the name and extension. **Return**: SUCCESS if the depth was successfuly saved. ### function sl_save_current_point_cloud ```cpp INTERFACE_API int sl_save_current_point_cloud( int camera_id, enum SL_SIDE side, const char * file_name ) ``` Writes the point cloud into a file defined by its extension. **Parameters**: * **camera_id** : id of the camera instance. * **side** : side of the pc (0 = left, 1 = right). * **file_name** : file path including the name and extension. **Return**: SUCCESS if the point cloud was successfuly saved. ### function sl_check_AI_model_status ```cpp INTERFACE_API struct SL_AI_Model_status * sl_check_AI_model_status( enum SL_AI_MODELS model, int gpu_id ) ``` Check if a corresponding optimized engine is found for the requested Model based on your rig configuration. **Parameters**: * **model** : AI model to check. * **gpu_id** : ID of the gpu. **Return**: The status of the given model for the specified GPU. ### function sl_optimize_AI_model ```cpp INTERFACE_API int sl_optimize_AI_model( enum SL_AI_MODELS model, int gpu_id ) ``` Optimize the requested model, possible download if the model is not present on the host. **Parameters**: * **model** : AI model to optimize. * **gpu_id** : ID of the gpu to optimize on. **Return**: SUCCESS if the model is well optimized. ### function sl_enable_object_detection ```cpp INTERFACE_API int sl_enable_object_detection( int camera_id, struct SL_ObjectDetectionParameters * object_detection_parameters ) ``` Initializes and starts object detection module. **Parameters**: * **camera_id** : Id of the camera instance. * **object_detection_parameters** : A structure containing all the specific parameters for the object detection. Default: a preset of SL_ObjectDetectionParameters. **Return**: * SL_ERROR_CODE_SUCCESS if everything went fine. * SL_ERROR_CODE_CORRUPTED_SDK_INSTALLATION if the AI model is missing or corrupted. In this case, the SDK needs to be reinstalled. * SL_ERROR_CODE_MODULE_NOT_COMPATIBLE_WITH_CAMERA if the camera used does not have a IMU (SL_MODEL_ZED). * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct (not SL_MODEL_ZED) but the IMU is missing. It probably happens because SL_InitParameters::sensors_required was set to false and that IMU has not been found. * SL_ERROR_CODE_INVALID_FUNCTION_CALL if one of the **object_detection_parameters** parameter is not compatible with other modules parameters (for example, **depth_mode** has been set to SL_DEPTH_MODE_NONE). * SL_ERROR_CODE_FAILURE otherwise. **Note**: * - **This Deep Learning detection module is not available for MODEL::ZED cameras (ZED first generation).**. * - This feature uses AI to locate objects and requires a powerful GPU. A GPU with at least 3GB of memory is recommended. * The IMU gives the gravity vector that helps in the 3D box localization. The object detection module currently support multiple StereoLabs' model for different purposes: "MULTI_CLASS", "PERSON_HEAD" The full list of model is available through SL_OBJECT_DETECTION_MODEL and the full list of detectable objects is available through SL_OBJECT_CLASS and SL_OBJECT_SUBCLASS. Detected objects can be retrieved using the sl_retrieve_objects() function. ### function sl_get_object_detection_parameters ```cpp INTERFACE_API struct SL_ObjectDetectionParameters * sl_get_object_detection_parameters( int camera_id ) ``` Returns the SL_ObjectDetectionParameters used. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_ObjectDetectionParameters containing the parameters used for object detection initialization. It corresponds to the structure given as argument to the sl_enable_object_detection() function. ### function sl_disable_object_detection ```cpp INTERFACE_API void sl_disable_object_detection( int camera_id, unsigned int instance_id, bool force_disable_all_instances ) ``` Disables the Object Detection process. **Parameters**: * **camera_id** : Id of the camera instance. * **instance_id** : Id of the object detection instance. Used when multiple instances of the object detection module are enabled at the same time. * **force_disable_all_instances** : Should disable all instances of the object detection module or just **instance_id**. The object detection module immediately stops and frees its memory allocations. ### function sl_set_object_detection_runtime_parameters ```cpp INTERFACE_API int sl_set_object_detection_runtime_parameters( int camera_id, struct SL_ObjectDetectionRuntimeParameters object_detection_parameters, unsigned int instance_id ) ``` Set the Object detection module instance runtime parameters By default the object detection module will use the parameters set in the ObjectDetectionRuntimeParameters constructor. This can be changed at any time, however since the processing is done in parallel, the parameters will be used for the next inference. This function can be called only on parameters change, the previous values will be applied during inference. **Parameters**: * **camera_id** : Id of the camera instance. * **params** : ObjectDetectionRuntimeParameters parameters * **instance_id** : Object detection instance id, by default the first instance ### function sl_enable_body_tracking ```cpp INTERFACE_API int sl_enable_body_tracking( int camera_id, struct SL_BodyTrackingParameters * body_tracking_parameters ) ``` Initializes and starts the Deep Learning Body Tracking module. **Parameters**: * **camera_id** : Id of the camera instance. * **body_tracking_parameters** : A structure containing all the specific parameters for the body tracking. Default: a preset of SL_BodyTrackingParameters. **Return**: * SL_ERROR_CODE_SUCCESS if everything went fine. * SL_ERROR_CODE_CORRUPTED_SDK_INSTALLATION if the AI model is missing or corrupted. In this case, the SDK needs to be reinstalled. * SL_ERROR_CODE_MODULE_NOT_COMPATIBLE_WITH_CAMERA if the camera used does not have a IMU (SL_MODEL_ZED). * SL_ERROR_CODE_MOTION_SENSORS_REQUIRED if the camera model is correct (not SL_MODEL_ZED) but the IMU is missing. It probably happens because SL_InitParameters::sensors_required was set to false and that IMU has not been found. * SL_ERROR_CODE_INVALID_FUNCTION_CALL if one of the **object_detection_parameters** parameter is not compatible with other modules parameters (for example, **depth_mode** has been set to SL_DEPTH_MODE_NONE). * SL_ERROR_CODE_FAILURE otherwise. **Note**: * - **This Deep Learning detection module is not available for MODEL::ZED cameras (ZED first generation).**. * - This feature uses AI to locate objects and requires a powerful GPU. A GPU with at least 3GB of memory is recommended. * The IMU gives the gravity vector that helps in the 3D box localization. The body tracking module currently supports multiple classes of human skeleton detection with the SL_BODY_TRACKING_MODEL_HUMAN_BODY_FAST, SL_BODY_TRACKING_MODEL_HUMAN_BODY_MEDIUM or SL_BODY_TRACKING_MODEL_HUMAN_BODY_ACCURATE. This model only detects humans but provides a full skeleton map for each person. Detected objects can be retrieved using the sl_retrieve_bodies() function. ### function sl_get_body_tracking_parameters ```cpp INTERFACE_API struct SL_BodyTrackingParameters * sl_get_body_tracking_parameters( int camera_id ) ``` Returns the SL_BodyTrackingParameters used. **Parameters**: * **camera_id** : Id of the camera instance. **Return**: SL_BodyTrackingParameters containing the parameters used for body tracking initialization. It corresponds to the structure given as argument to the sl_enable_body_tracking() function. ### function sl_disable_body_tracking ```cpp INTERFACE_API void sl_disable_body_tracking( int camera_id, unsigned int instance_id, bool force_disable_all_instances ) ``` Disables the body tracking process. **Parameters**: * **camera_id** : Id of the camera instance. * **instance_id** : Id of the body tracking instance. Used when multiple instances of the body tracking module are enabled at the same time. * **force_disable_all_instances** : Should disable all instances of the tracking module module or just **instance_id**. The body tracking module immediately stops and frees its memory allocations. ### function sl_set_body_tracking_runtime_parameters ```cpp INTERFACE_API int sl_set_body_tracking_runtime_parameters( int camera_id, struct SL_BodyTrackingRuntimeParameters body_tracking_parameters, unsigned int instance_id ) ``` Set the Body tracking module instance runtime parameters By default the Body tracking module will use the parameters set in the BodyTrackingRuntimeParameters constructor. This can be changed at any time, however since the processing is done in parallel, the parameters will be used for the next inference. This function can be called only on parameters change, the previous values will be applied during inference. **Parameters**: * **params** : BodyTrackingRuntimeParameters parameters * **instance_id** : Body tracking instance id, by default the first instance ### function sl_generate_unique_id ```cpp INTERFACE_API int sl_generate_unique_id( char * uuid ) ``` Generate a UUID like unique id to help identify and track AI detections. **Parameters**: * **uuid** : Unique ID generated. **Return**: Size of the unique ID generated. ### function sl_generate_unique_id_str ```cpp INTERFACE_API int sl_generate_unique_id_str( char * uuid ) ``` ### function sl_ingest_custom_box_objects ```cpp INTERFACE_API int sl_ingest_custom_box_objects( int camera_id, int nb_objects, struct SL_CustomBoxObjectData * objects_in, unsigned int instance_id ) ``` Feed the 3D Object tracking function with your own 2D bounding boxes from your own detection algorithm. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_objects** : Number of custom objects (size of the object_in array). * **objects_in** : 2D detections from custom detection algorithm. * **instance_id** : Id of the Object detection instance. Used when multiple instances of the BT module are enabled at the same time. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. **Note**: The detection should be done on the current grabbed left image as the internal process will use all current available data to extract 3D informations and perform object tracking. ### function sl_ingest_custom_mask_objects ```cpp INTERFACE_API int sl_ingest_custom_mask_objects( int camera_id, int nb_objects, struct SL_CustomMaskObjectData * objects_in, unsigned int instance_id ) ``` Feed the 3D Object tracking function with your own 2D bounding boxes with masks from your own detection algorithm. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_objects** : Number of custom objects (size of the object_in array). * **objects_in** : 2D detections from custom detection algorithm. * **instance_id** : Id of the Object detection instance. Used when multiple instances of the BT module are enabled at the same time. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. **Note**: The detection should be done on the current grabbed left image as the internal process will use all current available data to extract 3D informations and perform object tracking. ### function sl_retrieve_objects ```cpp INTERFACE_API int sl_retrieve_objects( int camera_id, struct SL_ObjectDetectionRuntimeParameters * object_detection_runtime_parameters, struct SL_Objects * objects, unsigned int instance_id ) ``` Retrieve objects detected by the object detection module. **Parameters**: * **camera_id** : Id of the camera instance. * **objects** : The detected objects will be saved into this object. If the object already contains data from a previous detection, it will be updated, keeping a unique ID for the same person. * **object_detection_runtime_parameters** : Object detection runtime settings, can be changed at each detection. In async mode, the parameters update is applied on the next iteration. * **instance_id** : Id of the object detection instance. Used when multiple instances of the object detection module are enabled at the same time. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. ### function sl_retrieve_custom_objects ```cpp INTERFACE_API int sl_retrieve_custom_objects( int camera_id, struct SL_CustomObjectDetectionRuntimeParameters * object_detection_runtime_parameters, struct SL_Objects * objects, unsigned int instance_id ) ``` Retrieve objects detected by the custom object detection module. **Parameters**: * **camera_id** : Id of the camera instance. * **object_detection_runtime_parameters** : Custom object detection runtime settings, can be changed at each detection. In async mode, the parameters update is applied on the next iteration. * **objects** : The detected objects will be saved into this object. If the object already contains data from a previous detection, it will be updated, keeping a unique ID for the same person. * **instance_id** : Id of the object detection instance. Used when multiple instances of the object detection module are enabled at the same time. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. ### function sl_set_custom_object_detection_runtime_parameters ```cpp INTERFACE_API int sl_set_custom_object_detection_runtime_parameters( int camera_id, struct SL_CustomObjectDetectionRuntimeParameters custom_object_detection_parameters, unsigned int instance_id ) ``` Set the Object detection module instance runtime parameters when using the Custom model (OBJECT_DETECTION_MODEL::CUSTOM_BOX_OBJECTS and CUSTOM_BOX_OBJECTS::CUSTOM_YOLOLIKE_BOX_OBJECTS) By default the object detection module will use the parameters set in the CustomObjectDetectionRuntimeParameters constructor. This can be changed at any time, however since the processing is done in parallel, the parameters will be used for the next inference. This function can be called only on parameters change, the previous values will be applied during inference. **Parameters**: * **camera_id** : Id of the camera instance. * **params** : CustomObjectDetectionRuntimeParameters parameters * **instance_id** : Object detection instance id, by default the first instance ### function sl_retrieve_bodies ```cpp INTERFACE_API int sl_retrieve_bodies( int camera_id, struct SL_BodyTrackingRuntimeParameters * body_tracking_runtime_parameters, struct SL_Bodies * bodies, unsigned int instance_id ) ``` Retrieve bodies detected by the body tracking module. **Parameters**: * **camera_id** : id of the camera instance. * **body_tracking_runtime_parameters** : Body Tracking runtime settings, can be changed at each detection. In async mode, the parameters update is applied on the next iteration. * **bodies** : The detected bodies will be saved into this object. If the object already contains data from a previous detection, it will be updated, keeping a unique ID for the same person. * **instance_id** : Id of the object detection instance. Used when multiple instances of the object detection module are enabled at the same time. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. ### function sl_update_objects_batch ```cpp INTERFACE_API int sl_update_objects_batch( int camera_id, int * nb_batches ) ``` Updates the internal batch of detected objects. **Parameters**: * **camera_id** : Id of the camera instance. * **nb_batches** : [Out] Number of batches. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. ### function sl_get_objects_batch ```cpp INTERFACE_API int sl_get_objects_batch( int camera_id, int index, struct SL_ObjectsBatch * objs_batch ) ``` Gets a batch of detected objects. **Parameters**: * **camera_id** : Id of the camera instance. * **objs_batch** : Structure containing all the specific data of the object batch module * **index** : Desired index in the trajectories vector. **Return**: SL_ERROR_CODE_SUCCESS if everything went fine, SL_ERROR_CODE_FAILURE otherwise. **Note**: Need to be called after sl_update_objects_batch(). ### function sl_get_objects_batch_csharp ```cpp INTERFACE_API int sl_get_objects_batch_csharp( int camera_id, int index, int * nb_data, int * id, int * label, int * sublabel, int * tracking_state, struct SL_Vector3 positions[MAX_TRAJECTORY_SIZE], float position_covariances[MAX_TRAJECTORY_SIZE][6], struct SL_Vector3 velocities[MAX_TRAJECTORY_SIZE], unsigned long long timestamps[MAX_TRAJECTORY_SIZE], struct SL_Vector2 bounding_boxes_2d[MAX_TRAJECTORY_SIZE][4], struct SL_Vector3 bounding_boxes[MAX_TRAJECTORY_SIZE][8], float confidences[MAX_TRAJECTORY_SIZE], int action_states[MAX_TRAJECTORY_SIZE], struct SL_Vector2 head_bounding_boxes_2d[MAX_TRAJECTORY_SIZE][4], struct SL_Vector3 head_bounding_boxes[MAX_TRAJECTORY_SIZE][8], struct SL_Vector3 head_positions[MAX_TRAJECTORY_SIZE] ) ``` ### function sl_fusion_init ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_init( struct SL_InitFusionParameters * params ) ``` FusionHandler initialisation. Initializes memory/generic datas. **Parameters**: * **params** : structure containing all init parameters for the fusion API **Return**: SL_FUSION_ERROR_CODE ### function sl_fusion_process ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_process() ``` process the fusion. **Return**: SL_FUSION_ERROR_CODE ### function sl_fusion_subscribe ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_subscribe( struct SL_CameraIdentifier * uuid, struct SL_CommunicationParameters * params, struct SL_Vector3 * pose_translation, struct SL_Quaternion * pose_rotation ) ``` ### function sl_fusion_retrieve_image ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_retrieve_image( void * mat, struct SL_CameraIdentifier * uuid, int width, int height ) ``` Returns the current sl_VIEW_LEFT of the specified camera, the data is synchronized. **Parameters**: * **mat** the CPU BGRA image of the requested camera. * **uuid** the requested camera identifier. * **width** the requested width of the output image, can be lower or equal (default) to the original image width. * **height** the requested height of the output image, can be lower or equal (default) to the original image height. **Return**: SUCCESS if it goes as it should, otherwise it returns an FUSION_ERROR_CODE. **Note**: Only the Left BGRA image is available. ### function sl_fusion_retrieve_measure ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_retrieve_measure( void * mat, struct SL_CameraIdentifier * uuid, enum SL_MEASURE measure, int width, int height, enum SL_FUSION_REFERENCE_FRAME reference_frame ) ``` Returns the current measure of the specified camera, the data is synchronized. **Parameters**: * **mat** the CPU data of the requested camera. * **uuid** the requested camera identifier. * **measure** the requested measure type, by default DEPTH (F32_C1) * **width** the requested width of the output image, can be lower or equal (default) to the original image width. * **height** the requested height of the output image, can be lower or equal (default) to the original image height. * **reference_frame** the requested reference frame, by default BASELINK. it is only available for fused point clouds **Return**: SUCCESS if it goes as it should, otherwise it returns an FUSION_ERROR_CODE. **Note**: Only MEASURE: DEPTH, XYZ, XYZRGBA, XYZBGRA, XYZARGB, XYZABGR, DEPTH_U16_MM are available. ### function sl_fusion_unsubscribe ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_unsubscribe( struct SL_CameraIdentifier * uuid ) ``` Remove the specified camera from data provider. **Parameters**: * **uuid** The requested camera identifier. **Return**: SUCCESS if it goes as it should, otherwise it returns an SL_FUSION_ERROR_CODE. ### function sl_fusion_update_pose ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_update_pose( struct SL_CameraIdentifier * uuid, struct SL_Vector3 * pose_translation, struct SL_Quaternion * pose_rotation ) ``` ### function sl_fusion_get_pose ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_get_pose( struct SL_CameraIdentifier * uuid, struct SL_Vector3 * pose_translation, struct SL_Quaternion * pose_rotation ) ``` Get the specified camera position inside fusion WORLD. **Parameters**: * **uuid** The requested camera identifier. * **pose** The World position of the camera, regarding the other camera of the setup. **Return**: SUCCESS if it goes as it should, otherwise it returns an FUSION_ERROR_CODE. ### function sl_fusion_get_sender_state ```cpp INTERFACE_API enum SL_SENDER_ERROR_CODE sl_fusion_get_sender_state( struct SL_CameraIdentifier * uuid ) ``` ### function sl_fusion_read_configuration_file ```cpp INTERFACE_API void sl_fusion_read_configuration_file( const char * json_config_filename, enum SL_COORDINATE_SYSTEM coord_system, enum SL_UNIT unit, struct SL_FusionConfiguration configs[MAX_FUSED_CAMERAS], int * nb_cameras ) ``` Read a Configuration JSON file to configure a fusion process. **Parameters**: * **json_config_filename** : The name of the JSON file containing the configuration * **coord_sys** : The COORDINATE_SYSTEM in which you want the World Pose to be in. * **unit** : The UNIT in which you want the World Pose to be in. **Return**: a vector of SL_FusionConfiguration for all the camera present in the file. **Note**: empty if no data were found for the requested camera. ### function sl_fusion_read_configuration ```cpp INTERFACE_API void sl_fusion_read_configuration( const char * fusion_configuration, enum SL_COORDINATE_SYSTEM coord_system, enum SL_UNIT unit, struct SL_FusionConfiguration configs[MAX_FUSED_CAMERAS], int * nb_cameras ) ``` Read a Configuration JSON string to configure a fusion process. **Parameters**: * **fusion_configuration** : The string containing the configuration (it will be parsed like a json). * **coord_sys** : The COORDINATE_SYSTEM in which you want the World Pose to be in. * **unit** : The UNIT in which you want the World Pose to be in. **Return**: A vector of FusionConfiguration for all the camera present in the file. **Note**: Empty if no data were found for the requested camera. ### function sl_fusion_enable_body_tracking ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_enable_body_tracking( struct SL_BodyTrackingFusionParameters * params ) ``` enables Object detection fusion module **Parameters**: * **parameters** defined by sl::ObjectDetectionFusionParameters **Return**: SL_FUSION_ERROR_CODE ### function sl_fusion_disable_body_tracking ```cpp INTERFACE_API void sl_fusion_disable_body_tracking() ``` Disable the object detection module. ### function sl_fusion_retrieve_bodies ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_retrieve_bodies( struct SL_Bodies * bodies, struct SL_BodyTrackingFusionRuntimeParameters * rt, struct SL_CameraIdentifier uuid, enum SL_FUSION_REFERENCE_FRAME reference_frame ) ``` retrieves a list of bodies (in SL_Bodies class type) seen by all cameras and merged as if it was seen by a single super-camera. **Parameters**: * **bodies** list of bodies seen by all available cameras * **reference_frame** The reference frame in which the objects will be expressed. **Return**: SL_FUSION_ERROR_CODE **Note**: * Internal calls retrieveBodies() for all listed cameras, then merged into a single SL_Bodies * Only the 3d informations is available in the returned object. ### function sl_fusion_get_process_metrics ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_get_process_metrics( struct SL_FusionMetrics * metrics ) ``` get the stats of a given camera in the Fusion API side It can be the received FPS, drop frame, latency, etc **Parameters**: * **metrics** : structure containing all the metrics available **Return**: SL_FUSION_ERROR_CODE ### function sl_fusion_enable_positional_tracking ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_enable_positional_tracking( struct SL_PositionalTrackingFusionParameters * params ) ``` enable positional tracking fusion. **Return**: SL_FUSION_ERROR_CODE **Note**: note that for the alpha version of the API, the positional tracking fusion doesn't support the area memory feature ### function sl_fusion_get_position ```cpp INTERFACE_API enum SL_POSITIONAL_TRACKING_STATE sl_fusion_get_position( struct SL_PoseData * pose, enum SL_REFERENCE_FRAME reference_frame, struct SL_CameraIdentifier * uuid, enum SL_POSITION_TYPE retrieve_type ) ``` Get the Fused Position of the camera system. **Parameters**: * **camera_pose** will contain the camera pose in world position (world position is given by the calibration of the cameras system) * **reference_frame** defines the reference from which you want the pose to be expressed. Default : REFERENCE_FRAME::WORLD. * **uuid** Camera identifier **Return**: POSITIONAL_TRACKING_STATE is the current state of the tracking process ### function sl_fusion_get_fused_positional_tracking_status ```cpp INTERFACE_API struct SL_FusedPositionalTrackingStatus * sl_fusion_get_fused_positional_tracking_status() ``` Get the current status of fused position. **Return**: SL_FusedPositionalTrackingStatus is the current status of the tracking process. ### function sl_fusion_disable_positional_tracking ```cpp INTERFACE_API void sl_fusion_disable_positional_tracking() ``` disable the positional tracking ### function sl_fusion_enu_to_geo ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_enu_to_geo( struct SL_ENU * in, struct SL_LatLng * out ) ``` Convert a ENU position expressed inside the Fusion coordinate system to a global world coordinate. **Parameters**: * **in** Input enu coordinate. * **out** Converted position in lat/lng coordinate system. **Return**: ERROR_CODE FAILURE if the conversion failed, SUCCESS otherwise. ### function sl_fusion_geo_to_enu ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_geo_to_enu( struct SL_LatLng * in, struct SL_ENU * out ) ``` Convert a global world coordinate to a ENU position expressed inside the Fusion coordinate system. **Parameters**: * **in** Input lat/lng coordinate. * **out** Converted position in ENU coordinate system. **Return**: ERROR_CODE FAILURE if the conversion failed, SUCCESS otherwise. ### function sl_fusion_ingest_gnss_data ```cpp INTERFACE_API enum SL_FUSION_ERROR_CODE sl_fusion_ingest_gnss_data( struct SL_GNSSData * gnss_data, bool radian ) ``` Add GNSS that will be used by fusion for computing fused pose. **Parameters**: * **out** [in]: the current GNSS data * **radian** [in] : true if the gnssdata is set in radian ### function sl_fusion_get_current_gnss_data ```cpp INTERFACE_API enum SL_POSITIONAL_TRACKING_STATE sl_fusion_get_current_gnss_data( struct SL_GNSSData * data, bool radian ) ``` returns the current GNSS data **Parameters**: * **out** [out]: the current GNSS data * **radian** [in] : true if the gnss data is set in radian **Return**: POSITIONAL_TRACKING_STATE is the current state of the tracking process ### function sl_fusion_get_geo_pose ```cpp INTERFACE_API enum SL_GNSS_FUSION_STATUS sl_fusion_get_geo_pose( struct SL_GeoPose * pose, bool radian ) ``` returns the current GeoPose **Parameters**: * **pose** [out]: the current GeoPose * **radian** [in] : true if the geopose is set in radian. **Return**: SL_GNSS_FUSION_STATUS is the current state of the tracking process ### function sl_fusion_geo_to_camera ```cpp INTERFACE_API enum SL_GNSS_FUSION_STATUS sl_fusion_geo_to_camera( struct SL_LatLng * in, struct SL_PoseData * out, bool radian ) ``` Convert latitude / longitude into position in sl::Fusion coordinate system. **Parameters**: * **in** the current GeoPose * **out** [out]: the current Pose * **radian** [in] : true if the geopose is set in radian. **Return**: SL_GNSS_FUSION_STATUS is the current state of the tracking process ### function sl_fusion_camera_to_geo ```cpp INTERFACE_API enum SL_GNSS_FUSION_STATUS sl_fusion_camera_to_geo( struct SL_PoseData * in, struct SL_GeoPose * out, bool radian ) ``` returns the current GeoPose **Parameters**: * **pose** [out]: the current GeoPose * **radian** [in] : true if the geopose is set in radian. **Return**: SL_GNSS_FUSION_STATUS is the current state of the tracking process ### function sl_fusion_get_current_timestamp ```cpp INTERFACE_API unsigned long long sl_fusion_get_current_timestamp() ``` returns the current timestamp **Return**: the current timestamp in nanoseconds. ### function sl_fusion_get_current_gnss_calibration_std ```cpp INTERFACE_API enum SL_GNSS_FUSION_STATUS sl_fusion_get_current_gnss_calibration_std( float * yaw_std, struct SL_Vector3 * position_std ) ``` Get the current calibration uncertainty defined during calibration process. **Parameters**: * **yaw_std** [out] yaw uncertainty * **x_std** [out] position uncertainty **Return**: SL_GNSS_FUSION_STATUS representing current initialisation status ### function sl_fusion_get_geo_tracking_calibration ```cpp INTERFACE_API void sl_fusion_get_geo_tracking_calibration( struct SL_Vector3 * translation, struct SL_Quaternion * rotation ) ``` Get the calibration found between VIO and GNSS. **Return**: sl::Transform transform containing calibration found between VIO and GNSS ### function sl_fusion_close ```cpp INTERFACE_API void sl_fusion_close() ``` Close Multi Camera instance. ### function sl_mat_create_new ```cpp INTERFACE_API void * sl_mat_create_new( int width, int height, enum SL_MAT_TYPE type, enum SL_MEM mem ) ``` Creates a matrix with the given resolution. **Parameters**: * **width** : Width of the new matrix. * **height** : Height of the new matrix. * **type** : Data type and number of channels the matrix will hold (see SL_MAT_TYPE). * **mem** : Whether the matrix should be stored on CPU or GPU memory (SL_MEM). **Return**: Pointer of the matrix. ### function sl_mat_create_new_empty ```cpp INTERFACE_API void * sl_mat_create_new_empty() ``` Creates an empty matrix. **Return**: Pointer of the empty matrix. ### function sl_mat_is_init ```cpp INTERFACE_API bool sl_mat_is_init( void * ptr ) ``` Returns whether the matrix is initialized or not. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: True if the matrix has been initialized. ### function sl_mat_free ```cpp INTERFACE_API void sl_mat_free( void * ptr, enum SL_MEM mem ) ``` Frees the memory of the matrix. **Parameters**: * **ptr** : Pointer of the matrix to free. * **mem** : Specifies which memory you wish to free. Default: SL_MEM_CPU ### function sl_mat_get_infos ```cpp INTERFACE_API void sl_mat_get_infos( void * ptr, char * buffer ) ``` Returns the information about the matrix into a string. **Parameters**: * **ptr** : Pointer of the matrix to get information from. * **buffer** : Buffer providing matrix information. ### function sl_mat_get_value_uchar ```cpp INTERFACE_API int sl_mat_get_value_uchar( void * ptr, int col, int row, unsigned char * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_U8_C1. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_get_value_uchar2 ```cpp INTERFACE_API int sl_mat_get_value_uchar2( void * ptr, int col, int row, struct SL_Uchar2 * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_U8_C2. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_get_value_uchar3 ```cpp INTERFACE_API int sl_mat_get_value_uchar3( void * ptr, int col, int row, struct SL_Uchar3 * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_U8_C3. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_get_value_uchar4 ```cpp INTERFACE_API int sl_mat_get_value_uchar4( void * ptr, int col, int row, struct SL_Uchar4 * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_U8_C4. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_get_value_float ```cpp INTERFACE_API int sl_mat_get_value_float( void * ptr, int col, int row, float * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_F32_C1. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_get_value_float2 ```cpp INTERFACE_API int sl_mat_get_value_float2( void * ptr, int col, int row, struct SL_Vector2 * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_F32_C2. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_get_value_float3 ```cpp INTERFACE_API int sl_mat_get_value_float3( void * ptr, int col, int row, struct SL_Vector3 * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_F32_C3. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_get_value_float4 ```cpp INTERFACE_API int sl_mat_get_value_float4( void * ptr, int col, int row, struct SL_Vector4 * value, enum SL_MEM mem ) ``` Returns the value of a specific point in the matrix of type SL_MAT_TYPE_F32_C4. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to get the value from. * **row** : Row of the point to get the value from. * **value[Out]** : Variable to store the value to get. * **mem** : Which memory should be read. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_uchar ```cpp INTERFACE_API int sl_mat_set_value_uchar( void * ptr, int col, int row, unsigned char value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_U8_C1. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_uchar2 ```cpp INTERFACE_API int sl_mat_set_value_uchar2( void * ptr, int col, int row, struct SL_Uchar2 value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_U8_C2. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_uchar3 ```cpp INTERFACE_API int sl_mat_set_value_uchar3( void * ptr, int col, int row, struct SL_Uchar3 value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_U8_C3. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_uchar4 ```cpp INTERFACE_API int sl_mat_set_value_uchar4( void * ptr, int col, int row, struct SL_Uchar4 value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_U8_C4. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_float ```cpp INTERFACE_API int sl_mat_set_value_float( void * ptr, int col, int row, float value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_F32_C1. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_float2 ```cpp INTERFACE_API int sl_mat_set_value_float2( void * ptr, int col, int row, struct SL_Vector2 value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_F32_C2. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_float3 ```cpp INTERFACE_API int sl_mat_set_value_float3( void * ptr, int col, int row, struct SL_Vector3 value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_F32_C3. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_value_float4 ```cpp INTERFACE_API int sl_mat_set_value_float4( void * ptr, int col, int row, struct SL_Vector4 value, enum SL_MEM mem ) ``` Sets a value to a specific point in the matrix of type SL_MAT_TYPE_F32_C4. **Parameters**: * **ptr** : Pointer of the matrix. * **col** : Column of the point to set the value. * **row** : Row of the point to set the value. * **value** : Value to be set. * **mem** : Which memory will be updated. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_uchar ```cpp INTERFACE_API int sl_mat_set_to_uchar( void * ptr, unsigned char value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_U8_C1 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_uchar2 ```cpp INTERFACE_API int sl_mat_set_to_uchar2( void * ptr, struct SL_Uchar2 value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_U8_C2 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_uchar3 ```cpp INTERFACE_API int sl_mat_set_to_uchar3( void * ptr, struct SL_Uchar3 value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_U8_C3 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_uchar4 ```cpp INTERFACE_API int sl_mat_set_to_uchar4( void * ptr, struct SL_Uchar4 value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_U8_C4 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_float ```cpp INTERFACE_API int sl_mat_set_to_float( void * ptr, float value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_F32_C1 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_float2 ```cpp INTERFACE_API int sl_mat_set_to_float2( void * ptr, struct SL_Vector2 value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_F32_C2 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_float3 ```cpp INTERFACE_API int sl_mat_set_to_float3( void * ptr, struct SL_Vector3 value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_F32_C3 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_set_to_float4 ```cpp INTERFACE_API int sl_mat_set_to_float4( void * ptr, struct SL_Vector4 value, enum SL_MEM mem ) ``` Fills the matrix of type SL_MAT_TYPE_F32_C4 with the given value. **Parameters**: * **ptr** : Pointer of the matrix. * **value** : Value with which to fill the matrix. * **mem** : Which buffer to fill. **Return**: SL_ERROR_CODE (as an integer) indicating if the get was successful, or why it wasn't. ### function sl_mat_update_cpu_from_gpu ```cpp INTERFACE_API int sl_mat_update_cpu_from_gpu( void * ptr ) ``` Copies data from the GPU to the CPU, if possible. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: SL_ERROR_CODE_SUCCESS if everything went well, SL_ERROR_CODE_FAILURE otherwise. ### function sl_mat_update_gpu_from_cpu ```cpp INTERFACE_API int sl_mat_update_gpu_from_cpu( void * ptr ) ``` Copies data from the CPU to the GPU, if possible. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: SL_ERROR_CODE_SUCCESS if everything went well, SL_ERROR_CODE_FAILURE otherwise. ### function sl_mat_copy_to ```cpp INTERFACE_API int sl_mat_copy_to( void * ptr, void * ptr_dest, enum SL_COPY_TYPE cpy_type ) ``` Copies data from this matrix to another matrix (deep copy). **Parameters**: * **ptr** : Pointer of the source matrix. * **ptr_dest** : Pointer of the destination matrix. * **cpy_type** : Specifies the memory that will be used for the copy (see SL_COPY_TYPE). **Return**: SL_ERROR_CODE_SUCCESS if everything went well, SL_ERROR_CODE_FAILURE otherwise. ### function sl_mat_read ```cpp INTERFACE_API int sl_mat_read( void * ptr, const char * file_path ) ``` Reads an image from a file. **Parameters**: * **ptr** : Pointer of the matrix. * **file_path** : Path of the file to read from (including the name and extension). **Return**: SL_ERROR_CODE_SUCCESS if everything went well, SL_ERROR_CODE_FAILURE otherwise. Supports .png and .jpeg. Only works if matrix has access to SL_MEM_CPU. ### function sl_mat_write ```cpp INTERFACE_API int sl_mat_write( void * ptr, const char * file_path ) ``` Writes the Mat into a file as an image. Only works if Mat has access to MEM_CPU. **Parameters**: * **ptr** : Pointer of the matrix. * **file_path** : Path of the file to write (including the name and extension). **Return**: SL_ERROR_CODE_SUCCESS if everything went well, SL_ERROR_CODE_FAILURE otherwise. ### function sl_mat_get_width ```cpp INTERFACE_API int sl_mat_get_width( void * ptr ) ``` Returns the width of the matrix. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: Width of the matrix in pixels. ### function sl_mat_get_height ```cpp INTERFACE_API int sl_mat_get_height( void * ptr ) ``` Returns the height of the matrix. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: Height of the matrix in pixels. ### function sl_mat_get_channels ```cpp INTERFACE_API int sl_mat_get_channels( void * ptr ) ``` Returns the number of values stored in one pixel. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: Number of values in a pixel. ### function sl_mat_get_memory_type ```cpp INTERFACE_API int sl_mat_get_memory_type( void * ptr ) ``` Gets the type of memory (CPU and/or GPU). **Parameters**: * **ptr** : Pointer of the matrix. **Return**: Type of allocated memory (SL_MEM). ### function sl_mat_get_data_type ```cpp INTERFACE_API int sl_mat_get_data_type( void * ptr ) ``` Returns the format of the matrix. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: The memory type (SL_MAT_TYPE). ### function sl_mat_get_pixel_bytes ```cpp INTERFACE_API int sl_mat_get_pixel_bytes( void * ptr ) ``` Returns the size of one pixel in bytes. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: Size of a pixel in bytes. ### function sl_mat_get_step ```cpp INTERFACE_API int sl_mat_get_step( void * ptr, enum SL_MEM mem ) ``` Returns the memory step in number of elements (size in one pixel row). **Parameters**: * **ptr** : Pointer of the matrix. * **mem** : Specifies whether you want SL_MEM_CPU or SL_MEM_GPU step. **Return**: The step in number of elements. ### function sl_mat_get_step_bytes ```cpp INTERFACE_API int sl_mat_get_step_bytes( void * ptr, enum SL_MEM mem ) ``` Returns the memory step in bytes (size of one pixel row). **Parameters**: * **ptr** : Pointer of the matrix. * **mem** : Specifies whether you want SL_MEM_CPU or SL_MEM_GPU step. **Return**: The step in bytes of the specified memory. ### function sl_mat_get_width_bytes ```cpp INTERFACE_API int sl_mat_get_width_bytes( void * ptr ) ``` Returns the size of a row in bytes. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: Size of a row in bytes. ### function sl_mat_is_memory_owner ```cpp INTERFACE_API bool sl_mat_is_memory_owner( void * ptr ) ``` Returns whether the matrix is the owner of the memory it accesses. **Return**: true if the matrix is owning its memory, else false. ### function sl_mat_get_resolution ```cpp INTERFACE_API struct SL_Resolution sl_mat_get_resolution( void * ptr ) ``` Returns the resolution (width and height) of the matrix. **Parameters**: * **ptr** : Pointer of the matrix. **Return**: SL_Resolution of the matrix in pixels. ### function sl_mat_alloc ```cpp INTERFACE_API void sl_mat_alloc( void * ptr, int width, int height, enum SL_MAT_TYPE type, enum SL_MEM mem ) ``` Allocates memory for the matrix. **Parameters**: * **ptr** : Pointer of the matrix. * **width** : Width of the matrix in pixels. * **height** : Height of the matrix in pixels. * **type** : Type of the matrix (SL_MAT_TYPE_F32_C1, SL_MAT_TYPE_U8_C4, etc.). * **mem** : Where the buffer will be stored. ### function sl_mat_set_from ```cpp INTERFACE_API int sl_mat_set_from( void * ptr, void * ptr_source, enum SL_COPY_TYPE copy_type ) ``` Copies data from another matrix into this one (deep copy). **Parameters**: * **ptr** : Pointer of the matrix. * **ptr_source** : Source matrix from which to copy. * **copy_type** : Specifies the memory that will be used for the copy (see SL_COPY_TYPE). * **mem** : Where the buffer will be stored. **Return**: SL_ERROR_CODE_SUCCESS if everything went well, SL_ERROR_CODE_FAILURE otherwise. ### function sl_mat_get_ptr ```cpp INTERFACE_API int * sl_mat_get_ptr( void * ptr, enum SL_MEM mem ) ``` Gets a pointer to the matrix. **Parameters**: * **ptr** : Pointer of the matrix. * **mem** : Whether the matrix should exist on CPU or GPU memory (SL_MEM). **Return**: A pointer to the matrix. ### function sl_mat_clone ```cpp INTERFACE_API int sl_mat_clone( void * ptr, void * ptr_source ) ``` Duplicates a matrix by copying all its data into a new one (deep copy). **Parameters**: * **ptr** : Pointer of the matrix. * **ptr_source** : Source matrix from which to copy. ### function sl_mat_swap ```cpp INTERFACE_API void sl_mat_swap( void * ptr_1, void * ptr_2 ) ``` Swaps the content of the provided matrix (only swaps the pointers, no data copy). **Parameters**: * **ptr1** : Pointer of the first matrix to swap. * **ptr2** : Pointer of the second matrix to swap. ### function sl_mat_convert_color ```cpp INTERFACE_API int sl_mat_convert_color( void * ptr, enum SL_MEM memory, bool swap_RB_channels, void * stream ) ``` Convert the color channels of the Mat (RGB<->BGR or RGBA<->BGRA) This methods works only on 8U_C4 or 8U_C3. ### function sl_convert_color ```cpp INTERFACE_API int sl_convert_color( void * mat1, void * mat2, bool swap_RB_channels, bool remove_alpha_channels, enum SL_MEM memory, void * stream ) ``` Convert the color channels of the Mat into another Mat This methods works only on 8U_C4 if remove_alpha_channels is enabled, or 8U_C4 and 8U_C3 if swap_RB_channels is enabled The inplace method sl::Mat::convertColor can be used for only swapping the Red and Blue channel efficiently. ### function sl_blob_from_image ```cpp INTERFACE_API int sl_blob_from_image( void * image_in, void * tensor_out, struct SL_Resolution resolution_out, float scalefactor, struct SL_Vector3 mean, struct SL_Vector3 stddev, bool keep_aspect_ratio, bool swap_RB_channels, void * stream ) ``` Convert an image into a GPU Tensor in planar channel configuration (NCHW), ready to use for deep learning model. **Parameters**: * **image_in** : input image to convert * **tensor_out** : output GPU tensor * **resolution_out** : resolution of the output image, generally square, although not mandatory * **scalefactor** : Scale factor applied to each pixel value, typically to convert the char value into [0-1] float * **mean** : mean, statistic to normalized the pixel values, applied AFTER the scale. For instance for imagenet statistics the mean would be sl::float3(0.485, 0.456, 0.406) * **stddev** : standard deviation, statistic to normalized the pixel values, applied AFTER the scale. For instance for imagenet statistics the standard deviation would be sl::float3(0.229, 0.224, 0.225) * **keep_aspect_ratio** : indicates if the original width and height ratio should be kept using padding (sometimes refer to as letterboxing) or if the image should be stretched * **swap_RB_channels** : indicates if the Red and Blue channels should be swapped (RGB<->BGR or RGBA<->BGRA) * **stream** : a cuda stream to put the compute ### function sl_blob_from_images ```cpp INTERFACE_API int sl_blob_from_images( void ** image_in, int nb_images, void * tensor_out, struct SL_Resolution resolution_out, float scalefactor, struct SL_Vector3 mean, struct SL_Vector3 stddev, bool keep_aspect_ratio, bool swap_RB_channels, void * stream ) ``` Convert a list of images into a GPU Tensor in planar channel configuration (NCHW), ready to use for deep learning model. **Parameters**: * **image_in** : input images to convert * **nb_images** : number of images to convert * **tensor_out** : output GPU tensor batched * **resolution_out** : resolution of the output image, generally square, although not mandatory * **scalefactor** : Scale factor applied to each pixel value, typically to convert the char value into [0-1] float * **mean** : mean, statistic to normalized the pixel values, applied AFTER the scale. For instance for imagenet statistics the mean would be sl::float3(0.485, 0.456, 0.406) * **stddev** : standard deviation, statistic to normalized the pixel values, applied AFTER the scale. For instance for imagenet statistics the standard deviation would be sl::float3(0.229, 0.224, 0.225) * **keep_aspect_ratio** : indicates if the original width and height ratio should be kept using padding (sometimes refer to as letterboxing) or if the image should be stretched * **swap_RB_channels** : indicates if the Red and Blue channels should be swapped (RGB<->BGR or RGBA<->BGRA) * **stream** : a cuda stream to put the compute ### function sl_is_camera_one ```cpp INTERFACE_API bool sl_is_camera_one( enum SL_MODEL m ) ``` Check if the camera is a ZED One (Monocular) or ZED (Stereo) **Parameters**: * **m** : Camera model ### function sl_is_resolution_available ```cpp INTERFACE_API bool sl_is_resolution_available( enum SL_RESOLUTION r, enum SL_MODEL m ) ``` Check if a resolution is available for a given camera model. **Parameters**: * **r** : Resolution to check * **m** : Camera model ### function sl_is_FPS_available ```cpp INTERFACE_API bool sl_is_FPS_available( int fps, enum SL_RESOLUTION r, enum SL_MODEL m ) ``` Check if a frame rate is available for a given resolution and camera model. **Parameters**: * **fps** : Frame rate to check * **r** : Resolution to check * **m** : Camera model ### function sl_is_HDR_available ```cpp INTERFACE_API bool sl_is_HDR_available( enum SL_RESOLUTION r, enum SL_MODEL m ) ``` Check if a resolution for a given camera model is available for HDR. **Parameters**: * **r** : Resolution to check * **m** : Camera model ## Macros Documentation ### define INTERFACE_API ```cpp #define INTERFACE_API ``` --- # SL_InitParameters Structure containing the options used to initialize a camera. More... `#include ` ## Detailed Description ```cpp struct SL_InitParameters; ``` Structure containing the options used to initialize a camera. **Note**: For more info, read about the ZED SDK C++ class it mirrors: [InitParameters](https://www.stereolabs.com/docs/api/structsl_1_1InitParameters.html) This class allows you to select multiple parameters for the camera to open such as the selected camera, resolution, depth mode, coordinate system, and units of measurement. Once filled with the desired options, it should be passed to the sl_open_camera() function. ## Public Attributes Documentation ### variable input_type ```cpp enum SL_INPUT_TYPE input_type; ``` Defines the input source to initialize and open an camera from. **Note**: * Available cameras and their id/serial number can be listed using sl_get_device_list() and sl_get_streaming_device_list(). * Each camera will create its own memory (CPU and GPU), therefore the number of cameras used at the same time can be limited by the configuration of your computer (GPU/CPU memory and capabilities). * See SL_INPUT_TYPE for complementary information. The SDK can handle different input types: * Select a camera by its ID (_/dev/videoX_ on Linux, and 0 to N cameras connected on Windows) * Select a camera by its serial number * Open a recorded sequence in the SVO file format * Open a streaming camera from its IP address and port Default : (empty) ### variable resolution ```cpp enum SL_RESOLUTION resolution; ``` Desired camera resolution. **Note**: * Small resolutions offer higher framerate and lower computation time. * In most situations, SL_RESOLUTION_HD720 at 60 FPS is the best balance between image quality and framerate. * Available resolutions are listed here: SL_RESOLUTION. Default: SL_RESOLUTION_AUTO * Resolves to SL_RESOLUTION_HD1200 for ZED X/X Mini * Resolves to SL_RESOLUTION_HD720 for other cameras ### variable camera_fps ```cpp int camera_fps; ``` Requested camera frame rate. **Note**: If the requested camera_fps is unsupported, the closest available FPS will be used. If set to 0, the highest FPS of the specified camera_resolution will be used. Default: 0 See SL_RESOLUTION for a list of supported frame rates. ### variable camera_device_id ```cpp int camera_device_id; ``` Id for identifying which camera to use from the connected cameras. ### variable camera_image_flip ```cpp enum SL_FLIP_MODE camera_image_flip; ``` Defines if a flip of the images is needed. **Note**: * From ZED SDK 3.2 a new SL_FLIP_MODE enum was introduced to add the automatic flip mode detection based on the IMU gravity detection. * This does not work on SL_MODEL_ZED cameras since they do not have the necessary sensors. If you are using the camera upside down, setting this parameter to SL_FLIP_MODE_ON will cancel its rotation. The images will be horizontally flipped. Default: SL_FLIP_MODE_OFF ### variable camera_disable_self_calib ```cpp bool camera_disable_self_calib; ``` Disables the self-calibration process at camera opening. **Note**: * In most situations, self calibration should remain enabled. * You can also trigger the self-calibration at anytime after sl_open_camera() by calling sl_update_self_calibration(), even if this parameter is set to true. At initialization, sl_open_camera() runs a self-calibration process that corrects small offsets from the device's factory calibration. A drawback is that calibration parameters will slightly change from one (live) run to another, which can be an issue for repeatability. If set to true, self-calibration will be disabled and calibration parameters won't be optimized, raw calibration parameters from the configuration file will be used. Default: false ### variable enable_right_side_measure ```cpp bool enable_right_side_measure; ``` Enable the measurement computation on the right images. By default, the ZED SDK only computes a single depth map, aligned with the left camera image. This parameter allows you to enable SL_MEASURE_DEPTH_RIGHT and other SL_MEASURE_XXX_RIGHT at the cost of additional computation time. For example, mixed reality pass-through applications require one depth map per eye, so this parameter can be activated. Default: false ### variable svo_real_time_mode ```cpp bool svo_real_time_mode; ``` Defines if the camera return the frame in real time mode. **Note**: sl_grab() will return an error when trying to play too fast, and frames will be dropped when playing too slowly. When playing back an SVO file, each call to sl_grab() will extract a new frame and use it. However, it ignores the real capture rate of the images saved in the SVO file. Enabling this parameter will bring the SDK closer to a real simulation when playing back a file by using the images' timestamps. Default: false ### variable depth_mode ```cpp enum SL_DEPTH_MODE depth_mode; ``` SL_DEPTH_MODE to be used. **Note**: Available depth mode are listed here: SL_DEPTH_MODE. The ZED SDK offers several SL_DEPTH_MODE, offering various levels of performance and accuracy. This parameter allows you to set the SL_DEPTH_MODE that best matches your needs. Default: SL_DEPTH_MODE_NEURAL ### variable depth_stabilization ```cpp int depth_stabilization; ``` Defines whether the depth needs to be stabilized and to what extent. **Note**: * The stabilization uses the positional tracking to increase its accuracy, so the positional tracking module will be enabled automatically when set to a value different from 0. * Note that calling sl_enable_positional_tracking() with your own parameters afterwards is still possible. Regions of generated depth map can oscillate from one frame to another. These oscillations result from a lack of texture (too homogeneous) on an object and by image noise. This parameter controls a stabilization filter that reduces these oscillations. In the range [0-100]: * 0 disable the depth stabilization (raw depth will be return) * stabilization smoothness is linear from 1 to 100 Default: 30 ### variable depth_minimum_distance ```cpp float depth_minimum_distance; ``` Minimum depth distance to be returned, measured in the SL_UNIT defined in coordinate_unit. This parameter allows you to specify the minimum depth value (from the camera) that will be computed. Setting this value to any negative or null value will select the default minimum depth distance available for the used ZED Camera (depending on the camera focal length and baseline). **Note**: This value cannot be greater than 3 meters. Default: -1 When using deprecated depth modes ( SL_DEPTH_MODE_PERFORMANCE, SL_DEPTH_MODE_QUALITY or SL_DEPTH_MODE_ULTRA), the default minimum depth distances are given by [this table](https://www.stereolabs.com/docs/depth-sensing/depth-settings#depth-range). ### variable depth_maximum_distance ```cpp float depth_maximum_distance; ``` Maximum depth distance to be returned, measured in the SL_UNIT defined in coordinate_unit. When estimating the depth, the ZED SDK uses this upper limit to turn higher values into sl::TOO_FAR ones. Changing this value has no impact on performance and doesn't affect the positional tracking nor the spatial mapping. It only change values the depth, point cloud and normals. Setting this value to any negative or null value will select the default maximum depth distance available. Default: -1 ### variable coordinate_unit ```cpp enum SL_UNIT coordinate_unit; ``` Unit of spatial data (depth, point cloud, tracking, mesh, etc.) for retrieval. Default: SL_UNIT_MILLIMETER ### variable coordinate_system ```cpp enum SL_COORDINATE_SYSTEM coordinate_system; ``` SL_COORDINATE_SYSTEM to be used as reference for positional tracking, mesh, point clouds, etc. This parameter allows you to select the SL_COORDINATE_SYSTEM used by the camera to return its measures. This defines the order and the direction of the axis of the coordinate system. Default: SL_COORDINATE_SYSTEM_IMAGE ### variable sdk_gpu_id ```cpp int sdk_gpu_id; ``` NVIDIA graphics card id to use. **Note**: A non-positive value will search for all CUDA capable devices and select the most powerful. By default the SDK will use the most powerful NVIDIA graphics card found. However, when running several applications, or using several cameras at the same time, splitting the load over available GPUs can be useful. This parameter allows you to select the GPU used by the sl::Camera using an ID from 0 to n-1 GPUs in your PC. Default: -1 ### variable sdk_verbose ```cpp int sdk_verbose; ``` Enable the ZED SDK verbose mode. **Note**: The verbose messages can also be exported into a log file. This parameter allows you to enable the verbosity of the ZED SDK to get a variety of runtime information in the console. When developing an application, enabling verbose (`sdk_verbose >= 1`) mode can help you understand the current ZED SDK behavior. However, this might not be desirable in a shipped version. Default: 1 (verbose messages enabled) ### variable sensors_required ```cpp bool sensors_required; ``` Requires the successful opening of the motion sensors before opening the camera. **Note**: * If set to false, the ZED SDK will try to **open and use** the IMU (second USB device on USB2.0) and will open the camera successfully even if the sensors failed to open. * This parameter only impacts the LIVE mode. * If set to true, sl_open_camera() will fail if the sensors cannot be opened. * This parameter should be used when the IMU data must be available, such as object detection module or when the gravity is needed. * This setting is not taken into account for SL_MODEL_ZED camera since it does not include sensors. Default: false. This can be used for example when using a USB3.0 only extension cable (some fiber extension for example). ### variable enable_image_enhancement ```cpp bool enable_image_enhancement; ``` Enable the Enhanced Contrast Technology, to improve image quality. **Note**: This only works for firmware version starting from 1523 and up. Default: true. If set to true, image enhancement will be activated in camera ISP. Otherwise, the image will not be enhanced by the IPS. ### variable open_timeout_sec ```cpp float open_timeout_sec; ``` Define a timeout in seconds after which an error is reported if the sl_open_camera() function fails. **Note**: This parameter only impacts the LIVE mode. Set to '-1' to try to open the camera endlessly without returning error in case of failure. Set to '0' to return error in case of failure at the first attempt. Default: 5.0 ### variable async_grab_camera_recovery ```cpp bool async_grab_camera_recovery; ``` Define the behavior of the automatic camera recovery during sl_grab() function call. When async is enabled and there's an issue with the communication with the camera, sl_grab() will exit after a short period and return the SL_ERROR_CODE_CAMERA_REBOOTING warning. The recovery will run in the background until the correct communication is restored. When async_grab_camera_recovery is false, the sl_grab() function is blocking and will return only once the camera communication is restored or the timeout is reached. Default: false ### variable grab_compute_capping_fps ```cpp float grab_compute_capping_fps; ``` Define a computation upper limit to the grab frequency. **Note**: * It has no effect when reading an SVO file. * Internally the sl_grab() function always tries to get the latest available image while respecting the desired FPS as much as possible. This can be useful to get a known constant fixed rate or limit the computation load while keeping a short exposure time by setting a high camera capture framerate. The value should be inferior to the SL_InitParameters::camera_fps and strictly positive. This is an upper limit and won't make a difference if the computation is slower than the desired compute capping FPS. ### variable enable_image_validity_check ```cpp bool enable_image_validity_check; ``` Enable or disable the image validity verification. This will perform additional verification on the image to identify corrupted data. This verification is done in the grab function and requires some computations. If an issue is found, the grab function will output a warning as sl_ERROR_CODE_CORRUPTED_FRAME. This version doesn't detect frame tearing currently. default: enabled ### variable maximum_working_resolution ```cpp struct SL_Resolution maximum_working_resolution; ``` Set a maximum size for all SDK output, like retrieveImage and retrieveMeasure functions. **Note**: : if maximum_working_resolution field are lower than 64, it will be interpreted as dividing scale factor; * maximum_working_resolution = sl::Resolution(1280, 2) -> 1280 x (image_height/2) = 1280 x (half height) * maximum_working_resolution = sl::Resolution(4, 4) -> (image_width/4) x (image_height/4) = quarter size This will override the default (0,0) and instead of outputting native image size sl::Mat, the ZED SDK will take this size as default. A custom lower size can also be used at runtime, but not bigger. This is used for internal optimization of compute and memory allocations The default is similar to previous version with (0,0), meaning native image size ### variable svo_decryption_key ```cpp unsigned char[256] svo_decryption_key; ``` Decryption key required to open an SVO file that was recorded with encryption. **Note**: Must match the SL_RecordingParameters::encryption_key used during recording. Leave empty (all zeros) if the SVO file is not encrypted. --- # SL_RuntimeParameters Structure containing parameters that defines the behavior of sl_grab(). More... `#include ` ## Detailed Description ```cpp struct SL_RuntimeParameters; ``` Structure containing parameters that defines the behavior of sl_grab(). **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable reference_frame ```cpp enum SL_REFERENCE_FRAME reference_frame; ``` Reference frame in which to provides the 3D measures (point cloud, normals, etc.). Default: SL_REFERENCE_FRAME_CAMERA ### variable enable_depth ```cpp bool enable_depth; ``` Defines if the depth map should be computed. **Note**: If set to false, only the images are available. Default: true ### variable enable_fill_mode ```cpp bool enable_fill_mode; ``` Defines if the depth map should be completed or not. **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. Default: false ### variable confidence_threshold ```cpp int confidence_threshold; ``` Threshold to reject depth values based on their confidence. **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. 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 ### variable texture_confidence_threshold ```cpp int texture_confidence_threshold; ``` Threshold to reject depth values based on their texture confidence. **Note**: Pixels with a value close to 100 are not to be trusted. Accurate depth pixels tends to be closer to lower values. 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) ### variable remove_saturated_areas ```cpp bool remove_saturated_areas; ``` Defines if the saturated area (luminance>=255) must be removed from depth map estimation. Default: false --- # sl ## Directories | Name | | -------------- | | **c_api** | --- # c_api/types_c.h ## Classes | | Name | | -------------- | -------------- | | struct | **SL_Quaternion**
Structure representing a quaternion. | | struct | **SL_Vector2**
Structure representing a generic 2-dimensional vector. | | struct | **SL_Uint2**
Structure representing a generic 2-dimensional unsigned integer vector. | | struct | **SL_Vector3**
Structure representing a generic 3-dimensional vector. | | struct | **SL_Vector4**
Structure representing a generic 4-dimensional vector. | | struct | **SL_Transform**
Structure representing a transformation (translation and rotation) | | struct | **SL_Uchar2**
Structure representing an unsigned char 2-dimensional vector. | | struct | **SL_Uchar3**
Structure representing an unsigned char 3-dimensional vector. | | struct | **SL_Uchar4**
Structure representing an unsigned char 4-dimensional vector. | | struct | **SL_Matrix4f**
Structure representing a generic 4*4 matrix. | | struct | **SL_Matrix3f**
Structure representing a generic 3*3 matrix. | | struct | **SL_PoseData**
Structure containing positional tracking data giving the position and orientation of the camera in 3D space. | | struct | **SL_PlaneData**
Structure representing a plane defined by a point and a normal, or a plane equation. | | struct | **SL_IMUData**
Structure containing data from the IMU sensor. | | struct | **SL_BarometerData**
Structure containing data from the barometer sensor. | | struct | **SL_MagnetometerData**
Structure containing data from the magnetometer sensor. | | struct | **SL_TemperatureData**
Structure containing data from the temperature sensors. | | struct | **SL_SensorsData**
Structure containing all sensors data (except image sensors) to be used for positional tracking or environment study. | | struct | **SL_VoxelMeasureParameters**
Parameters controlling voxel decimation in sl_retrieve_voxel_measure. | | struct | **SL_PositionalTrackingStatus**
Lists the different status of positional tracking. | | struct | **SL_ObjectTrackingParameters**
Structure containing a set of parameters for the object tracking module. | | struct | **SL_Resolution**
Structure containing the width and height of an image. | | struct | **SL_InitParameters**
Structure containing the options used to initialize a camera. | | struct | **SL_RuntimeParameters**
Structure containing parameters that defines the behavior of sl_grab(). | | struct | **SL_DeviceProperties**
Structure containing information about the properties of a camera. | | struct | **SL_CameraParameters**
Structure containing the intrinsic parameters of a camera. | | struct | **SL_CalibrationParameters**
Structure containing intrinsic and extrinsic parameters of the camera (translation and rotation). | | struct | **SL_SensorParameters**
Structure containing information about a single sensor available in the current device. | | struct | **SL_CameraConfiguration**
Structure containing information about the camera sensor. | | struct | **SL_SensorsConfiguration**
Structure containing information about all the sensors available in the current device. | | struct | **SL_CameraInformation**
Structure containing information of a single camera (serial number, model, input type, etc.) | | struct | **SL_PositionalTrackingParameters**
Structure containing a set of parameters for the positional tracking module initialization. | | struct | **SL_Landmark**
Represents a 3d landmark. | | struct | **SL_Landmark2D**
Represents a 2d landmark. | | struct | **SL_RegionOfInterestParameters**
Structure containing a set of parameters for the region of interest. | | struct | **SL_PlaneDetectionParameters**
Structure containing a set of parameters for the plane detection functionality. | | struct | **SL_RecordingStatus**
Structure containing information about the status of the recording. | | struct | **SL_RecordingParameters**
Structure containing the options used to record. | | struct | **SL_SVOData**
Structure containing data that can be stored in and retrieved from SVOs. That information will be ingested with sl_ingest_data_into_svo and retrieved with sl_retrieve_svo_data. | | struct | **SL_StreamingParameters**
Structure containing the options used to stream with the ZED SDK. | | struct | **SL_StreamingProperties**
Structure containing information about the properties of a streaming device. | | struct | **SL_SpatialMappingParameters**
Structure containing a set of parameters for the spatial mapping module. | | struct | **SL_BatchParameters**
Structure containing a set of parameters for batch object detection. | | struct | **SL_AI_Model_status**
Structure containing AI model status. | | struct | **SL_ObjectDetectionParameters**
Structure containing a set of parameters for the object detection module. | | struct | **SL_ObjectDetectionRuntimeParameters**
Structure containing a set of runtime parameters for the object detection module. | | struct | **SL_CustomObjectDetectionProperties**
Structure containing a set of runtime properties of a certain class ID for the object detection module using a custom model. | | struct | **SL_CustomObjectDetectionRuntimeParameters**
Structure containing a set of runtime parameters for the object detection module using your own model ran by the SDK. | | struct | **SL_BodyTrackingParameters**
Structure containing a set of parameters for the body tracking module. | | struct | **SL_BodyTrackingRuntimeParameters**
Structure containing a set of runtime parameters for the body tracking module. | | struct | **SL_ObjectData**
Structure containing data of a detected object such as its bounding_box, label, id and its 3D position. | | struct | **SL_CustomBoxObjectData**
Structure that store externally detected objects. | | struct | **SL_CustomMaskObjectData** | | struct | **SL_Objects**
Structure containing the results of the object detection module. | | struct | **SL_BodyData**
Structure containing data of a detected body/person such as its bounding_box, id and its 3D position. | | struct | **SL_Bodies**
Structure containing the results of the body tracking module. | | struct | **SL_ObjectsBatch**
Structure containing batched data of a detected objects from the object detection module. | | struct | **SL_Rect**
Structure defining a 2D rectangle with top-left corner coordinates and width/height in pixels. | | struct | **SL_InputType**
Structure defining the input type used in the ZED SDK. | | struct | **SL_HealthStatus** | | struct | **SL_FusedPositionalTrackingStatus**
Class containing the overall position fusion status. | | struct | **SL_CommunicationParameters** | | struct | **SL_FusionConfiguration**
Useful struct to store the Fusion configuration, can be read from /write to a JSON file. | | struct | **SL_SynchronizationParameter**
Configuration parameters for data synchronization. | | struct | **SL_InitFusionParameters**
Holds the options used to initialize the Fusion object. | | struct | **SL_BodyTrackingFusionParameters**
Holds the options used to initialize the body tracking module of the Fusion. | | struct | **SL_BodyTrackingFusionRuntimeParameters**
Holds the options used to change the behavior of the body tracking module at runtime. | | struct | **SL_CameraIdentifier**
Used to identify a specific camera in the Fusion API. | | struct | **SL_CameraMetrics**
Holds the metrics of a sender in the fusion process. | | struct | **SL_FusionMetrics**
Holds the metrics of the fusion process. | | struct | **SL_GNSSData**
Structure containing GNSS data to be used for positional tracking as prior. | | struct | **SL_LatLng**
Represents a world position in LatLng format. | | struct | **SL_GeoPose**
Holds Geo reference position. | | struct | **SL_ECEF**
Represents a world position in ECEF format. | | struct | **SL_UTM**
Represents a world position in UTM format. | | struct | **SL_ENU**
Represents a world position in ENU format. | | struct | **SL_GNSSCalibrationParameters**
Holds the options used for calibrating GNSS / VIO. | | struct | **SL_PositionalTrackingFusionParameters**
Holds the options used for initializing the positional tracking fusion module. | ## Defines | | Name | | -------------- | -------------- | | | **MAX_FUSED_CAMERAS** | | | **WITH_OBJECT_DETECTION** | | | **MAX_CAMERA_PLUGIN** | | | **MAX_SUBMESH** | | | **MAX_NUMBER_OBJECT** | | | **MAX_TRAJECTORY_SIZE** | ## Types Documentation ### enum UNITY_PLAN_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | UNITY_PLAN_TYPE_FLOOR | | | | UNITY_PLAN_TYPE_HIT_HORIZONTAL | | | | UNITY_PLAN_TYPE_HIT_VERTICAL | | | | UNITY_PLAN_TYPE_HIT_UNKNOWN | | | ### enum SL_HEADING_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_HEADING_STATE_GOOD | | The heading is reliable and not affected by iron interferences. | | SL_HEADING_STATE_OK | | The heading is reliable, but affected by slight iron interferences. | | SL_HEADING_STATE_NOT_GOOD | | The heading is not reliable because affected by strong iron interferences. | | SL_HEADING_STATE_NOT_CALIBRATED | | The magnetometer has not been calibrated. | | SL_HEADING_STATE_MAG_NOT_AVAILABLE | | The magnetometer sensor is not available. | | SL_HEADING_STATE_LAST | | | Lists the different states of the magnetic heading. ### enum SL_ERROR_CODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_ERROR_CODE_SENSOR_CONFIGURATION_CHANGED | -6| The sensor's configuration (mode, multicast, etc.) was changed externally while streaming. If auto_recovery_on_config_change is enabled, the SDK will automatically reconnect. This warning code is returned once after successful recovery. | | SL_ERROR_CODE_POTENTIAL_CALIBRATION_ISSUE | -5| The camera has a potential calibration issue | | SL_ERROR_CODE_CONFIGURATION_FALLBACK | -4| The operation could not proceed with the target configuration but did success with a fallback. | | SL_ERROR_CODE_SENSORS_DATA_REQUIRED | -3| The input data does not contains the high frequency sensors data, this is usually because it requires newer SVO/Streaming. In order to work this modules needs inertial data present in it input. | | SL_ERROR_CODE_CORRUPTED_FRAME | -2| The image is corrupted with invalid colors (green/purple images). This indicates a serious hardware or driver issue. | | SL_ERROR_CODE_CAMERA_REBOOTING | -1| The camera is currently rebooting. | | SL_ERROR_CODE_SUCCESS | | Standard code for successful behavior. | | SL_ERROR_CODE_FAILURE | | Standard code for unsuccessful behavior. | | SL_ERROR_CODE_NO_GPU_COMPATIBLE | | No GPU found or CUDA capability of the device is not supported. | | SL_ERROR_CODE_NOT_ENOUGH_GPU_MEMORY | | Not enough GPU memory for this depth mode. Try a different mode (such as SL_DEPTH_MODE_PERFORMANCE), or increase the minimum depth value (see SL_InitParameters.depth_minimum_distance). | | SL_ERROR_CODE_CAMERA_NOT_DETECTED | | No camera was detected. | | SL_ERROR_CODE_SENSORS_NOT_INITIALIZED | | The MCU that controls the sensors module has an invalid serial number. You can try to recover it by launching the **ZED Diagnostic** tool from the command line with the option `-r`. | | SL_ERROR_CODE_SENSORS_NOT_AVAILABLE | | A camera with sensor is detected but the sensors (IMU, barometer, ...) cannot be opened. Only the SL_MODEL_ZED does not has sensors. Unplug/replug is required. | | SL_ERROR_CODE_INVALID_RESOLUTION | | In case of invalid resolution parameter, such as an upsize beyond the original image size in sl_retrieve_image. | | SL_ERROR_CODE_LOW_USB_BANDWIDTH | | Insufficient bandwidth for the correct use of the camera. This issue can occur when you use multiple cameras or a USB 2.0 port. | | SL_ERROR_CODE_CALIBRATION_FILE_NOT_AVAILABLE | | The calibration file of the camera is not found on the host machine. Use **ZED Explorer** or **ZED Calibration** to download the factory calibration file. | | SL_ERROR_CODE_INVALID_CALIBRATION_FILE | | The calibration file is not valid. Try to download the factory calibration file or recalibrate your camera using **ZED Calibration**. | | SL_ERROR_CODE_INVALID_SVO_FILE | | The provided SVO file is not valid. | | SL_ERROR_CODE_SVO_RECORDING_ERROR | | An error occurred while trying to record an SVO (not enough free storage, invalid file, ...). | | SL_ERROR_CODE_SVO_UNSUPPORTED_COMPRESSION | | An SVO related error, occurs when NVIDIA based compression cannot be loaded. | | SL_ERROR_CODE_END_OF_SVOFILE_REACHED | | SVO end of file has been reached. No frame will be available until the SVO position is reset. | | SL_ERROR_CODE_INVALID_COORDINATE_SYSTEM | | The requested coordinate system is not available. | | SL_ERROR_CODE_INVALID_FIRMWARE | | The firmware of the camera is out of date. Update to the latest version. | | SL_ERROR_CODE_INVALID_FUNCTION_PARAMETERS | | Invalid parameters have been given for the function. | | SL_ERROR_CODE_CUDA_ERROR | | A CUDA error has been detected in the process, in sl_grab() or sl_retrieve_xxx() only. Activate verbose in sl_open_camera() for more info. | | SL_ERROR_CODE_CAMERA_NOT_INITIALIZED | | The ZED SDK is not initialized. Probably a missing call to sl_open_camera(). | | SL_ERROR_CODE_NVIDIA_DRIVER_OUT_OF_DATE | | Your NVIDIA driver is too old and not compatible with your current CUDA version. | | SL_ERROR_CODE_INVALID_FUNCTION_CALL | | The call of the function is not valid in the current context. Could be a missing call of sl_open_camera(). | | SL_ERROR_CODE_CORRUPTED_SDK_INSTALLATION | | The ZED SDK was not able to load its dependencies or some assets are missing. Reinstall the ZED SDK or check for missing dependencies (cuDNN, TensorRT). | | SL_ERROR_CODE_INCOMPATIBLE_SDK_VERSION | | The installed ZED SDK is incompatible with the one used to compile the program. | | SL_ERROR_CODE_INVALID_AREA_FILE | | The given area file does not exist. Check the path. | | SL_ERROR_CODE_INCOMPATIBLE_AREA_FILE | | The area file does not contain enough data to be used or the SL_DEPTH_MODE used during the creation of the area file is different from the one currently set. | | SL_ERROR_CODE_CAMERA_FAILED_TO_SETUP | | Failed to open the camera at the proper resolution. Try another resolution or make sure that the UVC driver is properly installed. | | SL_ERROR_CODE_CAMERA_DETECTION_ISSUE | | Your camera can not be opened. Try replugging it to another port or flipping the USB-C connector (if there is one). | | SL_ERROR_CODE_CANNOT_START_CAMERA_STREAM | | Cannot start the camera stream. Make sure your camera is not already used by another process or blocked by firewall or antivirus. | | SL_ERROR_CODE_NO_GPU_DETECTED | | No GPU found. CUDA is unable to list it. Can be a driver/reboot issue. | | SL_ERROR_CODE_PLANE_NOT_FOUND | | Plane not found. Either no plane is detected in the scene, at the location or corresponding to the floor, or the floor plane doesn't match the prior given. | | SL_ERROR_CODE_MODULE_NOT_COMPATIBLE_WITH_CAMERA | | The module you try to use is not compatible with your camera SL_MODEL. | | SL_ERROR_CODE_MOTION_SENSORS_REQUIRED | | The module needs the sensors to be enabled (see SL_InitParameters.sensors_required). | | SL_ERROR_CODE_MODULE_NOT_COMPATIBLE_WITH_CUDA_VERSION | | The module needs a newer version of CUDA. | | SL_ERROR_CODE_DRIVER_FAILURE | | The drivers initialization has failed. When using gmsl cameras, try restarting with sudo systemctl restart zed_x_daemon.service | | SL_ERROR_CODE_CAMERA_EXCEEDS_BANDWIDTH | 35| The camera configuration exceeds available PHY CSI bandwidth (GMSL). Reduce resolution/FPS or adjust hardware configuration. | Lists error codes in the ZED SDK. ### enum SL_RESOLUTION | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_RESOLUTION_HD4K | | 3856x2180 for imx678 mono | | SL_RESOLUTION_QHDPLUS | | 3800x1800 | | SL_RESOLUTION_HD2K | | 2208*1242 (x2) Available FPS: 15 | | SL_RESOLUTION_HD1536 | | 1920*1536 (x2) Available FPS: 15, 30 | | SL_RESOLUTION_HD1080 | | 1920*1080 (x2) Available FPS: 15, 30 | | SL_RESOLUTION_HD1200 | | 1920*1200 (x2) Available FPS: 15, 30, 60 | | SL_RESOLUTION_HD720 | | 1280*720 (x2) Available FPS: 15, 30, 60 | | SL_RESOLUTION_SVGA | | 960*600 (x2) Available FPS: 15, 30, 60, 120 | | SL_RESOLUTION_VGA | | 672*376 (x2) Available FPS: 15, 30, 60, 100 | | SL_RESOLUTION_XVGA | | 960x768 (x2) Available FPS: 30 Only supported with ZED-X HDR lineup (One/Stereo) | | SL_RESOLUTION_TXGA | | 640x512 (x2) Available FPS: 30 Only supported with ZED-X HDR lineup (One/Stereo) | | SL_RESOLUTION_AUTO | 11| Select the resolution compatible with the camera: * ZED X/X Mini: SL_RESOLUTION_HD1200 * other cameras: SL_RESOLUTION_HD720 | Lists available resolutions. **Note**: The VGA resolution does not respect the 640*480 standard to better fit the camera sensor (672*376 is used). **Warning**: * All resolutions are not available for every camera. * You can find the available resolutions for each camera in [our documentation](https://www.stereolabs.com/docs/video/camera-controls#selecting-a-resolution). ### enum SL_UNIT | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_UNIT_MILLIMETER | | International System (1/1000 meters) | | SL_UNIT_CENTIMETER | | International System (1/100 meters) | | SL_UNIT_METER | | International System (1 meter) | | SL_UNIT_INCH | | Imperial Unit (1/12 feet) | | SL_UNIT_FOOT | | Imperial Unit (1 foot) | Lists available units for measures. ### enum SL_COORDINATE_SYSTEM | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_COORDINATE_SYSTEM_IMAGE | | Standard coordinates system in computer vision. Used in OpenCV: see [here](http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html). | | SL_COORDINATE_SYSTEM_LEFT_HANDED_Y_UP | | Left-handed with Y up and Z forward. Used in Unity with DirectX. | | SL_COORDINATE_SYSTEM_RIGHT_HANDED_Y_UP | | Right-handed with Y pointing up and Z backward. Used in OpenGL. | | SL_COORDINATE_SYSTEM_RIGHT_HANDED_Z_UP | | Right-handed with Z pointing up and Y forward. Used in 3DSMax. | | SL_COORDINATE_SYSTEM_LEFT_HANDED_Z_UP | | Left-handed with Z axis pointing up and X forward. Used in Unreal Engine. | | SL_COORDINATE_SYSTEM_RIGHT_HANDED_Z_UP_X_FWD | | Right-handed with Z pointing up and X forward. Used in ROS (REP 103). | Lists available coordinates systems for positional tracking and 3D measures. !CoordinateSystem.webp ### enum SL_CAMERA_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_CAMERA_STATE_AVAILABLE | | The camera can be opened by the ZED SDK. | | SL_CAMERA_STATE_NOT_AVAILABLE | | The camera is already opened and unavailable. | Lists possible camera states. ### enum SL_MODEL | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MODEL_ZED | | ZED camera model | | SL_MODEL_ZED_M | | ZED Mini (ZED M) camera model | | SL_MODEL_ZED2 | | ZED 2 camera model | | SL_MODEL_ZED2i | | ZED 2i camera model | | SL_MODEL_ZED_X | | ZED X camera model | | SL_MODEL_ZED_XM | | ZED X Mini (ZED XM) camera model | | SL_MODEL_ZED_X_HDR | | ZED X HDR camera model | | SL_MODEL_ZED_X_HDR_MINI | | ZED X HDR Mini camera model | | SL_MODEL_ZED_X_HDR_MAX | | ZED X HDR Wide camera model | | SL_MODEL_ZED_X_NANO | 9| ZED X Nano (18mm baseline) camera model with dual global shutter AR0234 sensor | | SL_MODEL_VIRTUAL_ZED_X | 11| Virtual ZED X generated from 2 ZED X One | | SL_MODEL_ZED_XONE_GS | 30| ZED X One with global shutter AR0234 sensor | | SL_MODEL_ZED_XONE_UHD | 31| ZED X One with 4K rolling shutter IMX678 sensor | | SL_MODEL_ZED_XONE_HDR | 32| ZED X One HDR | Lists ZED camera model. ### enum SL_MEM | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MEM_CPU | | Data will be stored on the CPU (processor side). | | SL_MEM_GPU | | Data will be stored on the GPU (graphic card side). | | SL_MEM_BOTH | | Data will be stored on both the CPU and GPU. | Lists available memory type. ### enum SL_BUS_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_BUS_TYPE_USB | | USB input mode | | SL_BUS_TYPE_GMSL | | GMSL input mode | | SL_BUS_TYPE_AUTO | | Automatically select the input type. Trying first for available USB cameras, then GMSL. | Lists available LIVE input type in the ZED SDK. ### enum SL_SENSOR_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SENSOR_TYPE_ACCELEROMETER | | Three-axis accelerometer sensor to measure the inertial accelerations. | | SL_SENSOR_TYPE_GYROSCOPE | | Three-axis gyroscope sensor to measure the angular velocities. | | SL_SENSOR_TYPE_MAGNETOMETER | | Three-axis magnetometer sensor to measure the orientation of the device with respect to the Earth's magnetic field. | | SL_SENSOR_TYPE_BAROMETER | | Barometer sensor to measure the atmospheric pressure. | Lists available sensor types. **Note**: Sensors are not available on SL_MODEL_ZED. ### enum SL_SENSORS_UNIT | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SENSORS_UNIT_M_SEC_2 | | m/s² (acceleration) | | SL_SENSORS_UNIT_DEG_SEC | | deg/s (angular velocity) | | SL_SENSORS_UNIT_U_T | | μT (magnetic field) | | SL_SENSORS_UNIT_HPA | | hPa (atmospheric pressure) | | SL_SENSORS_UNIT_CELSIUS | | °C (temperature) | | SL_SENSORS_UNIT_HERTZ | | Hz (frequency) | Lists available measurement units of onboard sensors. **Note**: Sensors are not available on SL_MODEL_ZED. ### enum SL_SIDE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SIDE_LEFT | | Left side only. | | SL_SIDE_RIGHT | | Right side only. | | SL_SIDE_BOTH | | Left and right side. | Lists possible sides on which to get data from. ### enum SL_INPUT_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_INPUT_TYPE_USB | | USB input mode | | SL_INPUT_TYPE_SVO | | SVO file input mode | | SL_INPUT_TYPE_STREAM | | STREAM input mode (requires to use sl_enable_streaming() / sl_disable_streaming() on the "sender" side) | | SL_INPUT_TYPE_GMSL | | GMSL input mode (only on NVIDIA Jetson) | Lists available input types in the ZED SDK. ### enum SL_REFERENCE_FRAME | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_REFERENCE_FRAME_WORLD | | SL_PoseData will contain the motion with reference to the world frame (previously called SL_PATH). | | SL_REFERENCE_FRAME_CAMERA | | SL_PoseData will contain the motion with reference to the previous camera frame (previously called SL_POSE) | Lists possible types of position matrix used to store camera path and pose. ### enum SL_TIME_REFERENCE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_TIME_REFERENCE_IMAGE | | The requested timestamp or data will be at the time of the frame extraction. | | SL_TIME_REFERENCE_CURRENT | | The requested timestamp or data will be at the time of the function call. | Lists possible time references for timestamps or data. ### enum SL_STREAMING_CODEC | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_STREAMING_CODEC_H264 | | AVCHD/H264 encoding | | SL_STREAMING_CODEC_H265 | | HEVC/H265 encoding | Lists the different encoding types for image streaming. ### enum SL_VIDEO_SETTINGS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_VIDEO_SETTINGS_BRIGHTNESS | | Brightness control Affected value should be between 0 and 8. | | SL_VIDEO_SETTINGS_CONTRAST | | Contrast control Affected value should be between 0 and 8. | | SL_VIDEO_SETTINGS_HUE | | Hue control Affected value should be between 0 and 11. | | SL_VIDEO_SETTINGS_SATURATION | | Saturation control Affected value should be between 0 and 8. | | SL_VIDEO_SETTINGS_SHARPNESS | | Digital sharpening control Affected value should be between 0 and 8. | | SL_VIDEO_SETTINGS_GAMMA | | ISP gamma control Affected value should be between 1 and 9. | | SL_VIDEO_SETTINGS_GAIN | | Gain control Affected value should be between 0 and 100 for manual control. | | SL_VIDEO_SETTINGS_EXPOSURE | | Exposure control Affected value should be between 0 and 100 for manual control. The exposition is mapped linearly in a percentage of the following max values. Special case for `SL_VIDEO_SETTINGS_EXPOSURE = 0` that corresponds to 0.17072ms. The conversion to milliseconds depends on the framerate: * 15fps & `SL_VIDEO_SETTINGS_EXPOSURE = 100` -> 19.97ms * 30fps & `SL_VIDEO_SETTINGS_EXPOSURE = 100` -> 19.97ms * 60fps & `SL_VIDEO_SETTINGS_EXPOSURE = 100` -> 10.84072ms * 100fps & `SL_VIDEO_SETTINGS_EXPOSURE = 100` -> 10.106624ms | | SL_VIDEO_SETTINGS_AEC_AGC | | Defines if the SL_VIDEO_SETTINGS_GAIN and SL_VIDEO_SETTINGS_EXPOSURE are in automatic mode or not. Setting SL_VIDEO_SETTINGS_GAIN or SL_VIDEO_SETTINGS_EXPOSURE values will automatically set this value to 0. | | SL_VIDEO_SETTINGS_AEC_AGC_ROI | | Defines the region of interest for automatic exposure/gain computation. To be used with dedicated sl_set_roi_for_aec_agc() / sl_get_roi_for_aec_agc() functions. | | SL_VIDEO_SETTINGS_WHITEBALANCE_TEMPERATURE | | Color temperature control Affected value should be between 2800 and 6500 with a step of 100. | | SL_VIDEO_SETTINGS_WHITEBALANCE_AUTO | | Defines if the white balance is in automatic mode or not. | | SL_VIDEO_SETTINGS_LED_STATUS | | Status of the front LED of the camera. Set to 0 to disable the light, 1 to enable the light. Default value is on. | | SL_VIDEO_SETTINGS_EXPOSURE_TIME | | Real exposure time control in microseconds. | | SL_VIDEO_SETTINGS_ANALOG_GAIN | | Real analog gain (sensor) control in mDB. The range is defined by Jetson DTS and by default [1000-16000]. | | SL_VIDEO_SETTINGS_DIGITAL_GAIN | | Real digital gain (ISP) as a factor. The range is defined by Jetson DTS and by default [1-256]. | | SL_VIDEO_SETTINGS_AUTO_EXPOSURE_TIME_RANGE | | Range of exposure auto control in microseconds. Used with sl_get_camera_settings_min_max(). Min/max range between max range defined in DTS. By default: [28000 - or 19000] us. | | SL_VIDEO_SETTINGS_AUTO_ANALOG_GAIN_RANGE | | Range of sensor gain in automatic control. Used with sl_get_camera_settings_min_max(). Min/max range between max range defined in DTS. By default: [1000 - 16000] mdB. | | SL_VIDEO_SETTINGS_AUTO_DIGITAL_GAIN_RANGE | | Range of digital ISP gain in automatic control. Used with sl_get_camera_settings_min_max(). Min/max range between max range defined in DTS. By default: [1 - 256]. | | SL_VIDEO_SETTINGS_EXPOSURE_COMPENSATION | | Exposure-target compensation made after auto exposure. Reduces the overall illumination target by factor of F-stops. Affected value should be between 0 and 100 (mapped between [-2.0,2.0]). Default value is 50, i.e. no compensation applied. | | SL_VIDEO_SETTINGS_DENOISING | | Level of denoising applied on both left and right images. Affected value should be between 0 and 100. Default value is 50. | | SL_VIDEO_SETTINGS_SCENE_ILLUMINANCE | | Level of illuminance of the scene. Can be used to determine the level of light in the scene and adjust settings accordingly. | | SL_VIDEO_SETTINGS_AE_ANTIBANDING | | AE anti-banding mode. Affected value should be between 0 and 3. 0: OFF, 1: AUTO, 2: 50Hz, 3: 60Hz. | | SL_VIDEO_SETTINGS_LAST | | | Lists available camera settings for the camera (contrast, hue, saturation, gain, ...). **Warning**: SL_VIDEO_SETTINGS_GAIN and SL_VIDEO_SETTINGS_EXPOSURE are linked in auto/default mode (see sl_set_camera_settings()). ### enum SL_SVO_ENCODING_PRESET | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SVO_ENCODING_PRESET_DEFAULT | | Encoder default. Maps to NVENC P4 / V4L2 default. | | SL_SVO_ENCODING_PRESET_ULTRAFAST | | Fastest encoding, lowest quality. Maps to NVENC P1 / V4L2 ULTRAFAST. | | SL_SVO_ENCODING_PRESET_FAST | | Fast encoding. Maps to NVENC P2 / V4L2 FAST. | | SL_SVO_ENCODING_PRESET_MEDIUM | | Balanced speed/quality. Maps to NVENC P3 / V4L2 MEDIUM. | | SL_SVO_ENCODING_PRESET_SLOW | | Slow encoding, higher quality. Maps to NVENC P5 / V4L2 SLOW. | | SL_SVO_ENCODING_PRESET_LAST | | | Lists the available encoding presets for SVO recording. ### enum SL_TIMESTAMP_CLOCK | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_TIMESTAMP_CLOCK_SYSTEM_CLOCK | | Timestamps use the system (wall-clock) time. Timestamps represent nanoseconds since Unix epoch. | | SL_TIMESTAMP_CLOCK_MONOTONIC_CLOCK | | Timestamps use a monotonic clock (CLOCK_MONOTONIC). Immune to system clock step adjustments. | | SL_TIMESTAMP_CLOCK_LAST | | | Selects the clock source used for all timestamps produced by the ZED SDK. ### enum SL_VOXELIZATION_MODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_VOXELIZATION_MODE_FIXED | | No adaptation. voxel_size is used uniformly everywhere. | | SL_VOXELIZATION_MODE_STEREO_UNCERTAINTY | | Quadratic growth matching stereo depth noise: Z²/(f·B). Voxels grow larger at distance. | | SL_VOXELIZATION_MODE_LINEAR | | Linear growth with depth Z. Suits sensors with linearly increasing noise (e.g. lidar, ToF). | | SL_VOXELIZATION_MODE_LAST | | | Controls how voxel size adapts with depth in sl_retrieve_voxel_measure. ### enum SL_MEASURE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MEASURE_DISPARITY | | Disparity map. Each pixel contains 1 float. Type: SL_MAT_TYPE_F32_C1 | | SL_MEASURE_DEPTH | | Depth map in sl::UNIT defined in SL_InitParameters::coordinate_unit. Each pixel contains 1 float. Type: SL_MAT_TYPE_F32_C1 | | SL_MEASURE_CONFIDENCE | | Certainty/confidence of the depth map. Each pixel contains 1 float. Type: SL_MAT_TYPE_F32_C1 | | SL_MEASURE_XYZ | | Point cloud. Each pixel contains 4 float (X, Y, Z, not used). Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZRGBA | | Colored point cloud. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the RGBA color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZBGRA | | Colored point cloud. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the BGRA color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZARGB | | Colored point cloud. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the ARGB color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZABGR | | Colored point cloud. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the ABGR color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_NORMALS | | Normal vectors map. Each pixel contains 4 float (X, Y, Z, 0). Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_DISPARITY_RIGHT | | Disparity map for right sensor. Each pixel contains 1 float. Type: SL_MAT_TYPE_F32_C1 | | SL_MEASURE_DEPTH_RIGHT | | Depth map for right sensor. Each pixel contains 1 float. Type: SL_MAT_TYPE_F32_C1 | | SL_MEASURE_XYZ_RIGHT | | Point cloud for right sensor. Each pixel contains 4 float (X, Y, Z, not used). Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZRGBA_RIGHT | | Colored point cloud for right sensor. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the RGBA color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZBGRA_RIGHT | | Colored point cloud for right sensor. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the BGRA color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZARGB_RIGHT | | Colored point cloud for right sensor. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the ARGB color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_XYZABGR_RIGHT | | Colored point cloud for right sensor. Each pixel contains 4 float (X, Y, Z, color). The color should to be read as an unsigned char[4] representing the ABGR color. Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_NORMALS_RIGHT | | Normal vectors map for right view. Each pixel contains 4 float (X, Y, Z, 0). Type: SL_MAT_TYPE_F32_C4 | | SL_MEASURE_DEPTH_U16_MM | | Depth map in millimeter whatever the sl::UNIT defined in SL_InitParameters::coordinate_unit. Invalid values are set to 0 and depth values are clamped at 65000. Each pixel contains 1 unsigned short. Type: SL_MAT_TYPE_U16_C1. | | SL_MEASURE_DEPTH_U16_MM_RIGHT | | Depth map in millimeter for right sensor. Each pixel contains 1 unsigned short. Type: SL_MAT_TYPE_U16_C1. | Lists retrievable measures. ### enum SL_VIEW | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_VIEW_LEFT | | Left BGRA image. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_RIGHT | | Right BGRA image. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_LEFT_GRAY | | Left gray image. Each pixel contains 1 unsigned char. Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_RIGHT_GRAY | | Right gray image. Each pixel contains 1 unsigned char. Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_LEFT_NV12_UNRECTIFIED | | Left NV12 unrectified image. | | SL_VIEW_RIGHT_NV12_UNRECTIFIED | | Right NV12 unrectified image. | | SL_VIEW_LEFT_UNRECTIFIED | | Left BGRA unrectified image. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_RIGHT_UNRECTIFIED | | Right BGRA unrectified image. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_LEFT_UNRECTIFIED_GRAY | | Left gray unrectified image. Each pixel contains 1 unsigned char. Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_RIGHT_UNRECTIFIED_GRAY | | Right gray unrectified image. Each pixel contains 1 unsigned char. Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_SIDE_BY_SIDE | | Left and right image (the image width is therefore doubled). Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_DEPTH | | Color rendering of the depth. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_CONFIDENCE | | Color rendering of the depth confidence. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_NORMALS | | Color rendering of the normals. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_DEPTH_RIGHT | | Color rendering of the right depth mapped on right sensor. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_NORMALS_RIGHT | | Color rendering of the normals mapped on right sensor. Each pixel contains 4 unsigned char (B, G, R, A). Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_LEFT_BGRA | | Alias of SL_VIEW_LEFT. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_LEFT_BGR | | Left image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_RIGHT_BGRA | | Alias of SL_VIEW_RIGHT. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_RIGHT_BGR | | Right image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_LEFT_UNRECTIFIED_BGRA | | Alias of SL_VIEW_LEFT_UNRECTIFIED. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_LEFT_UNRECTIFIED_BGR | | Left unrectified image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_RIGHT_UNRECTIFIED_BGRA | | Alias of SL_VIEW_RIGHT_UNRECTIFIED. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_RIGHT_UNRECTIFIED_BGR | | Right unrectified image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_SIDE_BY_SIDE_BGRA | | Alias of SL_VIEW_SIDE_BY_SIDE. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_SIDE_BY_SIDE_BGR | | Side by side image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_SIDE_BY_SIDE_GRAY | | Side by side image in gray scale: Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_SIDE_BY_SIDE_UNRECTIFIED_BGRA | | Alias of sl::VIEW::SIDE_BY_SIDE_UNRECTIFIED. Type: sl::MAT_TYPE::U8_C4 | | SL_VIEW_SIDE_BY_SIDE_UNRECTIFIED_BGR | | Side by side unrectified image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3 | | SL_VIEW_SIDE_BY_SIDE_UNRECTIFIED_GRAY | | Side by side unrectified image in gray scale: Type: sl::MAT_TYPE::U8_C1 | | SL_VIEW_DEPTH_BGRA | | Alias of SL_VIEW_DEPTH. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_DEPTH_BGR | | Depth image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_DEPTH_GRAY | | Depth image in gray scale: Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_CONFIDENCE_BGRA | | Alias of SL_VIEW_CONFIDENCE. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_CONFIDENCE_BGR | | Confidence image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_CONFIDENCE_GRAY | | Confidence image in gray scale: Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_NORMALS_BGRA | | Alias of SL_VIEW_NORMALS. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_NORMALS_BGR | | Normal image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_NORMALS_GRAY | | Normal image in gray scale: Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_DEPTH_RIGHT_BGRA | | Alias of SL_VIEW_DEPTH_RIGHT. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_DEPTH_RIGHT_BGR | | Depth right image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_DEPTH_RIGHT_GRAY | | Depth right image in gray scale: Type: SL_MAT_TYPE_U8_C1 | | SL_VIEW_NORMALS_RIGHT_BGRA | | Alias of SL_VIEW_NORMALS_RIGHT. Type: SL_MAT_TYPE_U8_C4 | | SL_VIEW_NORMALS_RIGHT_BGR | | Normal right image in BGR pixel format: Type: SL_MAT_TYPE_U8_C3 | | SL_VIEW_NORMALS_RIGHT_GRAY | | Normal right image in gray scale: Type: SL_MAT_TYPE_U8_C1 | Lists available views. ### enum SL_OBJECT_TRACKING_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_OBJECT_TRACKING_STATE_OFF | | The tracking is not yet initialized. The object id is not usable. | | SL_OBJECT_TRACKING_STATE_OK | | The object is tracked. | | SL_OBJECT_TRACKING_STATE_SEARCHING | | The object could not be detected in the image and is potentially occluded. The trajectory is estimated. | | SL_OBJECT_TRACKING_STATE_TERMINATE | | This is the last searching state of the track. The track will be deleted in the next sl_retrieve_objects(). | Lists the different states of object tracking. ### enum SL_POSITIONAL_TRACKING_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_POSITIONAL_TRACKING_STATE_SEARCHING | | \warn DEPRECATED: This state is no longer in use. | | SL_POSITIONAL_TRACKING_STATE_OK | | The positional tracking is working normally. | | SL_POSITIONAL_TRACKING_STATE_OFF | | The positional tracking is not enabled. | | SL_POSITIONAL_TRACKING_STATE_FPS_TOO_LOW | | The effective FPS is too low to give proper results for motion tracking. Consider using performance parameters (SL_DEPTH_MODE_PERFORMANCE, low camera resolution (SL_RESOLUTION_VGA / SL_RESOLUTION_SVGA or SL_RESOLUTION_HD720). | | SL_POSITIONAL_TRACKING_STATE_SEARCHING_FLOOR_PLANE | | The camera is searching for the floor plane to locate itself with respect to it. The SL_REFERENCE_FRAME_WORLD will be set afterward. | | SL_POSITIONAL_TRACKING_STATE_UNAVAILABLE | | The tracking module was unable to perform tracking from the previous frame to the current frame. | Lists the different states of positional tracking. ### enum SL_ODOMETRY_STATUS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_ODOMETRY_STATUS_OK | | The positional tracking module successfully tracked from the previous frame to the current frame. | | SL_ODOMETRY_STATUS_UNAVAILABLE | | The positional tracking module failed to track from the previous frame to the current frame. | Report the status of current odom tracking. ### enum SL_SPATIAL_MEMORY_STATUS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MAP_TRACKING_STATUS_OK | 0| | | SL_MAP_TRACKING_STATUS_LOOP_CLOSED | 1| Found a loop closure, relocalized within the area map or corrected after a sudden localization loss. | | SL_MAP_TRACKING_STATUS_SEARCHING | 2| | | SL_MAP_TRACKING_STATUS_OFF | 3| Spatial memory is disabled. | | SL_MAP_TRACKING_STATUS_INITIALIZING | 4| Camera has not yet acquired enough memory or found its first loop closure. Keep moving the camera. | | SL_MAP_TRACKING_STATUS_KNOWN_MAP | 5| Camera is localized within the loaded area map. | | SL_MAP_TRACKING_STATUS_MAP_UPDATE | 6| Camera is mapping or getting out of area map bounds. | | SL_MAP_TRACKING_STATUS_LOST | 7| Localization cannot operate anymore (camera obstructed or sudden jumps). | | SL_MAP_TRACKING_STATUS_NOT_ENOUGH_MEMORY_FOR_TRACKING | 8| Not enough memory to continue tracking. | Report the status of current map tracking. ### enum SL_POSITIONAL_TRACKING_MODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_POSITIONAL_TRACKING_MODE_GEN_1 | | Default mode. Fast and stable mode. Requires depth computation. Less robust than GEN_3. | | SL_POSITIONAL_TRACKING_MODE_GEN_2 | | | | SL_POSITIONAL_TRACKING_MODE_GEN_3 | | Fast and accurate, in both exploratory mode and mapped environments.\Note Can be used even if depth_mode is set to SL_DEPTH_MODE_NONE. | Lists the mode of positional tracking that can be used. ### enum SL_POSITIONAL_TRACKING_FUSION_STATUS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_POSITIONAL_TRACKING_FUSION_STATUS_VISUAL_INERTIAL | 0| | | SL_POSITIONAL_TRACKING_FUSION_STATUS_VISUAL | 1| | | SL_POSITIONAL_TRACKING_FUSION_STATUS_INERTIAL | 2| | | SL_POSITIONAL_TRACKING_FUSION_STATUS_GNSS | 3| | | SL_POSITIONAL_TRACKING_FUSION_STATUS_VISUAL_INERTIAL_GNSS | 4| | | SL_POSITIONAL_TRACKING_FUSION_STATUS_VISUAL_GNSS | 5| | | SL_POSITIONAL_TRACKING_FUSION_STATUS_INERTIAL_GNSS | 6| | | SL_POSITIONAL_TRACKING_FUSION_STATUS_UNAVAILABLE | 7| | Report the status of the positional tracking fusion. ### enum SL_REGION_OF_INTEREST_AUTO_DETECTION_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_REGION_OF_INTEREST_AUTO_DETECTION_STATE_RUNNING | | The region of interest auto detection is initializing. | | SL_REGION_OF_INTEREST_AUTO_DETECTION_STATE_READY | | The region of interest mask is ready, if auto_apply was enabled, the region of interest mask is being used | | SL_REGION_OF_INTEREST_AUTO_DETECTION_STATE_NOT_ENABLED | | The region of interest auto detection is not enabled | Lists the different states of region of interest auto detection. ### enum SL_AREA_EXPORTING_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_AREA_EXPORTING_STATE_SUCCESS | | The spatial memory file has been successfully created. | | SL_AREA_EXPORTING_STATE_RUNNING | | The spatial memory is currently being written. | | SL_AREA_EXPORTING_STATE_NOT_STARTED | | The spatial memory file exportation has not been called. | | SL_AREA_EXPORTING_STATE_FILE_EMPTY | | The spatial memory contains no data, the file is empty. | | SL_AREA_EXPORTING_STATE_FILE_ERROR | | The spatial memory file has not been written because of a wrong file name. | | SL_AREA_EXPORTING_STATE_SPATIAL_MEMORY_DISABLED | | The spatial memory learning is disabled. No file can be created. | Lists the different states of spatial memory area export. ### enum SL_SPATIAL_MAPPING_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SPATIAL_MAPPING_STATE_INITIALIZING | | The spatial mapping is initializing. | | SL_SPATIAL_MAPPING_STATE_OK | | The depth and tracking data were correctly integrated in the mapping algorithm. | | SL_SPATIAL_MAPPING_STATE_NOT_ENOUGH_MEMORY | | The maximum memory dedicated to the scanning has been reached. The mesh will no longer be updated. | | SL_SPATIAL_MAPPING_STATE_NOT_ENABLED | | sl_enable_spatial_mapping() wasn't called or the scanning was stopped and not relaunched. | | SL_SPATIAL_MAPPING_STATE_FPS_TOO_LOW | | The effective FPS is too low to give proper results for spatial mapping. Consider using performance parameters (SL_DEPTH_MODE_PERFORMANCE, low camera resolution (SL_RESOLUTION_VGA / SL_RESOLUTION_SVGA or SL_RESOLUTION_HD720). | Lists the different states of spatial mapping. ### enum SL_SPATIAL_MAP_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SPATIAL_MAP_TYPE_MESH | | The geometry is represented by a set of vertices connected by edges and forming faces. No color information is available. | | SL_SPATIAL_MAP_TYPE_FUSED_POINT_CLOUD | | The geometry is represented by a set of 3D colored points. | Lists the types of spatial maps that can be created. ### enum SL_MESH_FILTER | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MESH_FILTER_LOW | | Clean the mesh by closing small holes and removing isolated faces. | | SL_MESH_FILTER_MEDIUM | | Soft faces decimation and smoothing. | | SL_MESH_FILTER_HIGH | | Drastically reduce the number of faces and apply a soft smooth. | Lists available mesh filtering intensities. ### enum SL_MESH_FILE_FORMAT | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MESH_FILE_FORMAT_PLY | | Contains only vertices and faces. | | SL_MESH_FILE_FORMAT_PLY_BIN | | Contains only vertices and faces encoded in binary. | | SL_MESH_FILE_FORMAT_OBJ | | Contains vertices, normals, faces, and texture information (if possible). | Lists available mesh file formats. ### enum SL_DEPTH_MODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_DEPTH_MODE_NONE | | | | SL_DEPTH_MODE_PERFORMANCE | | No depth map computation. Only rectified stereo images will be available. | | SL_DEPTH_MODE_QUALITY | | Computation mode optimized for speed. Computation mode designed for challenging areas with untextured surfaces. | | SL_DEPTH_MODE_ULTRA | | Computation mode that favors edges and sharpness. Requires more GPU memory and computation power. | | SL_DEPTH_MODE_NEURAL_LIGHT | | End to End Neural disparity estimation. Requires AI module. | | SL_DEPTH_MODE_NEURAL | | End to End Neural disparity estimation. Requires AI module. | | SL_DEPTH_MODE_NEURAL_PLUS | | More accurate Neural disparity estimation. Requires AI module. | Lists available depth computation modes. ### enum SL_FLIP_MODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_FLIP_MODE_OFF | | No flip applied. Default behavior. | | SL_FLIP_MODE_ON | | Images and camera sensors' data are flipped useful when your camera is mounted upside down. | | SL_FLIP_MODE_AUTO | | In LIVE mode, use the camera orientation (if an IMU is available) to set the flip mode. In SVO mode, read the state of this enum when recorded. | Lists possible flip modes of the camera. ### enum SL_COPY_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_COPY_TYPE_CPU_CPU | | Copy data from CPU to CPU. | | SL_COPY_TYPE_CPU_GPU | | Copy data from CPU to GPU. | | SL_COPY_TYPE_GPU_GPU | | copy data from GPU to GPU. | | SL_COPY_TYPE_GPU_CPU | | Copy data from GPU to CPU. | Lists available copy operation on matrix. ### enum SL_SVO_COMPRESSION_MODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SVO_COMPRESSION_MODE_LOSSLESS | | PNG/ZSTD (lossless) CPU based compression. Average size: 42% of RAW | | SL_SVO_COMPRESSION_MODE_H264 | | H264 (AVCHD) GPU based compression. Average size: 1% of RAW | | SL_SVO_COMPRESSION_MODE_H265 | | H265 (HEVC) GPU based compression. Average size: 1% of RAW | | SL_SVO_COMPRESSION_MODE_H264_LOSSLESS | | H264 Lossless GPU/Hardware based compression. Average size: 25% of RAW Provides a SSIM/PSNR result (vs RAW) >= 99.9%. | | SL_SVO_COMPRESSION_MODE_H265_LOSSLESS | | H265 Lossless GPU/Hardware based compression. Average size: 25% of RAW Provides a SSIM/PSNR result (vs RAW) >= 99.9%. | Lists available compression modes for SVO recording. **Note**: SL_SVO_COMPRESSION_MODE_LOSSLESS is an improvement of previous lossless compression (used in ZED Explorer), even if size may be bigger, compression time is much faster. ### enum SL_MAT_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MAT_TYPE_F32_C1 | | 1-channel matrix of float | | SL_MAT_TYPE_F32_C2 | | 2-channel matrix of float | | SL_MAT_TYPE_F32_C3 | | 3-channel matrix of float | | SL_MAT_TYPE_F32_C4 | | 4-channel matrix of float | | SL_MAT_TYPE_U8_C1 | | 1-channel matrix of unsigned char | | SL_MAT_TYPE_U8_C2 | | 2-channel matrix of unsigned char | | SL_MAT_TYPE_U8_C3 | | 3-channel matrix of unsigned char | | SL_MAT_TYPE_U8_C4 | | 4-channel matrix of unsigned char | | SL_MAT_TYPE_U16_C1 | | 1-channel matrix of unsigned short | | SL_MAT_TYPE_S8_C4 | | 4-channel matrix of signed char | Lists available matrix formats. **Note**: * Matrix type depends on image or measure type. * For the dependencies, see SL_VIEW and SL_MEASURE. ### enum SL_OBJECT_SUBCLASS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_OBJECT_SUBCLASS_PERSON | 0| SL_OBJECT_CLASS_PERSON | | SL_OBJECT_SUBCLASS_BICYCLE | 1| SL_OBJECT_CLASS_VEHICLE | | SL_OBJECT_SUBCLASS_CAR | 2| SL_OBJECT_CLASS_VEHICLE | | SL_OBJECT_SUBCLASS_MOTORBIKE | 3| SL_OBJECT_CLASS_VEHICLE | | SL_OBJECT_SUBCLASS_BUS | 4| SL_OBJECT_CLASS_VEHICLE | | SL_OBJECT_SUBCLASS_TRUCK | 5| SL_OBJECT_CLASS_VEHICLE | | SL_OBJECT_SUBCLASS_BOAT | 6| SL_OBJECT_CLASS_VEHICLE | | SL_OBJECT_SUBCLASS_BACKPACK | 7| SL_OBJECT_CLASS_BAG | | SL_OBJECT_SUBCLASS_HANDBAG | 8| SL_OBJECT_CLASS_BAG | | SL_OBJECT_SUBCLASS_SUITCASE | 9| SL_OBJECT_CLASS_BAG | | SL_OBJECT_SUBCLASS_BIRD | 10| SL_OBJECT_CLASS_ANIMAL | | SL_OBJECT_SUBCLASS_CAT | 11| SL_OBJECT_CLASS_ANIMAL | | SL_OBJECT_SUBCLASS_DOG | 12| SL_OBJECT_CLASS_ANIMAL | | SL_OBJECT_SUBCLASS_HORSE | 13| SL_OBJECT_CLASS_ANIMAL | | SL_OBJECT_SUBCLASS_SHEEP | 14| SL_OBJECT_CLASS_ANIMAL | | SL_OBJECT_SUBCLASS_COW | 15| SL_OBJECT_CLASS_ANIMAL | | SL_OBJECT_SUBCLASS_CELLPHONE | 16| SL_OBJECT_CLASS_ELECTRONICS | | SL_OBJECT_SUBCLASS_LAPTOP | 17| SL_OBJECT_CLASS_ELECTRONICS | | SL_OBJECT_SUBCLASS_BANANA | 18| SL_OBJECT_CLASS_FRUIT_VEGETABLE | | SL_OBJECT_SUBCLASS_APPLE | 19| SL_OBJECT_CLASS_FRUIT_VEGETABLE | | SL_OBJECT_SUBCLASS_ORANGE | 20| SL_OBJECT_CLASS_FRUIT_VEGETABLE | | SL_OBJECT_SUBCLASS_CARROT | 21| SL_OBJECT_CLASS_FRUIT_VEGETABLE | | SL_OBJECT_SUBCLASS_PERSON_HEAD | 22| SL_OBJECT_CLASS_PERSON | | SL_OBJECT_SUBCLASS_SPORTSBALL | 23| SL_OBJECT_CLASS_SPORT | | SL_OBJECT_SUBCLASS_MACHINERY | 24| SL_OBJECT_CLASS_VEHICLE | | SL_OBJECT_SUBCLASS_LAST | 25| Last object subclass, used for iteration purposes. | List available object subclasses. Given as hint, when using object tracking an object can change of SL_OBJECT_SUBCLASS while keeping the same SL_OBJECT_CLASS (i.e.: frame n: SL_OBJECT_SUBCLASS_MOTORBIKE, frame n+1: SL_OBJECT_SUBCLASS_BICYCLE). ### enum SL_OBJECT_ACTION_STATE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_OBJECT_ACTION_STATE_IDLE | | The object is staying static. | | SL_OBJECT_ACTION_STATE_MOVING | | The object is moving. | Lists the different states of an object's actions. ### enum SL_OBJECT_DETECTION_MODEL | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_FAST | | Any objects, bounding box based. | | SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_MEDIUM | | Any objects, bounding box based, compromise between accuracy and speed. | | SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_ACCURATE | | Any objects, bounding box based, more accurate but slower than the base model. | | SL_OBJECT_DETECTION_MODEL_PERSON_HEAD_BOX_FAST | | Bounding box detector specialized in person heads particularly well suited for crowded environments. The person localization is also improved. | | SL_OBJECT_DETECTION_MODEL_PERSON_HEAD_BOX_ACCURATE | | Bounding box detector specialized in person heads, particularly well suited for crowded environments. The person localization is also improved, more accurate but slower than the base model. | | SL_OBJECT_DETECTION_MODEL_CUSTOM_BOX_OBJECTS | | For external inference, using your own custom model and/or frameworks. This mode disables the internal inference engine, the 2D bounding box detection must be provided. | | SL_OBJECT_DETECTION_MODEL_CUSTOM_YOLOLIKE_BOX_OBJECTS | | For internal inference using your own custom YOLO-like model. This mode requires a onnx file to be passed in the ObjectDetectionParameters. This model will be used for inference. | Lists available models for the object detection module. ### enum SL_BODY_TRACKING_MODEL | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_BODY_TRACKING_MODEL_HUMAN_BODY_FAST | | Keypoints based, specific to human skeleton, real time performance even on Jetson or low end GPU cards. | | SL_BODY_TRACKING_MODEL_HUMAN_BODY_MEDIUM | | Keypoints based, specific to human skeleton, compromise between accuracy and speed. | | SL_BODY_TRACKING_MODEL_HUMAN_BODY_ACCURATE | | Keypoints based, specific to human skeleton, state of the art accuracy, requires powerful GPU. | Lists available models for the body tracking module. ### enum SL_AI_MODELS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_AI_MODELS_MULTI_CLASS_DETECTION | | Related to SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_FAST | | SL_AI_MODELS_MULTI_CLASS_MEDIUM_DETECTION | | Related to SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_MEDIUM | | SL_AI_MODELS_MULTI_CLASS_ACCURATE_DETECTION | | Related to SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_ACCURATE | | SL_AI_MODELS_HUMAN_BODY_FAST_DETECTION | | Related to SL_BODY_TRACKING_MODEL_HUMAN_BODY_FAST | | SL_AI_MODELS_HUMAN_BODY_MEDIUM_DETECTION | | Related to SL_BODY_TRACKING_MODEL_HUMAN_BODY_MEDIUM | | SL_AI_MODELS_HUMAN_BODY_ACCURATE_DETECTION | | Related to SL_BODY_TRACKING_MODEL_HUMAN_BODY_ACCURATE | | SL_AI_MODELS_HUMAN_BODY_38_FAST_DETECTION | | Related to SL_BODY_TRACKING_MODEL_HUMAN_BODY_FAST | | SL_AI_MODELS_HUMAN_BODY_38_MEDIUM_DETECTION | | Related to SL_BODY_TRACKING_MODEL_HUMAN_BODY_FAST | | SL_AI_MODELS_HUMAN_BODY_38_ACCURATE_DETECTION | | Related to SL_BODY_TRACKING_MODEL_HUMAN_BODY_FAST | | SL_AI_MODELS_PERSON_HEAD_DETECTION | | Related to SL_BODY_TRACKING_MODEL_HUMAN_BODY_FAST | | SL_AI_MODELS_PERSON_HEAD_ACCURATE_DETECTION | | Related to SL_OBJECT_DETECTION_MODEL_PERSON_HEAD_BOX_ACCURATE | | SL_AI_MODELS_REID_ASSOCIATION | | Related to SL_BatchParameters::enable | | SL_AI_MODELS_NEURAL_LIGHT_DEPTH | | Related to SL_DEPTH_MODE_NEURAL_LIGHT | | SL_AI_MODELS_NEURAL_DEPTH | | Related to SL_DEPTH_MODE_NEURAL | | SL_AI_MODELS_NEURAL_PLUS_DEPTH | | Related to SL_DEPTH_MODE_NEURAL_PLUS | | SL_AI_MODELS_LAST | | | Lists available AI models. ### enum SL_OBJECT_FILTERING_MODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_OBJECT_FILTERING_MODE_NONE | | The ZED SDK will not apply any preprocessing to the detected objects. | | SL_OBJECT_FILTERING_MODE_NMS_3D | | The ZED SDK will remove objects that are in the same 3D position as an already tracked object (independent of class id). | | SL_OBJECT_FILTERING_MODE_NMS_3D_PER_CLASS | | The ZED SDK will remove objects that are in the same 3D position as an already tracked object of the same class id. | Lists supported bounding box preprocessing. ### enum SL_OBJECT_ACCELERATION_PRESET | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_OBJECT_ACCELERATION_PRESET_DEFAULT | 0| The ZED SDK will automatically determine the appropriate maximum acceleration. | | SL_OBJECT_ACCELERATION_PRESET_LOW | 1| Suitable for objects with relatively low maximum acceleration (e.g., a person walking). | | SL_OBJECT_ACCELERATION_PRESET_MEDIUM | 2| Suitable for objects with moderate maximum acceleration (e.g., a person running). | | SL_OBJECT_ACCELERATION_PRESET_HIGH | 3| Suitable for objects with high maximum acceleration (e.g., a car accelerating, a kicked sports ball). | Lists supported bounding box preprocessing. ### enum SL_INFERENCE_PRECISION | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_INFERENCE_PRECISION_FP32 | 0| | | SL_INFERENCE_PRECISION_FP16 | 1| | | SL_INFERENCE_PRECISION_INT8 | 2| | Report the actual inference precision used. ### enum SL_BODY_FORMAT | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_BODY_FORMAT_BODY_18 | | 18-keypoint model Basic body model | | SL_BODY_FORMAT_BODY_34 | | 34-keypoint model | | SL_BODY_FORMAT_BODY_38 | | 38-keypoint model Including simplified face, hands and feet. | Lists supported skeleton body models. ### enum SL_BODY_KEYPOINTS_SELECTION | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_BODY_KEYPOINTS_SELECTION_FULL | | Full keypoint model. | | SL_BODY_KEYPOINTS_SELECTION_UPPER_BODY | | Upper body keypoint model Will output only upper body (from hip). | Lists supported models for skeleton keypoints selection. ### enum SL_BODY_18_PARTS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_BODY_18_PARTS_NOSE | | 0 | | SL_BODY_18_PARTS_NECK | | 1 | | SL_BODY_18_PARTS_RIGHT_SHOULDER | | 2 | | SL_BODY_18_PARTS_RIGHT_ELBOW | | 3 | | SL_BODY_18_PARTS_RIGHT_WRIST | | 4 | | SL_BODY_18_PARTS_LEFT_SHOULDER | | 5 | | SL_BODY_18_PARTS_LEFT_ELBOW | | 6 | | SL_BODY_18_PARTS_LEFT_WRIST | | 7 | | SL_BODY_18_PARTS_RIGHT_HIP | | 8 | | SL_BODY_18_PARTS_RIGHT_KNEE | | 9 | | SL_BODY_18_PARTS_RIGHT_ANKLE | | 10 | | SL_BODY_18_PARTS_LEFT_HIP | | 11 | | SL_BODY_18_PARTS_LEFT_KNEE | | 12 | | SL_BODY_18_PARTS_LEFT_ANKLE | | 13 | | SL_BODY_18_PARTS_RIGHT_EYE | | 14 | | SL_BODY_18_PARTS_LEFT_EYE | | 15 | | SL_BODY_18_PARTS_RIGHT_EAR | | 16 | | SL_BODY_18_PARTS_LEFT_EAR | | 17 | | SL_BODY_18_PARTS_LAST | | | Semantic of human body parts and order of SL_BodyData::keypoint for SL_BODY_FORMAT_BODY_18. ### enum SL_BODY_34_PARTS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_BODY_34_PARTS_PELVIS | | 0 | | SL_BODY_34_PARTS_NAVAL_SPINE | | 1 | | SL_BODY_34_PARTS_CHEST_SPINE | | 2 | | SL_BODY_34_PARTS_NECK | | 3 | | SL_BODY_34_PARTS_LEFT_CLAVICLE | | 4 | | SL_BODY_34_PARTS_LEFT_SHOULDER | | 5 | | SL_BODY_34_PARTS_LEFT_ELBOW | | 6 | | SL_BODY_34_PARTS_LEFT_WRIST | | 7 | | SL_BODY_34_PARTS_LEFT_HAND | | 8 | | SL_BODY_34_PARTS_LEFT_HANDTIP | | 9 | | SL_BODY_34_PARTS_LEFT_THUMB | | 10 | | SL_BODY_34_PARTS_RIGHT_CLAVICLE | | 11 | | SL_BODY_34_PARTS_RIGHT_SHOULDER | | 12 | | SL_BODY_34_PARTS_RIGHT_ELBOW | | 13 | | SL_BODY_34_PARTS_RIGHT_WRIST | | 14 | | SL_BODY_34_PARTS_RIGHT_HAND | | 15 | | SL_BODY_34_PARTS_RIGHT_HANDTIP | | 16 | | SL_BODY_34_PARTS_RIGHT_THUMB | | 17 | | SL_BODY_34_PARTS_LEFT_HIP | | 18 | | SL_BODY_34_PARTS_LEFT_KNEE | | 19 | | SL_BODY_34_PARTS_LEFT_ANKLE | | 20 | | SL_BODY_34_PARTS_LEFT_FOOT | | 21 | | SL_BODY_34_PARTS_RIGHT_HIP | | 22 | | SL_BODY_34_PARTS_RIGHT_KNEE | | 23 | | SL_BODY_34_PARTS_RIGHT_ANKLE | | 24 | | SL_BODY_34_PARTS_RIGHT_FOOT | | 25 | | SL_BODY_34_PARTS_HEAD | | 26 | | SL_BODY_34_PARTS_NOSE | | 27 | | SL_BODY_34_PARTS_LEFT_EYE | | 28 | | SL_BODY_34_PARTS_LEFT_EAR | | 29 | | SL_BODY_34_PARTS_RIGHT_EYE | | 30 | | SL_BODY_34_PARTS_RIGHT_EAR | | 31 | | SL_BODY_34_PARTS_LEFT_HEEL | | 32 | | SL_BODY_34_PARTS_RIGHT_HEEL | | 33 | | SL_BODY_34_PARTS_LAST | | | Semantic of human body parts and order of SL_BodyData::keypoint for SL_BODY_FORMAT_BODY_34. ### enum SL_BODY_38_PARTS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_BODY_38_PARTS_PELVIS | | 0 | | SL_BODY_38_PARTS_SPINE_1 | | 1 | | SL_BODY_38_PARTS_SPINE_2 | | 2 | | SL_BODY_38_PARTS_SPINE_3 | | 3 | | SL_BODY_38_PARTS_NECK | | 4 | | SL_BODY_38_PARTS_NOSE | | 5 | | SL_BODY_38_PARTS_LEFT_EYE | | 6 | | SL_BODY_38_PARTS_RIGHT_EYE | | 7 | | SL_BODY_38_PARTS_LEFT_EAR | | 8 | | SL_BODY_38_PARTS_RIGHT_EAR | | 9 | | SL_BODY_38_PARTS_LEFT_CLAVICLE | | 10 | | SL_BODY_38_PARTS_RIGHT_CLAVICLE | | 11 | | SL_BODY_38_PARTS_LEFT_SHOULDER | | 12 | | SL_BODY_38_PARTS_RIGHT_SHOULDER | | 13 | | SL_BODY_38_PARTS_LEFT_ELBOW | | 14 | | SL_BODY_38_PARTS_RIGHT_ELBOW | | 15 | | SL_BODY_38_PARTS_LEFT_WRIST | | 16 | | SL_BODY_38_PARTS_RIGHT_WRIST | | 17 | | SL_BODY_38_PARTS_LEFT_HIP | | 18 | | SL_BODY_38_PARTS_RIGHT_HIP | | 19 | | SL_BODY_38_PARTS_LEFT_KNEE | | 20 | | SL_BODY_38_PARTS_RIGHT_KNEE | | 21 | | SL_BODY_38_PARTS_LEFT_ANKLE | | 22 | | SL_BODY_38_PARTS_RIGHT_ANKLE | | 23 | | SL_BODY_38_PARTS_LEFT_BIG_TOE | | 24 | | SL_BODY_38_PARTS_RIGHT_BIG_TOE | | 25 | | SL_BODY_38_PARTS_LEFT_SMALL_TOE | | 26 | | SL_BODY_38_PARTS_RIGHT_SMALL_TOE | | 27 | | SL_BODY_38_PARTS_LEFT_HEEL | | 28 | | SL_BODY_38_PARTS_RIGHT_HEEL | | 29 | | SL_BODY_38_PARTS_LEFT_HAND_THUMB_4 | | 30 | | SL_BODY_38_PARTS_RIGHT_HAND_THUMB_4 | | 31 | | SL_BODY_38_PARTS_LEFT_HAND_INDEX_1 | | 32 | | SL_BODY_38_PARTS_RIGHT_HAND_INDEX_1 | | 33 | | SL_BODY_38_PARTS_LEFT_HAND_MIDDLE_4 | | 34 | | SL_BODY_38_PARTS_RIGHT_HAND_MIDDLE_4 | | 35 | | SL_BODY_38_PARTS_LEFT_HAND_PINKY_1 | | 36 | | SL_BODY_38_PARTS_RIGHT_HAND_PINKY_1 | | 37 | | SL_BODY_38_PARTS_LAST | | | Semantic of human body parts and order of SL_BodyData::keypoint for SL_BODY_FORMAT_BODY_38. ### enum SL_MODULE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_MODULE_ALL | 0| All modules | | SL_MODULE_DEPTH | 1| | | SL_MODULE_POSITIONAL_TRACKING | 2| | | SL_MODULE_OBJECT_DETECTION | 3| | | SL_MODULE_BODY_TRACKING | 4| | | SL_MODULE_SPATIAL_MAPPING | 5| | | SL_MODULE_LAST | 6| | ### enum SL_POSITION_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_POSITION_TYPE_RAW | | The output position will be the raw position data. | | SL_POSITION_TYPE_FUSION | | The output position will be the fused position projected into the requested camera repository. | Lists the types of possible position outputs. ### enum SL_OBJECT_CLASS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_OBJECT_CLASS_PERSON | | For people detection | | SL_OBJECT_CLASS_VEHICLE | | For vehicle detection (cars, trucks, buses, motorcycles, etc.) | | SL_OBJECT_CLASS_BAG | | For bag detection (backpack, handbag, suitcase, etc.) | | SL_OBJECT_CLASS_ANIMAL | | For animal detection (cow, sheep, horse, dog, cat, bird, etc.) | | SL_OBJECT_CLASS_ELECTRONICS | | For electronic device detection (cellphone, laptop, etc.) | | SL_OBJECT_CLASS_FRUIT_VEGETABLE | | For fruit and vegetable detection (banana, apple, orange, carrot, etc.) | | SL_OBJECT_CLASS_SPORT | | For sport-related object detection (sport ball, etc.) | | SL_OBJECT_CLASS_LAST | | | Lists available object classes. ### enum SL_FUSION_ERROR_CODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_FUSION_ERROR_CODE_FUSION_INCONSISTENT_FPS | -5| Significant differences observed between sender's FPS. Fusion quality will be affected. | | SL_FUSION_ERROR_CODE_FUSION_FPS_TOO_LOW | -4| Fusion FPS is too low because at least one sender has an FPS lower than 10 FPS. Fusion quality will be affected. | | SL_FUSION_ERROR_CODE_INVALID_TIMESTAMP | -3| You have attempted to ingest GNSSData into the Fusion system with an invalid timestamp. It is essential to ensure that the timestamp of your GNSSData is set correctly. This issue may arise from a unit error in the ingested timestamp, such as providing the timestamp in microseconds instead of nanoseconds. | | SL_FUSION_ERROR_CODE_INVALID_COVARIANCE | -2| This is a warning message notifying you about an issue encountered while ingesting GNSSData into the Fusion system. The problem lies in the very low covariance value provided. To ensure stability and prevent potential issues, the system will automatically clamp this covariance value. | | SL_FUSION_ERROR_CODE_NO_NEW_DATA_AVAILABLE | -1| All data from all sources has been consumed. No new data is available for processing. | | SL_FUSION_ERROR_CODE_SUCCESS | 0| Standard code indicating successful behavior. | | SL_FUSION_ERROR_CODE_GNSS_DATA_NEED_FIX | 1| This is a warning message indicating an issue with the ingestGNSSData function call. The problem lies in the gnss_status field of the GNSSData parameter, which is currently set to UNKNOWN. To enhance the accuracy of the VPS (Visual Positioning System), it is essential to provide an appropriate value for this field. To rectify this issue, please consider setting the gnss_status field to a valid value that reflects the status of your GNSS sensor. If your GNSS sensor is unable to output a status, it is recommended to set the gnss_status field to sl::GNSS_STATUS::SINGLE. | | SL_FUSION_ERROR_CODE_GNSS_DATA_COVARIANCE_MUST_VARY | 2| It appears that you have made multiple calls to the ingestGNSSData function using the same GNSSData covariance. This warning is intended to prevent users from repeatedly ingesting a fixed or manually crafted covariance. | | SL_FUSION_ERROR_CODE_BODY_FORMAT_MISMATCH | 3| Senders are using different body formats. Please use the same body format. | | SL_FUSION_ERROR_CODE_MODULE_NOT_ENABLED | 4| The following module is not enabled. Please enable it to proceed. | | SL_FUSION_ERROR_CODE_SOURCE_MISMATCH | 5| Some sources are provided by SVO and others by LIVE stream. | | SL_FUSION_ERROR_CODE_CONNECTION_TIMED_OUT | 6| Connection timed out. Unable to reach the sender. Verify the sender's IP address and port. | | SL_FUSION_ERROR_CODE_MEMORY_ALREADY_USED | 7| Intra-process shared memory allocation issue. Multiple connections to the same data. Check memory usage. | | SL_FUSION_ERROR_CODE_INVALID_IP_ADDRESS | 8| The provided IP address format is incorrect. Please provide a valid IP address in the format 'a.b.c.d'. | | SL_FUSION_ERROR_CODE_FAILURE | 9| Standard code indicating unsuccessful behavior. | Lists the types of error that can be raised by the Fusion. ### enum SL_SENDER_ERROR_CODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_SENDER_ERROR_CODE_GRAB_ERROR | -3| | | SL_SENDER_ERROR_CODE_INCONSISTENT_FPS | -2| | | SL_SENDER_ERROR_CODE_FPS_TOO_LOW | -1| The frame rate of the sender is lower than 10 FPS. Check sender's settings and performance. | | SL_SENDER_ERROR_CODE_SUCCESS | 0| | | SL_SENDER_ERROR_CODE_DISCONNECTED | 1| | Lists the types of error that can be raised during the Fusion by senders. ### enum SL_COMM_TYPE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_COMM_TYPE_LOCAL_NETWORK | | The sender and receiver are on the same local network and communicate by RTP. The communication can be affected by the local network load. | | SL_COMM_TYPE_INTRA_PROCESS | | Both sender and receiver are declared by the same process and can be in different threads. This type of communication is optimized. | Lists the different types of communications available for Fusion module. ### enum SL_GNSS_STATUS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_GNSS_STATUS_UNKNOWN | 0| No GNSS fix data is available. | | SL_GNSS_STATUS_SINGLE | 1| Single Point Positioning. | | SL_GNSS_STATUS_DGNSS | 2| Differential GNSS. | | SL_GNSS_STATUS_RTK_FIX | 3| Real Time Kinematic Fixed. | | SL_GNSS_STATUS_PPS | 5| Precise Positioning Service. | | SL_GNSS_STATUS_RTK_FLOAT | 4| Real Time Kinematic Float. | Class representing the fix quality of GNSS signal. ### enum SL_GNSS_MODE | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_GNSS_MODE_UNKNOWN | | No GNSS fix data is available. | | SL_GNSS_MODE_NO_FIX | | No GNSS fix is available. | | SL_GNSS_MODE_FIX_2D | | 2D GNSS fix, providing latitude and longitude coordinates but without altitude information. | | SL_GNSS_MODE_FIX_3D | | 3D GNSS fix, providing latitude, longitude, and altitude coordinates. | ### enum SL_GNSS_FUSION_STATUS | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_GNSS_FUSION_STATUS_OK | 0| The GNSS fusion module is calibrated and working successfully. | | SL_GNSS_FUSION_STATUS_OFF | 1| The GNSS fusion module is not enabled. | | SL_GNSS_FUSION_STATUS_CALIBRATION_IN_PROGRESS | 2| Calibration of the GNSS/VIO fusion module is in progress. | | SL_GNSS_FUSION_STATUS_RECALIBRATION_IN_PROGRESS | 3| Re-alignment of GNSS/VIO data is in progress, leading to potentially inaccurate global position. | Class containing the current GNSS fusion status. ### enum SL_FUSION_REFERENCE_FRAME | Enumerator | Value | Description | | ---------- | ----- | ----------- | | SL_FUSION_REFERENCE_FRAME_WORLD | 0| The world frame is the reference frame of the world according to the fused positional Tracking | | SL_FUSION_REFERENCE_FRAME_BASELINK | 1| The base link frame is the reference frame where camera calibration is given | Enum to define the reference frame of the fusion SDK. ## Attributes Documentation ### variable SL_VIDEO_SETTINGS_VALUE_AUTO ```cpp const int SL_VIDEO_SETTINGS_VALUE_AUTO = -1; ``` ## Macros Documentation ### define MAX_FUSED_CAMERAS ```cpp #define MAX_FUSED_CAMERAS 20 ``` ### define WITH_OBJECT_DETECTION ```cpp #define WITH_OBJECT_DETECTION 1 ``` ### define MAX_CAMERA_PLUGIN ```cpp #define MAX_CAMERA_PLUGIN 4 ``` ### define MAX_SUBMESH ```cpp #define MAX_SUBMESH 1000 ``` ### define MAX_NUMBER_OBJECT ```cpp #define MAX_NUMBER_OBJECT 75 ``` ### define MAX_TRAJECTORY_SIZE ```cpp #define MAX_TRAJECTORY_SIZE 200 ``` --- # SL_CameraParameters Structure containing the intrinsic parameters of a camera. `#include ` ## Public Attributes Documentation ### variable fx ```cpp float fx; ``` Focal length in pixels along x axis. ### variable fy ```cpp float fy; ``` Focal length in pixels along y axis. ### variable cx ```cpp float cx; ``` Optical center along x axis, defined in pixels (usually close to width / 2). ### variable cy ```cpp float cy; ``` Optical center along y axis, defined in pixels (usually close to height / 2). ### variable disto ```cpp double[12] disto; ``` Distortion factor : [k1, k2, p1, p2, k3, k4, k5, k6, s1, s2, s3, s4]. Radial (k1, k2, k3, k4, k5, k6), Tangential (p1,p2) and Prism (s1, s2, s3, s4) distortion. ### variable v_fov ```cpp float v_fov; ``` Vertical field of view, in degrees. ### variable h_fov ```cpp float h_fov; ``` Horizontal field of view, in degrees. ### variable d_fov ```cpp float d_fov; ``` Diagonal field of view, in degrees. ### variable image_size ```cpp struct SL_Resolution image_size; ``` Size in pixels of the images given by the camera. ### variable focal_length_metric ```cpp float focal_length_metric; ``` Real focal length in millimeters. --- # SL_CalibrationParameters Structure containing intrinsic and extrinsic parameters of the camera (translation and rotation). More... `#include ` ## Detailed Description ```cpp struct SL_CalibrationParameters; ``` Structure containing intrinsic and extrinsic parameters of the camera (translation and rotation). **Note**: * The calibration/rectification process, called during sl_open_camera(), is using the raw parameters defined in the SNXXX.conf file, where XXX is the serial number of the camera. * Those values may be adjusted or not by the self-calibration to get a proper image alignment. * After sl_open_camera() is done (with or without self-calibration activated), most of the stereo parameters (except baseline of course) should be 0 or very close to 0. * It means that images after rectification process (given by sl_retrieve_image()) are aligned as if they were taken by a "perfect" stereo camera, defined by the new SL_CalibrationParameters. **Warning**: CalibrationParameters are returned in SL_COORDINATE_SYSTEM_IMAGE, they are not impacted by the SL_InitParameters.coordinate_system. That information about the camera will be returned by sl_get_camera_information(). ## Public Attributes Documentation ### variable left_cam ```cpp struct SL_CameraParameters left_cam; ``` Intrinsic SL_CameraParameters of the left camera. ### variable right_cam ```cpp struct SL_CameraParameters right_cam; ``` Intrinsic SL_CameraParameters of the right camera. ### variable rotation ```cpp struct SL_Vector4 rotation; ``` Left to right camera rotation, expressed in user coordinate system and unit (defined by SL_InitParameters.coordinate_system). ### variable translation ```cpp struct SL_Vector3 translation; ``` Left to right camera translation, expressed in user coordinate system and unit (defined by SL_InitParameters.coordinate_system). --- # SL_SensorsData Structure containing all sensors data (except image sensors) to be used for positional tracking or environment study. More... `#include ` ## Detailed Description ```cpp struct SL_SensorsData; ``` Structure containing all sensors data (except image sensors) to be used for positional tracking or environment study. **Note**: * Some data are not available in SVO and streaming input mode. * They are specified by a note "Not available in SVO or STREAM mode." in the documentation of a specific data. * If nothing is mentioned in the documentation, they are available in all input modes. ## Public Attributes Documentation ### variable imu ```cpp struct SL_IMUData imu; ``` IMU data. ### variable barometer ```cpp struct SL_BarometerData barometer; ``` Barometer data. ### variable magnetometer ```cpp struct SL_MagnetometerData magnetometer; ``` Magnetometer data. ### variable temperature ```cpp struct SL_TemperatureData temperature; ``` Temperature data. ### variable camera_moving_state ```cpp int camera_moving_state; ``` Motion state of the camera. * static: 0 * moving: 1 * falling: 2 ### variable image_sync_trigger ```cpp int image_sync_trigger; ``` Indicates if the Sensors data has been taken during a frame capture on sensor. If the value is 1, the data has been taken during the same time than a frame has been acquired by the left sensor (the time precision is linked to the IMU rate, therefore 800Hz == 1.3ms). If the value is 0, the data has not been taken during a frame acquisition. --- # SL_PositionalTrackingParameters Structure containing a set of parameters for the positional tracking module initialization. More... `#include ` ## Detailed Description ```cpp struct SL_PositionalTrackingParameters; ``` Structure containing a set of parameters for the positional tracking module initialization. **Note**: Parameters can be user adjusted. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable initial_world_rotation ```cpp struct SL_Quaternion initial_world_rotation; ``` Rotation of the camera in the world frame when the camera is started. Default: Identity quaternion ### variable initial_world_position ```cpp struct SL_Vector3 initial_world_position; ``` Position of the camera in the world frame when the camera is started. Default: Null vector ### variable enable_area_memory ```cpp bool enable_area_memory; ``` Whether the camera can remember its surroundings. **Warning**: * This mode requires more resources to run, but greatly improves tracking accuracy. * We recommend leaving it on by default. This helps correct positional tracking drift and can be helpful for positioning different cameras relative to one other in space. Default: true ### variable enable_pose_smoothing ```cpp bool enable_pose_smoothing; ``` Whether to enable smooth pose correction for small drift correction. Default: false ### variable set_floor_as_origin ```cpp bool set_floor_as_origin; ``` Initializes the tracking to be aligned with the floor plane to better position the camera in space. **Note**: * This launches floor plane detection in the background until a suitable floor plane is found. * The tracking will start in SL_POSITIONAL_TRACKING_STATE_SEARCHING state. **Warning**: * This features does not work with SL_MODEL_ZED since it needs an IMU to classify the floor. * The camera needs to look at the floor during initialization for optimum results. Default: false ### variable set_as_static ```cpp bool set_as_static; ``` Whether to define the camera as static. If true, it will not move in the environment. This allows you to set its position using initial_world_position and initial_world_rotation. All ZED SDK functionalities requiring positional tracking will be enabled without additional computation. sl_get_position() will return the values set as initial_world_position and initial_world_rotation. Default: false ### variable enable_imu_fusion ```cpp bool enable_imu_fusion; ``` Whether to enable the IMU fusion. **Note**: * This setting has no impact on the tracking of a camera. * SL_MODEL_ZED does not have an IMU. When set to false, only the optical odometry will be used. Default: true ### variable depth_min_range ```cpp float depth_min_range; ``` Whether to enable the IMU fusion. **Note**: * This setting has no impact on the tracking of a camera * SL_MODEL_ZED does not have an IMU. When set to false, only the optical odometry will be used. Default: true ### variable set_gravity_as_origin ```cpp bool set_gravity_as_origin; ``` Whether to override 2 of the 3 components from initial_world_rotation using the IMU gravity. **Note**: This parameter does nothing on sl.ZED.MODEL since it does not have an IMU. Default: true ### variable mode ```cpp enum SL_POSITIONAL_TRACKING_MODE mode; ``` Positional tracking mode used. Can be used to improve accuracy in some types of scene at the cost of longer runtime. Default: SL_POSITIONAL_TRACKING_MODE_GEN_3 ### variable enable_localization_only ```cpp bool enable_localization_only; ``` Whether to enable the area mode in localize only mode. ### variable enable_2d_ground_mode ```cpp bool enable_2d_ground_mode; ``` Whether to enable the 2D ground mode. --- # SL_RecordingParameters Structure containing the options used to record. `#include ` ## Public Attributes Documentation ### variable video_filename ```cpp unsigned char[256] video_filename; ``` Filename of the file to save the recording into. ### variable compression_mode ```cpp enum SL_SVO_COMPRESSION_MODE compression_mode; ``` Compression mode the recording. Default: SL_SVO_COMPRESSION_MODE_H264 ### variable bitrate ```cpp unsigned int bitrate; ``` Overrides the default bitrate of the SVO file, in kbits/s. **Note**: * Only works if compression_mode is H264 or H265. * Available range: 0 or [1000 - 60000] Default: 0 (the default values associated with the resolution) ### variable target_framerate ```cpp unsigned int target_framerate; ``` Framerate for the recording file. **Warning**: * This framerate must be below or equal to the camera framerate and camera framerate must be a multiple of the target framerate. * It means that it must respect ` ## Detailed Description ```cpp struct SL_StreamingParameters; ``` Structure containing the options used to stream with the ZED SDK. **Note**: Parameters can be adjusted by the user. ## Public Attributes Documentation ### variable codec ```cpp enum SL_STREAMING_CODEC codec; ``` Encoding used for streaming. ### variable port ```cpp unsigned short port; ``` Port used for streaming. **Warning**: * Port must be an even number. Any odd number will be rejected. * Port must be opened. ### variable bitrate ```cpp unsigned int bitrate; ``` Defines the streaming bitrate in Kbits/s. **Note**: Available range: [1000 - 60000] | SL_STREAMING_CODEC | SL_RESOLUTION | FPS | bitrate (kbps) | | -------- | -------- | -------- | -------- | | SL_STREAMING_CODEC_H264 | SL_RESOLUTION_HD2K | 15 | 8500 | | SL_STREAMING_CODEC_H264 | SL_RESOLUTION_HD1080 | 30 | 12500 | | SL_STREAMING_CODEC_H264 | SL_RESOLUTION_HD720 | 60 | 7000 | | SL_STREAMING_CODEC_H265 | SL_RESOLUTION_HD2K | 15 | 7000 | | SL_STREAMING_CODEC_H265 | SL_RESOLUTION_HD1080 | 30 | 11000 | | SL_STREAMING_CODEC_H265 | SL_RESOLUTION_HD720 | 60 | 6000 | Default: 0 (it will be set to the best value depending on your resolution/FPS) ### variable gop_size ```cpp int gop_size; ``` GOP size in number of frames. **Note**: * The GOP size determines the maximum distance between IDR/I-frames. Very high GOP size will result in slightly more efficient compression, especially on static scenes. But latency will increase. * Maximum value: 256 Default: -1 (the GOP size will last at maximum 2 seconds, depending on camera FPS) ### variable adaptative_bitrate ```cpp bool adaptative_bitrate; ``` Defines whether the adaptive bitrate is enable. **Note**: * Bitrate will be adjusted depending the number of packet dropped during streaming. * If activated, the bitrate can vary between [bitrate/4, bitrate]. **Warning**: Currently, the adaptive bitrate only works when "sending" device is a NVIDIA Jetson (X1, X2, Xavier, Nano). Default: false ### variable chunk_size ```cpp unsigned short chunk_size; ``` Size of a single chunk. **Note**: * Stream buffers are divided into X number of chunks where each chunk is chunk_size bytes long. * You can lower chunk_size value if network generates a lot of packet lost: this will generates more chunk for a single image, but each chunk sent will be lighter to avoid inside-chunk corruption. * Increasing this value can decrease latency. * Available range: [1024 - 65000] Default: 16084 ### variable target_framerate ```cpp unsigned int target_framerate; ``` Framerate for the streaming output. **Warning**: * This framerate must be below or equal to the camera framerate. * Allowed framerates are 15, 30, 60 or 100 if possible. * Any other values will be discarded and camera FPS will be taken. Default: 0 (camera framerate will be taken) --- # SL_ObjectDetectionParameters Structure containing a set of parameters for the object detection module. More... `#include ` ## Detailed Description ```cpp struct SL_ObjectDetectionParameters; ``` Structure containing a set of parameters for the object detection module. **Note**: Parameters can be user adjusted. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable instance_module_id ```cpp unsigned int instance_module_id; ``` Id of the module instance. This is used to identify which object detection module instance is used. ### variable enable_tracking ```cpp bool enable_tracking; ``` Whether the object detection system includes object tracking capabilities across a sequence of images. Default: true ### variable enable_segmentation ```cpp bool enable_segmentation; ``` Whether the object masks will be computed. Default: false ### variable detection_model ```cpp enum SL_OBJECT_DETECTION_MODEL detection_model; ``` SL_OBJECT_DETECTION_MODEL to use. Default: SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_FAST ### variable fused_objects_group_name ```cpp char * fused_objects_group_name; ``` In a multi camera setup, specify which group this model belongs to. **Note**: This parameter is not used when not using a multi-camera setup and must be set in a multi camera setup. In a multi camera setup, multiple cameras can be used to detect objects and multiple detector having similar output layout can see the same object. Therefore, Fusion will fuse together the outputs received by multiple detectors only if they are part of the same fused_objects_group_name. ### variable custom_onnx_file ```cpp char * custom_onnx_file; ``` Path to the YOLO-like onnx file for custom object detection ran in the ZED SDK. **Note**: This parameter is useless when detection_model is not OBJECT_DETECTION_MODEL::CUSTOM_YOLOLIKE_BOX_OBJECTS. **Attention**: * - The model must be a YOLO-like model. * - The caching uses the `custom_onnx_file` string along with your GPU specs to decide whether to use the cached optmized model or to optimize the passed onnx model. If you want to use a different model (i.e. an onnx with different weights), you must use a different `custom_onnx_file` string or delete the cached optimized model in /resources. When `detection_model` is OBJECT_DETECTION_MODEL::CUSTOM_YOLOLIKE_BOX_OBJECTS, a onnx model must be passed so that the ZED SDK can optimize it for your GPU and run inference on it. The resulting optimized model will be saved for re-use in the future. ### variable custom_onnx_dynamic_input_shape ```cpp struct SL_Resolution custom_onnx_dynamic_input_shape; ``` Resolution to the YOLO-like onnx file for custom object detection ran in the ZED SDK. This resolution defines the input tensor size for dynamic shape ONNX model only. The batch and channel dimensions are automatically handled, it assumes it's color images like default YOLO models. **Note**: This parameter is only used when detection_model is OBJECT_DETECTION_MODEL::CUSTOM_YOLOLIKE_BOX_OBJECTS and the provided ONNX file is using dynamic shapes. **Attention**: - Multiple model only support squared images \default Squared images 512x512 (input tensor will be 1x3x512x512) ### variable max_range ```cpp float max_range; ``` Upper depth range for detections. **Note**: The value cannot be greater than SL_InitParameters.depth_maximum_distance and its unit is defined in SL_InitParameters.coordinate_unit. Default: -1.f (value set in SL_InitParameters.depth_maximum_distance) ### variable batch_parameters ```cpp struct SL_BatchParameters batch_parameters; ``` Batching system parameters. Batching system (introduced in 3.5) performs short-term re-identification with deep-learning and trajectories filtering. SL_BatchParameters.enable must to be true to use this feature (by default disabled). ### variable filtering_mode ```cpp enum SL_OBJECT_FILTERING_MODE filtering_mode; ``` Filtering mode that should be applied to raw detections. **Note**: * This parameter is only used in detection model SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_XXX and SL_OBJECT_DETECTION_MODEL_CUSTOM_BOX_OBJECTS. * For custom object, it is recommended to use SL_OBJECT_FILTERING_MODE_NMS_3D_PER_CLASS or SL_OBJECT_FILTERING_MODE_NONE. * In this case, you might need to add your own NMS filter before ingesting the boxes into the object detection module. Default: SL_OBJECT_FILTERING_MODE_NMS_3D (same behavior as previous ZED SDK version) ### variable prediction_timeout_s ```cpp 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. **Note**: * During this time, the object will have SL_OBJECT_TRACKING_STATE_OK state even if it is not detected. * The duration is expressed in seconds. **Warning**: * prediction_timeout_s will be clamped to 1 second as the prediction is getting worse with time. * Setting this parameter to 0 disables the ZED SDK predictions. It prevents the jittering of the object state when there is a short misdetection. The user can define their own prediction time duration. Default: 0.2f ### variable allow_reduced_precision_inference ```cpp bool allow_reduced_precision_inference; ``` Whether to allow inference to run at a lower precision to improve runtime and memory usage. **Note**: * The fp16 is automatically enabled if the GPU is compatible and provides a speed up of almost x2 and reduce memory usage by almost half, no precision loss. * This setting allow int8 precision which can speed up by another x2 factor (compared to fp16, or x4 compared to fp32) and half the fp16 memory usage, however some accuracy could be lost. * The accuracy loss should not exceed 1-2% on the compatible models. * The current compatible models are all SL_AI_MODELS_HUMAN_BODY_XXXX. It might increase the initial optimization time and could include downloading calibration data or calibration cache and slightly reduce the accuracy. --- # SL_BodyTrackingParameters Structure containing a set of parameters for the body tracking module. More... `#include ` ## Detailed Description ```cpp struct SL_BodyTrackingParameters; ``` Structure containing a set of parameters for the body tracking module. **Note**: Parameters can be user adjusted. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable instance_module_id ```cpp unsigned int instance_module_id; ``` Id of the module instance. This is used to identify which body tracking module instance is used. ### variable enable_tracking ```cpp bool enable_tracking; ``` Whether the body tracking system includes body/person tracking capabilities across a sequence of images. Default: true ### variable enable_segmentation ```cpp bool enable_segmentation; ``` Whether the body/person masks will be computed. Default: false ### variable detection_model ```cpp enum SL_BODY_TRACKING_MODEL detection_model; ``` SL_BODY_TRACKING_MODEL to use. Default: SL_BODY_TRACKING_MODEL_HUMAN_BODY_ACCURATE ### variable enable_body_fitting ```cpp bool enable_body_fitting; ``` Whether to apply the body fitting. Default: false ### variable body_format ```cpp enum SL_BODY_FORMAT body_format; ``` Body format to be outputted by the ZED SDK with sl_retrieve_bodies(). Default: SL_BODY_FORMAT_BODY_18 ### variable body_selection ```cpp enum SL_BODY_KEYPOINTS_SELECTION body_selection; ``` Selection of keypoints to be outputted by the ZED SDK with sl_retrieve_bodies(). Default: SL_BODY_KEYPOINTS_SELECTION_FULL ### variable max_range ```cpp float max_range; ``` Upper depth range for detections. **Note**: The value cannot be greater than SL_InitParameters.depth_maximum_distance and its unit is defined in SL_InitParameters.coordinate_unit. Default: -1.f (value set in SL_InitParameters.depth_maximum_distance) ### variable prediction_timeout_s ```cpp 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. **Note**: * During this time, the object will have SL_OBJECT_TRACKING_STATE_OK state even if it is not detected. * The duration is expressed in seconds. **Warning**: * prediction_timeout_s will be clamped to 1 second as the prediction is getting worse with time. * Setting this parameter to 0 disables the ZED SDK predictions. It prevents the jittering of the object state when there is a short misdetection. The user can define their own prediction time duration. Default: 0.2f ### variable allow_reduced_precision_inference ```cpp bool allow_reduced_precision_inference; ``` Whether to allow inference to run at a lower precision to improve runtime and memory usage. **Note**: * The fp16 is automatically enabled if the GPU is compatible and provides a speed up of almost x2 and reduce memory usage by almost half, no precision loss. * This setting allow int8 precision which can speed up by another x2 factor (compared to fp16, or x4 compared to fp32) and half the fp16 memory usage, however some accuracy could be lost. * The accuracy loss should not exceed 1-2% on the compatible models. * The current compatible models are all SL_AI_MODELS_HUMAN_BODY_XXXX. It might increase the initial optimization time and could include downloading calibration data or calibration cache and slightly reduce the accuracy. --- # SL_AI_Model_status Structure containing AI model status. `#include ` ## Public Attributes Documentation ### variable downloaded ```cpp bool downloaded; ``` The model file is currently present on the host. ### variable optimized ```cpp bool optimized; ``` An engine file with the expected architecture is found. --- # SL_BarometerData Structure containing data from the barometer sensor. `#include ` ## Public Attributes Documentation ### variable is_available ```cpp bool is_available; ``` Whether the barometer sensor is available in your camera. ### variable timestamp_ns ```cpp uint64_t timestamp_ns; ``` Data acquisition timestamp in nanoseconds. ### variable pressure ```cpp float pressure; ``` Ambient air pressure in hectopascal (hPa). ### variable relative_altitude ```cpp float relative_altitude; ``` Relative altitude from first camera position (at sl_open_camera() time). --- # SL_BatchParameters Structure containing a set of parameters for batch object detection. More... `#include ` ## Detailed Description ```cpp struct SL_BatchParameters; ``` Structure containing a set of parameters for batch object detection. **Note**: Parameters can be user adjusted. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable enable ```cpp bool enable; ``` Whether to enable the batch option in the object detection module. **Note**: To activate this option, enable must be set to true. Batch queueing system provides: * deep-learning based re-identification * trajectory smoothing and filtering Default: false ### variable id_retention_time ```cpp float id_retention_time; ``` Max retention time in seconds of a detected object. After this time, the same object will mostly have a different id. ### variable latency ```cpp float latency; ``` Trajectories will be output in batch with the desired latency in seconds. **Note**: * Specifying a short latency will limit the search (falling in timeout) for previously seen object ids but will be closer to real time output. * Specifying a long latency will reduce the change of timeout in re-identification but increase difference with live output. During this waiting time, re-identification of objects is done in the background. --- # SL_Bodies Structure containing the results of the body tracking module. More... `#include ` ## Detailed Description ```cpp struct SL_Bodies; ``` Structure containing the results of the body tracking module. The detected bodies/persons are listed in body_list. ## Public Attributes Documentation ### variable nb_bodies ```cpp int nb_bodies; ``` Number of detected bodies/persons. **Note**: You can use it to iterate through the body_list array. ### variable timestamp ```cpp uint64_t timestamp; ``` Timestamp corresponding to the frame acquisition. This value is especially useful for the async mode to synchronize the data. ### variable is_new ```cpp int is_new; ``` Whether body_list has already been retrieved or not. ### variable is_tracked ```cpp int is_tracked; ``` Whether both the body tracking and the world orientation has been setup. ### variable inference_precision_mode ```cpp enum SL_INFERENCE_PRECISION inference_precision_mode; ``` Status of the actual inference precision mode used to detect the bodies/persons. **Note**: It depends on the GPU hardware support, the sl::BodyTrackingParameters.allow_reduced_precision_inference input parameter and the model support. ### variable body_format ```cpp enum SL_BODY_FORMAT body_format; ``` Body format used in sl::BodyTrackingParameters.body_format parameter. ### variable body_list ```cpp struct SL_BodyData[MAX_NUMBER_OBJECT] body_list; ``` Array of bodies/persons. **Note**: * Since the data is transmitted from C++ to C, the size of the structure must be constant. * Therefore, there is a limitation of 75 objects in the image. --- # SL_BodyData Structure containing data of a detected body/person such as its bounding_box, id and its 3D position. `#include ` ## Public Attributes Documentation ### variable id ```cpp int id; ``` Body/person identification number. **Note**: * Only available if SL_BodyTrackingParameters.enable_tracking is activated. * Otherwise, it will be set to -1. It is used as a reference when tracking the body through the frames. ### variable unique_object_id ```cpp unsigned char[37] unique_object_id; ``` Unique id to help identify and track AI detections. It can be either generated externally, or by using sl_generate_unique_id() or left empty. ### variable tracking_state ```cpp enum SL_OBJECT_TRACKING_STATE tracking_state; ``` Body/person tracking state. ### variable action_state ```cpp enum SL_OBJECT_ACTION_STATE action_state; ``` Body/person action state. ### variable position ```cpp struct SL_Vector3 position; ``` Body/person 3D centroid. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ### variable velocity ```cpp struct SL_Vector3 velocity; ``` Body/person 3D velocity. **Note**: It is defined in `SL_InitParameters.coordinate_unit / s` and expressed in SL_RuntimeParameters.reference_frame. ### variable position_covariance ```cpp float[6] position_covariance; ``` Covariance matrix of the 3D position. **Note**: It is represented by its upper triangular matrix value ```cpp = [p0, p1, p2] [p1, p3, p4] [p2, p4, p5] ``` where pi is `position_covariance[i]` ### variable confidence ```cpp float confidence; ``` Detection confidence value of the body/person. From 0 to 100, a low value means the body might not be localized perfectly. ### variable mask ```cpp int * mask; ``` Mask defining which pixels which belong to the body/person (in bounding_box_2d and set to 255) and those of the background (set to 0). **Warning**: * The mask information is only available for tracked bodies (SL_OBJECT_TRACKING_STATE_OK) that have a valid depth. * Otherwise, the mask will not be initialized. ### variable bounding_box_2d ```cpp struct SL_Vector2[4] bounding_box_2d; ``` 2D bounding box of the body/person represented as four 2D points starting at the top left corner and rotation clockwise. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. ```cpp A ------ B | Object | D ------ C ``` ### variable head_position ```cpp struct SL_Vector3 head_position; ``` 3D centroid of the head of the body/person. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ### variable dimensions ```cpp struct SL_Vector3 dimensions; ``` 3D body/person dimensions: width, height, length. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ### variable bounding_box ```cpp struct SL_Vector3[8] bounding_box; ``` 3D bounding box of the body/person represented as eight 3D points. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ```cpp 1 ------ 2 / /| 0 ------ 3 | | Object | 6 | |/ 4 ------ 7 ``` ### variable head_bounding_box ```cpp struct SL_Vector3[8] head_bounding_box; ``` 3D bounding box of the head of the body/person represented as eight 3D points. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ### variable head_bounding_box_2d ```cpp struct SL_Vector2[4] head_bounding_box_2d; ``` 2D bounding box of the head of the body/person represented as four 2D points starting at the top left corner and rotation clockwise. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. ### variable keypoint_2d ```cpp struct SL_Vector2[38] keypoint_2d; ``` Set of useful points representing the human body in 2D. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. **Warning**: In some cases, eg. body partially out of the image, some keypoints can not be detected. They will have negatives coordinates. ### variable keypoint ```cpp struct SL_Vector3[38] keypoint; ``` Set of useful points representing the human body in 3D. **Note**: They are defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. **Warning**: In some cases, eg. body partially out of the image or missing depth data, some keypoints can not be detected. They will have non finite values. ### variable keypoint_confidence ```cpp float[38] keypoint_confidence; ``` Array of detection confidences for each keypoint. **Note**: They can not be lower than the SL_BodyTrackingRuntimeParameters.detection_confidence_threshold. **Warning**: In some cases, eg. body partially out of the image or missing depth data, some keypoints can not be detected. They will have non finite values. ### variable keypoint_covariances ```cpp float[38][6] keypoint_covariances; ``` Array of detection covariance for each keypoint. **Warning**: In some cases, eg. body partially out of the image or missing depth data, some keypoints can not be detected. Their covariances will be 0. ### variable local_position_per_joint ```cpp struct SL_Vector3[38] local_position_per_joint; ``` Array of local position (position of the child keypoint with respect to its parent expressed in its parent coordinate frame) for each keypoint. **Note**: They are expressed in SL_REFERENCE_FRAME_CAMERA or SL_REFERENCE_FRAME_WORLD. **Warning**: Not available with SL_BODY_FORMAT_BODY_18. ### variable local_orientation_per_joint ```cpp struct SL_Quaternion[38] local_orientation_per_joint; ``` Array of local orientation for each keypoint. **Note**: The orientation is represented by a SL_Quaternion (`SL_Quaternion q = SL_Quaternion(qx, qy, qz, qw);`) **Warning**: Not available with SL_BODY_FORMAT_BODY_18. ### variable global_root_orientation ```cpp struct SL_Quaternion global_root_orientation; ``` Global root orientation of the skeleton. **Note**: The global root position is already accessible in keypoint attribute by using the root index of a given SL_BODY_FORMAT. **Warning**: Not available with SL_BODY_FORMAT_BODY_18. The orientation is also represented by a quaternion with the same format as local_orientation_per_joint. --- # SL_BodyTrackingFusionParameters Holds the options used to initialize the body tracking module of the Fusion. `#include ` ## Public Attributes Documentation ### variable enable_tracking ```cpp bool enable_tracking; ``` Defines if the object detection will track objects across images flow. Default: true ### variable enable_body_fitting ```cpp bool enable_body_fitting; ``` Defines if the body fitting will be applied. **Note**: If you enable it and the camera provides data as BODY_18 the fused body format will be BODY_34. Default: false --- # SL_BodyTrackingFusionRuntimeParameters Holds the options used to change the behavior of the body tracking module at runtime. `#include ` ## Public Attributes Documentation ### variable skeleton_minimum_allowed_keypoints ```cpp int skeleton_minimum_allowed_keypoints; ``` If the fused skeleton has less than skeleton_minimum_allowed_keypoints keypoints, it will be discarded. Default: -1. ### variable skeleton_minimum_allowed_camera ```cpp int skeleton_minimum_allowed_camera; ``` If a skeleton was detected in less than skeleton_minimum_allowed_camera cameras, it will be discarded. Default: -1. ### variable skeleton_smoothing ```cpp float skeleton_smoothing; ``` This value controls the smoothing of the tracked or fitted fused skeleton. It is ranged from 0 (low smoothing) and 1 (high smoothing). Default: 0. --- # SL_BodyTrackingRuntimeParameters Structure containing a set of runtime parameters for the body tracking module. More... `#include ` ## Detailed Description ```cpp struct SL_BodyTrackingRuntimeParameters; ``` Structure containing a set of runtime parameters for the body tracking module. **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable detection_confidence_threshold ```cpp float detection_confidence_threshold; ``` Confidence threshold. **Note**: If the scene contains a lot of objects, increasing the confidence can slightly speed up the process, since every object instance is tracked. From 1 to 100, with 1 meaning a low threshold, more uncertain objects and 99 very few but very precise objects. Default: 20.f ### variable minimum_keypoints_threshold ```cpp int minimum_keypoints_threshold; ``` Minimum threshold for the keypoints. **Note**: It is useful, for example, to remove unstable fitting results when a skeleton is partially occluded. The ZED SDK will only output the keypoints of the skeletons with threshold greater than this value. Default: 0 ### variable skeleton_smoothing ```cpp float skeleton_smoothing; ``` Control of the smoothing of the fitted fused skeleton. It is ranged from 0 (low smoothing) and 1 (high smoothing). Default: 0 --- # SL_CameraConfiguration Structure containing information about the camera sensor. More... `#include ` ## Detailed Description ```cpp struct SL_CameraConfiguration; ``` Structure containing information about the camera sensor. **Note**: This object is meant to be used as a read-only container, editing any of its field won't impact the ZED SDK. **Warning**: SL_CalibrationParameters are returned in SL_COORDINATE_SYSTEM_IMAGE, they are not impacted by the SL_InitParameters::coordinate_system. ## Public Attributes Documentation ### variable calibration_parameters ```cpp struct SL_CalibrationParameters calibration_parameters; ``` Intrinsics and extrinsic stereo parameters for rectified/undistorted images. ### variable calibration_parameters_raw ```cpp struct SL_CalibrationParameters calibration_parameters_raw; ``` Intrinsics and extrinsic stereo parameters for unrectified/distorted images. ### variable firmware_version ```cpp unsigned int firmware_version; ``` Internal firmware version of the camera. ### variable fps ```cpp float fps; ``` FPS of the camera. ### variable resolution ```cpp struct SL_Resolution resolution; ``` Resolution of the camera. --- # SL_CameraIdentifier Used to identify a specific camera in the Fusion API. `#include ` ## Public Attributes Documentation ### variable sn ```cpp uint64_t sn; ``` --- # SL_CameraInformation Structure containing information of a single camera (serial number, model, input type, etc.) More... `#include ` ## Detailed Description ```cpp struct SL_CameraInformation; ``` Structure containing information of a single camera (serial number, model, input type, etc.) **Note**: This object is meant to be used as a read-only container, editing any of its field won't impact the SDK. That information about the camera will be returned by sl_get_camera_information(). ## Public Attributes Documentation ### variable serial_number ```cpp unsigned int serial_number; ``` Serial number of the camera. ### variable camera_model ```cpp enum SL_MODEL camera_model; ``` Model of the camera (see SL_MODEL). ### variable input_type ```cpp enum SL_INPUT_TYPE input_type; ``` Input type used in the ZED SDK. ### variable camera_configuration ```cpp struct SL_CameraConfiguration camera_configuration; ``` Camera configuration parameters stored in a SL_CameraConfiguration. ### variable sensors_configuration ```cpp struct SL_SensorsConfiguration sensors_configuration; ``` Sensors configuration parameters stored in a SL_SensorsConfiguration. --- # SL_CameraMetrics Holds the metrics of a sender in the fusion process. `#include ` ## Public Attributes Documentation ### variable uuid ```cpp struct SL_CameraIdentifier uuid; ``` ### variable received_fps ```cpp float received_fps; ``` FPS of the received data. ### variable received_latency ```cpp float received_latency; ``` Latency (in seconds) of the received data. Timestamp difference between the time when the data are sent and the time they are received (mostly introduced when using the local network workflow). ### variable synced_latency ```cpp float synced_latency; ``` Latency (in seconds) after Fusion synchronization. Difference between the timestamp of the data received and the timestamp at the end of the Fusion synchronization. ### variable is_present ```cpp bool is_present; ``` Is set to false if no data in this batch of metrics. ### variable ratio_detection ```cpp float ratio_detection; ``` Skeleton detection percent during the last second. Number of frames with at least one detection / number of frames, over the last second. A low value means few detections occured lately for this sender. ### variable delta_ts ```cpp float delta_ts; ``` Average data acquisition timestamp difference. Average standard deviation of sender's period since the start. --- # SL_CommunicationParameters ## Public Attributes Documentation ### variable communication_type ```cpp enum SL_COMM_TYPE communication_type; ``` ### variable ip_port ```cpp unsigned int ip_port; ``` ### variable ip_add ```cpp char[128] ip_add; ``` --- # SL_CustomBoxObjectData Structure that store externally detected objects. More... `#include ` ## Detailed Description ```cpp struct SL_CustomBoxObjectData; ``` Structure that store externally detected objects. The objects can be ingested with sl_ingest_custom_box_objects() to extract 3D and tracking information over time. ## Public Attributes Documentation ### variable unique_object_id ```cpp char[37] unique_object_id; ``` Unique id to help identify and track AI detections. It can be either generated externally, or by using sl_generate_unique_id() or left empty. ### variable bounding_box_2d ```cpp struct SL_Vector2[4] bounding_box_2d; ``` 2D bounding box of the object represented as four 2D points starting at the top left corner and rotation clockwise. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. ```cpp A ------ B | Object | D ------ C ``` ### variable label ```cpp int label; ``` Object label. **Note**: It should define an object class. This means that any similar object (in classification) should share the same label number. This information is passed-through and can be used to improve object tracking. ### variable probability ```cpp float probability; ``` Detection confidence value of the object. **Note**: * The value should be in `[0-1]`. * It can be used to improve the object tracking. ### variable is_grounded ```cpp bool is_grounded; ``` Provide hypothesis about the object movements (degrees of freedom or DoF) to improve the object tracking. **Note**: * This parameter cannot be changed for a given object tracking id. * It is advised to set it by labels to avoid issues. * true: 2 DoF projected alongside the floor plane. Case for object standing on the ground such as person, vehicle, etc. The projection implies that the objects cannot be superposed on multiple horizontal levels. * false: 6 DoF (full 3D movements are allowed). ### variable is_static ```cpp bool is_static; ``` Provide hypothesis about the object staticity to improve the object tracking. * true: the object will be assumed to never move nor being moved. * false: the object will be assumed to be able to move or being moved. ### variable tracking_timeout ```cpp float tracking_timeout; ``` Maximum tracking time threshold (in seconds) before dropping the tracked object when unseen for this amount of time. By default, let the tracker decide internally based on the internal sub class of the tracked object. ### variable tracking_max_dist ```cpp float tracking_max_dist; ``` Maximum tracking distance threshold (in meters) before dropping the tracked object when unseen for this amount of meters. By default, do not discard tracked object based on distance. Only valid for static object. ### variable max_box_width_meters ```cpp float max_box_width_meters; ``` Maximum allowed 3D width. Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable min_box_width_meters ```cpp float min_box_width_meters; ``` Minimum allowed 3D width. Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable max_box_height_meters ```cpp float max_box_height_meters; ``` Maximum allowed 3D height. Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable min_box_height_meters ```cpp float min_box_height_meters; ``` Minimum allowed 3D height. Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable max_allowed_acceleration ```cpp float max_allowed_acceleration; ``` Manually override the acceleration preset. If set, this value takes precedence over the selected preset, allowing for a custom maximum acceleration. Takes precedence over the runtime parameter, if also set. Unit is m/s^2. Defaults: NaN. ### variable velocity_smoothing_factor ```cpp float velocity_smoothing_factor; ``` Control the smoothing of the velocity estimation. Values between 0.0 and 1.0. * High value (closer to 1.0): Very smooth, but may lag behind rapid changes. * Low value (closer to 0.0): Very responsive to velocity changes, but may be jittery. * 0.5: ZED SDK base tuning. Balanced smoothing and responsiveness. A negative value (e.g. -1) lets the ZED SDK interpret the velocity_smoothing_factor. Default: -1 ### variable min_velocity_threshold ```cpp float min_velocity_threshold; ``` Threshold to force an object's velocity to zero. If the calculated speed (m/s) is below this threshold, the object is considered static. This helps eliminate drift on stationary objects. A negative value (e.g. -1) lets the ZED SDK interpret the min_velocity_threshold. Default: -1. ### variable prediction_timeout_s ```cpp float prediction_timeout_s; ``` Duration to keep predicting a track's position after occlusion. When an object is no longer visible (occluded or out of frame), the tracker will predict its position for this duration before deleting the track. * Short (e.g., 0.2s): Prevents "ghost" objects but may break tracks during short occlusions. * Long (e.g., 2.0s): Maintains ID during long occlusions but may report objects that are gone. A negative value (e.g. -1) lets the ZED SDK interpret the prediction_timeout_s. Default: -1 ### variable min_confirmation_time_s ```cpp float min_confirmation_time_s; ``` Minimum confirmation time required to validate a track. The minimum duration (in seconds) an object must be continuously detected before it is reported as a valid track. Helps filter out spurious false positives that appear only briefly. A negative value (e.g. -1) lets the ZED SDK interpret the min_confirmation_time_s. Default: -1. --- # SL_CustomMaskObjectData ## Public Attributes Documentation ### variable unique_object_id ```cpp char[37] unique_object_id; ``` Unique id to help identify and track AI detections. It can be either generated externally, or by using sl_generate_unique_id() or left empty. ### variable bounding_box_2d ```cpp struct SL_Vector2[4] bounding_box_2d; ``` 2D bounding box of the object represented as four 2D points starting at the top left corner and rotation clockwise. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. ```cpp A ------ B | Object | D ------ C ``` ### variable label ```cpp int label; ``` Object label. **Note**: It should define an object class. This means that any similar object (in classification) should share the same label number. This information is passed-through and can be used to improve object tracking. ### variable probability ```cpp float probability; ``` Detection confidence value of the object. **Note**: * The value should be in `[0-1]`. * It can be used to improve the object tracking. ### variable is_grounded ```cpp bool is_grounded; ``` Provide hypothesis about the object movements (degrees of freedom or DoF) to improve the object tracking. **Note**: * This parameter cannot be changed for a given object tracking id. * It is advised to set it by labels to avoid issues. * true: 2 DoF projected alongside the floor plane. Case for object standing on the ground such as person, vehicle, etc. The projection implies that the objects cannot be superposed on multiple horizontal levels. * false: 6 DoF (full 3D movements are allowed). ### variable is_static ```cpp bool is_static; ``` Provide hypothesis about the object staticity to improve the object tracking. * true: the object will be assumed to never move nor being moved. * false: the object will be assumed to be able to move or being moved. ### variable tracking_timeout ```cpp float tracking_timeout; ``` Maximum tracking time threshold (in seconds) before dropping the tracked object when unseen for this amount of time. By default, let the tracker decide internally based on the internal sub class of the tracked object. ### variable tracking_max_dist ```cpp float tracking_max_dist; ``` Maximum tracking distance threshold (in meters) before dropping the tracked object when unseen for this amount of meters. By default, do not discard tracked object based on distance. Only valid for static object. ### variable box_mask ```cpp unsigned char * box_mask; ``` 2D mask of the object inside its bounding box. ### variable max_box_width_meters ```cpp float max_box_width_meters; ``` Maximum allowed 3D width. Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable min_box_width_meters ```cpp float min_box_width_meters; ``` Minimum allowed 3D width. Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable max_box_height_meters ```cpp float max_box_height_meters; ``` Maximum allowed 3D height. Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable min_box_height_meters ```cpp float min_box_height_meters; ``` Minimum allowed 3D height. Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable max_allowed_acceleration ```cpp float max_allowed_acceleration; ``` Manually override the acceleration preset. If set, this value takes precedence over the selected preset, allowing for a custom maximum acceleration. Takes precedence over the runtime parameter, if also set. Unit is m/s^2. Default: NaN. ### variable velocity_smoothing_factor ```cpp float velocity_smoothing_factor; ``` Control the smoothing of the velocity estimation. Values between 0.0 and 1.0. * High value (closer to 1.0): Very smooth, but may lag behind rapid changes. * Low value (closer to 0.0): Very responsive to velocity changes, but may be jittery. * 0.5: ZED SDK base tuning. Balanced smoothing and responsiveness. A negative value (e.g. -1) lets the ZED SDK interpret the velocity_smoothing_factor. Default: -1 ### variable min_velocity_threshold ```cpp float min_velocity_threshold; ``` Threshold to force an object's velocity to zero. If the calculated speed (m/s) is below this threshold, the object is considered static. This helps eliminate drift on stationary objects. A negative value (e.g. -1) lets the ZED SDK interpret the min_velocity_threshold. Default: -1. ### variable prediction_timeout_s ```cpp float prediction_timeout_s; ``` Duration to keep predicting a track's position after occlusion. When an object is no longer visible (occluded or out of frame), the tracker will predict its position for this duration before deleting the track. * Short (e.g., 0.2s): Prevents "ghost" objects but may break tracks during short occlusions. * Long (e.g., 2.0s): Maintains ID during long occlusions but may report objects that are gone. A negative value (e.g. -1) lets the ZED SDK interpret the prediction_timeout_s. Default: -1 ### variable min_confirmation_time_s ```cpp float min_confirmation_time_s; ``` Minimum confirmation time required to validate a track. The minimum duration (in seconds) an object must be continuously detected before it is reported as a valid track. Helps filter out spurious false positives that appear only briefly. A negative value (e.g. -1) lets the ZED SDK interpret the min_confirmation_time_s. Default: -1. --- # SL_CustomObjectDetectionProperties Structure containing a set of runtime properties of a certain class ID for the object detection module using a custom model. More... `#include ` ## Detailed Description ```cpp struct SL_CustomObjectDetectionProperties; ``` Structure containing a set of runtime properties of a certain class ID for the object detection module using a custom model. **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable class_id ```cpp int class_id; ``` Index of the class represented by this set of properties. ### variable enabled ```cpp bool enabled; ``` Whether the object object is kept or not. ### variable detection_confidence_threshold ```cpp float detection_confidence_threshold; ``` Confidence threshold. **Note**: If the scene contains a lot of objects, increasing the confidence can slightly speed up the process, since every object instance is tracked. From 1 to 100, with 1 meaning a low threshold, more uncertain objects and 99 very few but very precise objects. Default: 20.f ### variable is_grounded ```cpp bool is_grounded; ``` Provide hypothesis about the object movements (degrees of freedom or DoF) to improve the object tracking. **Note**: * This parameter cannot be changed for a given object tracking id. * It is advised to set it by labels to avoid issues. * true: 2 DoF projected alongside the floor plane. Case for object standing on the ground such as person, vehicle, etc. The projection implies that the objects cannot be superposed on multiple horizontal levels. * false: 6 DoF (full 3D movements are allowed). ### variable is_static ```cpp bool is_static; ``` Provide hypothesis about the object staticity to improve the object tracking. * true: the object will be assumed to never move nor being moved. * false: the object will be assumed to be able to move or being moved. ### variable tracking_timeout ```cpp float tracking_timeout; ``` Maximum tracking time threshold (in seconds) before dropping the tracked object when unseen for this amount of time. By default, let the tracker decide internally based on the internal sub class of the tracked object. ### variable tracking_max_dist ```cpp float tracking_max_dist; ``` Maximum tracking distance threshold (in meters) before dropping the tracked object when unseen for this amount of meters. By default, do not discard tracked object based on distance. Only valid for static object. ### variable max_box_width_normalized ```cpp float max_box_width_normalized; ``` Maximum allowed width normalized to the image size. Any prediction bigger than that will be filtered out. Default: -1 (no filtering) ### variable min_box_width_normalized ```cpp float min_box_width_normalized; ``` Minimum allowed width normalized to the image size. Any prediction smaller than that will be filtered out. Default: -1 (no filtering) ### variable max_box_height_normalized ```cpp float max_box_height_normalized; ``` Maximum allowed height normalized to the image size. Any prediction bigger than that will be filtered out. Default: -1 (no filtering) ### variable min_box_height_normalized ```cpp float min_box_height_normalized; ``` Minimum allowed height normalized to the image size. Any prediction smaller than that will be filtered out. Default: -1 (no filtering) ### variable max_box_width_meters ```cpp float max_box_width_meters; ``` Maximum allowed 3D width. Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable min_box_width_meters ```cpp float min_box_width_meters; ``` Minimum allowed 3D width. Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable max_box_height_meters ```cpp float max_box_height_meters; ``` Maximum allowed 3D height. Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable min_box_height_meters ```cpp float min_box_height_meters; ``` Minimum allowed 3D height. Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped. Default: -1 (no filtering) ### variable native_mapped_class ```cpp enum SL_OBJECT_SUBCLASS native_mapped_class; ``` For increased accuracy, the native sl::OBJECT_SUBCLASS mapping, if any. Native objects have refined internal parameters for better 3D projection and tracking accuracy. If one of the custom objects can be mapped to one the native sl::OBJECT_SUBCLASS, this can help to boost the tracking accuracy. Default: no mapping ### variable object_acceleration_preset ```cpp enum SL_OBJECT_ACCELERATION_PRESET object_acceleration_preset; ``` Preset defining the expected maximum acceleration of the tracked object. Determines how the ZED SDK interprets object acceleration, affecting tracking behavior and predictions. ### variable max_allowed_acceleration ```cpp float max_allowed_acceleration; ``` Manually override the acceleration preset. If set, this value takes precedence over the selected preset, allowing for a custom maximum acceleration. Unit is m/s^2. Defaults: NaN ### variable object_tracking_parameters ```cpp struct SL_ObjectTrackingParameters object_tracking_parameters; ``` Object tracking parameters for this class. --- # SL_CustomObjectDetectionRuntimeParameters Structure containing a set of runtime parameters for the object detection module using your own model ran by the SDK. More... `#include ` ## Detailed Description ```cpp struct SL_CustomObjectDetectionRuntimeParameters; ``` Structure containing a set of runtime parameters for the object detection module using your own model ran by the SDK. **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable object_detection_properties ```cpp struct SL_CustomObjectDetectionProperties object_detection_properties; ``` Global object detection properties. ### variable object_class_detection_properties ```cpp struct SL_CustomObjectDetectionProperties * object_class_detection_properties; ``` Per class object detection properties. **Note**: object_detection_properties is used as a fallback when SL_CustomObjectDetectionRuntimeParameters.object_class_detection_properties is partially set. ### variable number_custom_detection_properties ```cpp unsigned int number_custom_detection_properties; ``` Size of the object_class_detection_properties array. --- # SL_DeviceProperties Structure containing information about the properties of a camera. More... `#include ` ## Detailed Description ```cpp struct SL_DeviceProperties; ``` Structure containing information about the properties of a camera. **Note**: A camera_modelSL_MODEL_ZED_M with an id '-1' can be due to an inverted USB-C cable. ## Public Attributes Documentation ### variable camera_state ```cpp enum SL_CAMERA_STATE camera_state; ``` State of the camera. Default: SL_CAMERA_STATE_NOT_AVAILABLE ### variable id ```cpp int id; ``` Id of the camera. Default: -1 ### variable path ```cpp char[512] path; ``` System path of the camera. ### variable video_device ```cpp char[512] video_device; ``` System path of the camera. ### variable i2c_port ```cpp int i2c_port; ``` i2c port of the camera. ### variable camera_model ```cpp enum SL_MODEL camera_model; ``` Model of the camera. ### variable sn ```cpp unsigned int sn; ``` Serial number of the camera. **Warning**: Not provided for Windows. Default: 0 ### variable gmsl_port ```cpp int gmsl_port; ``` GMSL port of the camera. ### variable identifier ```cpp unsigned char[3] identifier; ``` [Cam model, eeprom version, white balance param] ### variable camera_badge ```cpp char[128] camera_badge; ``` badge name (zedx_ar0234) ### variable camera_sensor_model ```cpp char[128] camera_sensor_model; ``` Name of sensor (zedx) ### variable camera_name ```cpp char[128] camera_name; ``` Name of Camera in DT (ZED_CAM1) ### variable input_type ```cpp enum SL_INPUT_TYPE input_type; ``` Input type of the camera. ### variable sensor_address_left ```cpp unsigned char sensor_address_left; ``` sensor_address when available (ZED-X HDR/XOne HDR only) ### variable sensor_address_right ```cpp unsigned char sensor_address_right; ``` --- # SL_ECEF Represents a world position in ECEF format. `#include ` ## Public Attributes Documentation ### variable x ```cpp double x; ``` x coordinate of SL_ECEF. ### variable y ```cpp double y; ``` y coordinate of SL_ECEF. ### variable z ```cpp double z; ``` z coordinate of SL_ECEF. --- # SL_ENU Represents a world position in ENU format. `#include ` ## Public Attributes Documentation ### variable east ```cpp double east; ``` East coordinate. ### variable north ```cpp double north; ``` North coordinate. ### variable up ```cpp double up; ``` Up coordinate. --- # SL_FusedPositionalTrackingStatus Class containing the overall position fusion status. `#include ` ## Public Attributes Documentation ### variable odometry_status ```cpp enum SL_ODOMETRY_STATUS odometry_status; ``` Represents the current state of Visual-Inertial Odometry (VIO) tracking between the previous frame and the current frame. ### variable spatial_memory_status ```cpp enum SL_SPATIAL_MEMORY_STATUS spatial_memory_status; ``` Represents the current state of camera tracking in the global map. ### variable gnss_status ```cpp enum SL_GNSS_STATUS gnss_status; ``` Represents the current state of GNSS. ### variable gnss_mode ```cpp enum SL_GNSS_MODE gnss_mode; ``` Represents the current mode of GNSS. ### variable gnss_fusion_status ```cpp enum SL_GNSS_FUSION_STATUS gnss_fusion_status; ``` Represents the current state of GNSS fusion for global localization. ### variable tracking_fusion_status ```cpp enum SL_POSITIONAL_TRACKING_FUSION_STATUS tracking_fusion_status; ``` Represents the current state of positional tracking fusion. --- # SL_FusionConfiguration Useful struct to store the Fusion configuration, can be read from /write to a JSON file. `#include ` ## Public Attributes Documentation ### variable serial_number ```cpp int serial_number; ``` The serial number of the used ZED camera. ### variable comm_param ```cpp struct SL_CommunicationParameters comm_param; ``` The communication parameters to connect this camera to the Fusion. ### variable position ```cpp struct SL_Vector3 position; ``` The WORLD SL_Vector3 of the camera for Fusion. ### variable rotation ```cpp struct SL_Quaternion rotation; ``` The WORLD SL_Quaternion of the camera for Fusion. ### variable input_type ```cpp struct SL_InputType input_type; ``` The input type for the current camera. ### variable override_gravity ```cpp bool override_gravity; ``` Indicates the behavior of the fusion with respect to given calibration pose. If true : The calibration pose directly specifies the camera's absolute pose relative to a global reference frame. If false : The calibration pose (Pose_rel) is defined relative to the camera's IMU rotational pose. To determine the true absolute position, the Fusion process will compute Pose_abs = Pose_rel * Rot_IMU_camera. --- # SL_FusionMetrics Holds the metrics of the fusion process. `#include ` ## Public Attributes Documentation ### variable mean_camera_fused ```cpp float mean_camera_fused; ``` Mean number of camera that provides data during the past second. ### variable mean_stdev_between_camera ```cpp float mean_stdev_between_camera; ``` Standard deviation of the data timestamp fused, the lower the better. ### variable camera_individual_stats ```cpp struct SL_CameraMetrics[MAX_FUSED_CAMERAS] camera_individual_stats; ``` Sender metrics. --- # SL_GNSSCalibrationParameters Holds the options used for calibrating GNSS / VIO. `#include ` ## Public Attributes Documentation ### variable target_yaw_uncertainty ```cpp float target_yaw_uncertainty; ``` This parameter defines the target yaw uncertainty at which the calibration process between GNSS and VIO concludes. The unit of this parameter is in radian. Default: 0.1 radians ### variable enable_translation_uncertainty_target ```cpp bool enable_translation_uncertainty_target; ``` When this parameter is enabled (set to true), the calibration process between GNSS and VIO accounts for the uncertainty in the determined translation, thereby facilitating the calibration termination. The maximum allowable uncertainty is controlled by the 'target_translation_uncertainty' parameter. Default: false ### variable target_translation_uncertainty ```cpp float target_translation_uncertainty; ``` This parameter defines the target translation uncertainty at which the calibration process between GNSS and VIO concludes. Default: 10e-2 (10 centimeters) ### variable enable_reinitialization ```cpp bool enable_reinitialization; ``` This parameter determines whether reinitialization should be performed between GNSS and VIO fusion when a significant disparity is detected between GNSS data and the current fusion data. It becomes particularly crucial during prolonged GNSS signal loss scenarios. Default: true ### variable gnss_vio_reinit_threshold ```cpp float gnss_vio_reinit_threshold; ``` This parameter determines the threshold for GNSS/VIO reinitialization. If the fused position deviates beyond out of the region defined by the product of the GNSS covariance and the gnss_vio_reinit_threshold, a reinitialization will be triggered. Default: 5 ### variable enable_rolling_calibration ```cpp bool enable_rolling_calibration; ``` If this parameter is set to true, the fusion algorithm will used a rough VIO / GNSS calibration at first and then refine it. This allow you to quickly get a fused position. Default: true ### variable gnss_antenna_position ```cpp struct SL_Vector3 gnss_antenna_position; ``` \ brief Define a transform between the GNSS antenna and the camera system for the VIO / GNSS calibration. Default value is [0,0,0], this position can be refined by the calibration if enabled --- # SL_GNSSData Structure containing GNSS data to be used for positional tracking as prior. `#include ` ## Public Attributes Documentation ### variable longitude ```cpp double longitude; ``` Longitude in radian. ### variable latitude ```cpp double latitude; ``` Latitude in radian. ### variable altitude ```cpp double altitude; ``` Altitude in meters. ### variable ts ```cpp uint64_t ts; ``` Timestamp of the GNSS position in nanoseconds (must be aligned with the camera time reference). ### variable position_covariance ```cpp double[9] position_covariance; ``` Covariance of the position in meter (must be expressed in the ENU coordinate system). For eph, epv GNSS sensors, set it as follow: `{eph*eph, 0, 0, 0, eph*eph, 0, 0, 0, epv*epv}`. ### variable longitude_std ```cpp double longitude_std; ``` Longitude standard deviation. ### variable latitude_std ```cpp double latitude_std; ``` Latitude standard deviation. ### variable altitude_std ```cpp double altitude_std; ``` Altitude standard deviation. ### variable gnss_status ```cpp enum SL_GNSS_STATUS gnss_status; ``` GNSS status of the data. ### variable gnss_mode ```cpp enum SL_GNSS_MODE gnss_mode; ``` GNSS mode of the data. --- # SL_GeoPose Holds Geo reference position. `#include ` ## Public Attributes Documentation ### variable translation ```cpp struct SL_Vector3 translation; ``` The translation defining the pose in ENU. ### variable rotation ```cpp struct SL_Quaternion rotation; ``` The rotation defining the pose in ENU. ### variable pose_covariance ```cpp float[36] pose_covariance; ``` The pose covariance in ENU. ### variable horizontal_accuracy ```cpp double horizontal_accuracy; ``` The horizontal accuracy. ### variable vertical_accuracy ```cpp double vertical_accuracy; ``` The vertical accuracy. ### variable latlng_coordinates ```cpp struct SL_LatLng latlng_coordinates; ``` The latitude, longitude, altitude. ### variable heading ```cpp double heading; ``` The heading (orientation) of the pose in radians. It indicates the direction in which the object or observer is facing, with 0 degrees corresponding to North and increasing in a counter-clockwise direction. ### variable timestamp ```cpp uint64_t timestamp; ``` The timestamp of SL_GeoPose. --- # SL_HealthStatus ## Public Attributes Documentation ### variable enabled ```cpp bool enabled; ``` Indicates if the Health check is enabled. ### variable low_image_quality ```cpp bool low_image_quality; ``` This status indicates poor image quality It can indicates camera issue, like incorrect manual video settings, damaged hardware, corrupted video stream from the camera, dirt or other partial or total occlusion, stuck ISP (black/white/green/purple images, incorrect exposure, etc), blurry images It also includes widely different left and right images which leads to unavailable depth information In case of very low light this will be reported by this status and the dedicated HealthStatus::low_lighting. **Note**: : Frame tearing is currently not detected. Advanced blur detection requires heavier processing and is enabled only when setting Initparameters::enable_image_validity_check to 3 and above ### variable low_lighting ```cpp bool low_lighting; ``` This status indicates low light scene. As the camera are passive sensors working in the visible range, they requires some external light to operate. This status warns if the lighting condition become suboptimal and worst. This is based on the scene illuminance in LUX for the ZED X cameras series (available with VIDEO_SETTINGS::SCENE_ILLUMINANCE) For other camera models or when using SVO files, this is based on computer vision processing from the image characteristics. ### variable low_depth_reliability ```cpp bool low_depth_reliability; ``` This status indicates low depth map reliability If the image are unreliable or if the scene condition are very challenging this status report a warning. This is using the depth confidence and general depth distribution. Typically due to obstructed eye (included very close object, strong occlusions) or degraded condition like heavy fog/water on the optics. ### variable low_motion_sensors_reliability ```cpp bool low_motion_sensors_reliability; ``` This status indicates motion sensors data reliability issue. This indicates the IMU is providing low quality data. Possible underlying can be regarding the data stream like corrupted data, timestamp inconsistency, resonance frequencies, saturated sensors / very high acceleration or rotation, shocks. --- # SL_IMUData Structure containing data from the IMU sensor. `#include ` ## Public Attributes Documentation ### variable is_available ```cpp bool is_available; ``` Whether the IMU sensor is available in your camera. ### variable timestamp_ns ```cpp uint64_t timestamp_ns; ``` Data acquisition timestamp in nanoseconds. ### variable angular_velocity ```cpp struct SL_Vector3 angular_velocity; ``` Gets the angular velocity vector of the gyroscope in deg/s. **Note**: * The value can be directly ingested in an IMU fusion algorithm to extract a quaternion. * Not available in SVO or STREAM mode. The value is corrected from bias, scale and misalignment. ### variable linear_acceleration ```cpp struct SL_Vector3 linear_acceleration; ``` Linear acceleration vector (3x1) of the gyroscope in m/s². **Note**: * The value can be directly ingested in an IMU fusion algorithm to extract a quaternion. * Not available in SVO or STREAM mode. The value is corrected from bias, scale and misalignment. ### variable angular_velocity_unc ```cpp struct SL_Vector3 angular_velocity_unc; ``` Angular velocity vector of the gyroscope in deg/s (uncorrected from the IMU calibration). **Note**: * The value is the exact raw values from the IMU. * Not available in SVO or STREAM mode. ### variable linear_acceleration_unc ```cpp struct SL_Vector3 linear_acceleration_unc; ``` Linear acceleration vector of the gyroscope in m/s² (uncorrected from the IMU calibration). **Note**: * The value is the exact raw values from the IMU. * Not available in SVO or STREAM mode. ### variable orientation ```cpp struct SL_Quaternion orientation; ``` Orientation from the IMU sensor. ### variable orientation_covariance ```cpp struct SL_Matrix3f orientation_covariance; ``` Covariance matrix of the orientation from the IMU sensor (orientation). ### variable angular_velocity_convariance ```cpp struct SL_Matrix3f angular_velocity_convariance; ``` Covariance matrix of the angular velocity of the gyroscope in deg/s (angular_velocity). **Note**: Not available in SVO or STREAM mode. ### variable linear_acceleration_convariance ```cpp struct SL_Matrix3f linear_acceleration_convariance; ``` Covariance matrix of the linear acceleration of the gyroscope in m/s² (linear_acceleration). **Note**: Not available in SVO or STREAM mode. --- # SL_InitFusionParameters Holds the options used to initialize the Fusion object. `#include ` ## Public Attributes Documentation ### variable coordinate_units ```cpp enum SL_UNIT coordinate_units; ``` This parameter allows you to select the unit to be used for all metric values of the SDK (depth, point cloud, tracking, mesh, and others). Default : SL_UNIT_MILLIMETER ### variable coordinate_system ```cpp enum SL_COORDINATE_SYSTEM coordinate_system; ``` Positional tracking, point clouds and many other features require a given SL_COORDINATE_SYSTEM to be used as reference. This parameter allows you to select the COORDINATE_SYSTEM used by the SL_Camera to return its measures. This defines the order and the direction of the axis of the coordinate system. Default : SL_COORDINATE_SYSTEM_IMAGE ### variable output_performance_metrics ```cpp bool output_performance_metrics; ``` It allows users to extract some stats of the Fusion API like drop frame of each camera, latency, etc... ### variable verbose ```cpp bool verbose; ``` Enable the verbosity mode of the SDK. ### variable timeout_period_number ```cpp unsigned timeout_period_number; ``` If specified change the number of period necessary for a source to go in timeout without data. For example, if you set this to 5 then, if any source do not receive data during 5 period, these sources will go to timeout and will be ignored. **Note**: This parameter is deprecated. Use `data_source_timeout` present in `synchronization_parameters` instead. ### variable sdk_gpu_id ```cpp int sdk_gpu_id; ``` NVIDIA graphics card id to use. **Note**: A non-positive value will search for all CUDA capable devices and select the most powerful. By default the SDK will use the most powerful NVIDIA graphics card found. However, when running several applications, or using several cameras at the same time, splitting the load over available GPUs can be useful. This parameter allows you to select the GPU used by the sl::Camera using an ID from 0 to n-1 GPUs in your PC. Default: -1 ### variable sdk_cuda_ctx ```cpp CUcontext sdk_cuda_ctx; ``` CUcontext to be used. **Note**: * When creating you own CUDA context, you have to define the device you will use. Do not forget to also specify it on sdk_gpu_id. * **On Jetson**, you have to set the flag CU_CTX_SCHED_YIELD, during CUDA context creation. * You can also let the SDK create its own context, and use sl::Camera::getCUDAContext() to use it. If your application uses another CUDA-capable library, giving its CUDA context to the ZED SDK can be useful when sharing GPU memories. This parameter allows you to set the CUDA context to be used by the ZED SDK. Leaving this parameter empty asks the SDK to create its own context. Default: (empty) ### variable synchronization_parameters ```cpp struct SL_SynchronizationParameter synchronization_parameters; ``` Specifies the parameters used for data synchronization during fusion. The SynchronizationParameter struct encapsulates the synchronization parameters that control the data fusion process. ### variable maximum_working_resolution ```cpp struct SL_Resolution maximum_working_resolution; ``` Sets the maximum resolution for all Fusion outputs, such as images and measures. The default value is (-1, -1), which allows the Fusion to automatically select the optimal resolution for the best quality/runtime ratio. * For images, the output resolution can be up to the native resolution of the camera. * For measures involving depth, the output resolution can be up to the maximum working resolution. Setting this parameter to (-1, -1) will ensure the best balance between quality and performance for depth measures. --- # SL_InputType Structure defining the input type used in the ZED SDK. More... `#include ` ## Detailed Description ```cpp struct SL_InputType; ``` Structure defining the input type used in the ZED SDK. It can be used to select a specific camera with an id or serial number, or from a SVO file. ## Public Attributes Documentation ### variable input_type ```cpp enum SL_INPUT_TYPE input_type; ``` Current input type. ### variable serial_number ```cpp unsigned int serial_number; ``` Serial number of the camera. ### variable id ```cpp unsigned int id; ``` Id of the camera. ### variable svo_input_filename ```cpp char[256] svo_input_filename; ``` Path to the SVO file. ### variable stream_input_ip ```cpp char[128] stream_input_ip; ``` IP address of the streaming camera. ### variable stream_input_port ```cpp unsigned short stream_input_port; ``` Port of the streaming camera. --- # SL_Landmark Represents a 3d landmark. `#include ` ## Public Attributes Documentation ### variable id ```cpp uint64_t id; ``` Unique identifier for the landmark. ### variable position ```cpp struct SL_Vector3 position; ``` World position of the landmark. --- # SL_Landmark2D Represents a 2d landmark. `#include ` ## Public Attributes Documentation ### variable id ```cpp uint64_t id; ``` Unique identifier for the landmark. ### variable image_position ```cpp struct SL_Uint2 image_position; ``` Projection of the landmark in the image. ### variable dynamic_confidence ```cpp float dynamic_confidence; ``` Confidence score indicating the likelihood that the landmark is associated with a dynamic object. The value ranges from 0 to 1, where a smaller value indicates greater confidence that the landmark is owned by a dynamic object. The value is -1 if the dynamic confidence is not computed. --- # SL_LatLng Represents a world position in LatLng format. `#include ` ## Public Attributes Documentation ### variable latitude ```cpp double latitude; ``` Latitude coordinate in radian. ### variable longitude ```cpp double longitude; ``` Longitude coordinate in radian. ### variable altitude ```cpp double altitude; ``` Altitude coordinate in meters. --- # SL_MagnetometerData Structure containing data from the magnetometer sensor. `#include ` ## Public Attributes Documentation ### variable is_available ```cpp bool is_available; ``` Whether the magnetometer sensor is available in your camera. ### variable timestamp_ns ```cpp uint64_t timestamp_ns; ``` Data acquisition timestamp in nanoseconds. ### variable magnetic_field_c ```cpp struct SL_Vector3 magnetic_field_c; ``` Magnetic field local vector in microtesla (μT). **Note**: To calibrate the magnetometer sensor, please use **ZED****Sensor****Viewer** tool after placing the camera in the final operating environment. ### variable magnetic_field_unc ```cpp struct SL_Vector3 magnetic_field_unc; ``` Uncalibrated magnetic field local vector in microtesla (μT). **Note**: * The magnetometer raw values are affected by soft and hard iron interferences. * The sensor must be calibrated by placing the camera in the working environment and using **ZED****Sensor****Viewer** tool. * Not available in SVO or STREAM mode. ### variable magnetic_heading ```cpp float magnetic_heading; ``` Camera heading in degrees relative to the magnetic North Pole. **Note**: * The magnetic North Pole has an offset with respect to the geographic North Pole, depending on the geographic position of the camera. * To get a correct magnetic heading, the magnetometer sensor must be calibrated using **ZED****Sensor****Viewer** tool. ### variable magnetic_heading_state ```cpp enum SL_HEADING_STATE magnetic_heading_state; ``` State of magnetic_heading. ### variable magnetic_heading_accuracy ```cpp float magnetic_heading_accuracy; ``` Accuracy of magnetic_heading measure in the range [0.0, 1.0]. **Note**: A negative value means that the magnetometer must be calibrated using **ZED****Sensor****Viewer** tool. ### variable effective_rate ```cpp float effective_rate; ``` Realtime data acquisition rate in hertz (Hz). --- # SL_Matrix3f Structure representing a generic 3*3 matrix. `#include ` ## Public Attributes Documentation ### variable p ```cpp float[9] p; ``` Array containing the values fo the 3*3 matrix. --- # SL_Matrix4f Structure representing a generic 4*4 matrix. `#include ` ## Public Attributes Documentation ### variable p ```cpp float[16] p; ``` Array containing the values fo the 4*4 matrix. --- # SL_ObjectData Structure containing data of a detected object such as its bounding_box, label, id and its 3D position. `#include ` ## Public Attributes Documentation ### variable id ```cpp int id; ``` Object identification number. **Note**: * Only available if SL_ObjectDetectionParameters.enable_tracking is activated. * Otherwise, it will be set to -1. It is used as a reference when tracking the object through the frames. ### variable unique_object_id ```cpp unsigned char[37] unique_object_id; ``` Unique id to help identify and track AI detections. It can be either generated externally, or by using sl_generate_unique_id() or left empty. ### variable raw_label ```cpp int raw_label; ``` Object raw label. It is forwarded from SL_CustomBoxObjectData when using SL_OBJECT_DETECTION_MODEL_CUSTOM_BOX_OBJECTS. ### variable label ```cpp enum SL_OBJECT_CLASS label; ``` Object class/category to identify the object type. ### variable sublabel ```cpp enum SL_OBJECT_SUBCLASS sublabel; ``` Object sub-class/sub-category to identify the object type. ### variable tracking_state ```cpp enum SL_OBJECT_TRACKING_STATE tracking_state; ``` Object tracking state. ### variable action_state ```cpp enum SL_OBJECT_ACTION_STATE action_state; ``` Object action state. ### variable position ```cpp struct SL_Vector3 position; ``` Object 3D centroid. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ### variable confidence ```cpp float confidence; ``` Detection confidence value of the object. From 0 to 100, a low value means the object might not be localized perfectly or the label (SL_OBJECT_CLASS) is uncertain. ### variable mask ```cpp int * mask; ``` Mask defining which pixels which belong to the object (in bounding_box_2d and set to 255) and those of the background (set to 0). **Warning**: * The mask information is only available for tracked objects (SL_OBJECT_TRACKING_STATE_OK) that have a valid depth. * Otherwise, the mask will not be initialized. ### variable bounding_box_2d ```cpp struct SL_Vector2[4] bounding_box_2d; ``` 2D bounding box of the object represented as four 2D points starting at the top left corner and rotation clockwise. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. ```cpp A ------ B | Object | D ------ C ``` ### variable head_position ```cpp struct SL_Vector3 head_position; ``` 3D centroid of the head of the object (a person). **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. **Warning**: Not available with SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_XXX. ### variable velocity ```cpp struct SL_Vector3 velocity; ``` Defines the object 3D velocity. **Note**: It is defined in `SL_InitParameters.coordinate_unit / s` and expressed in SL_RuntimeParameters.reference_frame. ### variable dimensions ```cpp struct SL_Vector3 dimensions; ``` 3D object dimensions: width, height, length. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ### variable bounding_box ```cpp struct SL_Vector3[8] bounding_box; ``` 3D bounding box of the object represented as eight 3D points. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ```cpp 1 ------ 2 / /| 0 ------ 3 | | Object | 6 | |/ 4 ------ 7 ``` ### variable head_bounding_box ```cpp struct SL_Vector3[8] head_bounding_box; ``` 3D bounding box of the head of the object (a person) represented as eight 3D points. **Note**: It is defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. **Warning**: Not available with SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_XXX. ### variable head_bounding_box_2d ```cpp struct SL_Vector2[4] head_bounding_box_2d; ``` 2D bounding box of the head of the object (a person) represented as four 2D points starting at the top left corner and rotation clockwise. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. **Warning**: Not available with SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_XXX. ### variable position_covariance ```cpp float[6] position_covariance; ``` Covariance matrix of the 3D position. **Note**: It is represented by its upper triangular matrix value ```cpp = [p0, p1, p2] [p1, p3, p4] [p2, p4, p5] ``` where pi is `position_covariance[i]` --- # SL_ObjectDetectionRuntimeParameters Structure containing a set of runtime parameters for the object detection module. More... `#include ` ## Detailed Description ```cpp struct SL_ObjectDetectionRuntimeParameters; ``` Structure containing a set of runtime parameters for the object detection module. **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable detection_confidence_threshold ```cpp float detection_confidence_threshold; ``` Confidence threshold. **Note**: * If the scene contains a lot of objects, increasing the confidence can slightly speed up the process, since every object instance is tracked. * detection_confidence_threshold is used as a fallback when SL_ObjectDetectionRuntimeParameters.object_confidence_threshold is partially set From 1 to 100, with 1 meaning a low threshold, more uncertain objects and 99 very few but very precise objects. Default: 20.f ### variable object_class_filter ```cpp int[(int) SL_OBJECT_CLASS_LAST] object_class_filter; ``` Defines which object types to detect and track. **Note**: * Fewer object types can slightly speed up the process since every object is tracked. * Will output only the selected classes. ### variable object_confidence_threshold ```cpp int[(int) SL_OBJECT_CLASS_LAST] object_confidence_threshold; ``` Array of confidence thresholds for each class (can be empty for some classes). **Note**: SL_ObjectDetectionRuntimeParameters.detection_confidence_threshold will be taken as fallback/default value. ### variable object_tracking_parameters ```cpp struct SL_ObjectTrackingParameters object_tracking_parameters; ``` Default tracking parameters applied to all object classes. **Note**: These parameters are used as fallback when object_class_tracking_parameters is not set for a specific class. ### variable object_class_tracking_parameters ```cpp struct SL_ObjectTrackingParameters[(int) SL_OBJECT_CLASS_LAST] object_class_tracking_parameters; ``` Per-class tracking parameters array. Allows setting different tracking parameters for each object class. **Note**: Use object_tracking_parameters as fallback for classes not explicitly set. --- # SL_ObjectTrackingParameters Structure containing a set of parameters for the object tracking module. More... `#include ` ## Detailed Description ```cpp struct SL_ObjectTrackingParameters; ``` Structure containing a set of parameters for the object tracking module. **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable object_acceleration_preset ```cpp enum SL_OBJECT_ACCELERATION_PRESET object_acceleration_preset; ``` Preset defining the expected maximum acceleration of the tracked object. Determines how the ZED SDK interprets object acceleration, affecting tracking behavior and predictions. ### variable velocity_smoothing_factor ```cpp float velocity_smoothing_factor; ``` Control the smoothing of the velocity estimation. Values between 0.0 and 1.0. * High value (closer to 1.0): Very smooth, but may lag behind rapid changes. * Low value (closer to 0.0): Very responsive to velocity changes, but may be jittery. * 0.5: ZED SDK base tuning. Balanced smoothing and responsiveness. A negative value (e.g. -1) lets the ZED SDK interpret the velocity_smoothing_factor. Default: -1 ### variable min_velocity_threshold ```cpp float min_velocity_threshold; ``` Threshold to force an object's velocity to zero. If the calculated speed (m/s) is below this threshold, the object is considered static. This helps eliminate drift on stationary objects. A negative value (e.g. -1) lets the ZED SDK interpret the min_velocity_threshold. Default: -1. ### variable prediction_timeout_s ```cpp float prediction_timeout_s; ``` Duration to keep predicting a track's position after occlusion. When an object is no longer visible (occluded or out of frame), the tracker will predict its position for this duration before deleting the track. * Short (e.g., 0.2s): Prevents "ghost" objects but may break tracks during short occlusions. * Long (e.g., 2.0s): Maintains ID during long occlusions but may report objects that are gone. A negative value (e.g. -1) lets the ZED SDK interpret the prediction_timeout_s. Default: -1 ### variable min_confirmation_time_s ```cpp float min_confirmation_time_s; ``` Minimum confirmation time required to validate a track. The minimum duration (in seconds) an object must be continuously detected before it is reported as a valid track. Helps filter out spurious false positives that appear only briefly. A negative value (e.g. -1) lets the ZED SDK interpret the min_confirmation_time_s. Default: -1. --- # SL_Objects Structure containing the results of the object detection module. More... `#include ` ## Detailed Description ```cpp struct SL_Objects; ``` Structure containing the results of the object detection module. **Note**: * Since the data is transmitted from C++ to C, the size of the structure must be constant. * Therefore, there is a limitation of 75 objects in the image. The detected objects are listed in object_list. ## Public Attributes Documentation ### variable nb_objects ```cpp int nb_objects; ``` Number of detected objects. **Note**: You can use it to iterate through the object_list array. ### variable timestamp ```cpp uint64_t timestamp; ``` Timestamp corresponding to the frame acquisition. This value is especially useful for the async mode to synchronize the data. ### variable is_new ```cpp int is_new; ``` Whether object_list has already been retrieved or not. ### variable is_tracked ```cpp int is_tracked; ``` Whether both the object tracking and the world orientation has been setup. ### variable detection_model ```cpp enum SL_OBJECT_DETECTION_MODEL detection_model; ``` Current SL_OBJECT_DETECTION_MODEL used. ### variable object_list ```cpp struct SL_ObjectData[MAX_NUMBER_OBJECT] object_list; ``` Array of detected objects. **Note**: * Since the data is transmitted from C++ to C, the size of the structure must be constant. * Therefore, there is a limitation of 75 objects in the image. --- # SL_ObjectsBatch Structure containing batched data of a detected objects from the object detection module. More... `#include ` ## Detailed Description ```cpp struct SL_ObjectsBatch; ``` Structure containing batched data of a detected objects from the object detection module. This structure can be used to store trajectories. ## Public Attributes Documentation ### variable nb_data ```cpp int nb_data; ``` Number of objects in the SL_ObjectsBatch. **Note**: Objects with greater indexes are empty. Use this to iterate through the top of positions / velocities / bounding_boxes / etc. ### variable id ```cpp int id; ``` Id of the batch. ### variable label ```cpp enum SL_OBJECT_CLASS label; ``` Objects class/category to identify the object type. ### variable sublabel ```cpp enum SL_OBJECT_SUBCLASS sublabel; ``` Objects sub-class/sub-category to identify the object type. ### variable tracking_state ```cpp enum SL_OBJECT_TRACKING_STATE tracking_state; ``` Objects tracking state. ### variable positions ```cpp struct SL_Vector3[MAX_TRAJECTORY_SIZE] positions; ``` Array of positions for each object. ### variable position_covariances ```cpp float[MAX_TRAJECTORY_SIZE][6] position_covariances; ``` Array of positions' covariances for each object. ### variable velocities ```cpp struct SL_Vector3[MAX_TRAJECTORY_SIZE] velocities; ``` Array of 3D velocities for each object. ### variable timestamps ```cpp uint64_t[MAX_TRAJECTORY_SIZE] timestamps; ``` Array of timestamps for each object. ### variable bounding_boxes_2d ```cpp struct SL_Vector2[MAX_TRAJECTORY_SIZE][4] bounding_boxes_2d; ``` Array of 2D bounding boxes for each object. **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. ```cpp A ------ B | Object | D ------ C ``` ### variable bounding_boxes ```cpp struct SL_Vector3[MAX_TRAJECTORY_SIZE][8] bounding_boxes; ``` Array of 3D bounding boxes for each object. **Note**: They are defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. ```cpp 1 ------ 2 / /| 0 ------ 3 | | Object | 6 | |/ 4 ------ 7 ``` ### variable confidences ```cpp float[MAX_TRAJECTORY_SIZE] confidences; ``` Array of confidences for each object. ### variable action_states ```cpp enum SL_OBJECT_ACTION_STATE[MAX_TRAJECTORY_SIZE] action_states; ``` Array of action states for each object. ### variable head_bounding_boxes_2d ```cpp struct SL_Vector2[MAX_TRAJECTORY_SIZE][4] head_bounding_boxes_2d; ``` Array of 2D bounding box of the head for each object (person). **Note**: Expressed in pixels on the original image resolution, `[0, 0]` is the top left corner. **Warning**: Not available with SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_XXX. ### variable head_bounding_boxes ```cpp struct SL_Vector3[MAX_TRAJECTORY_SIZE][8] head_bounding_boxes; ``` Array of 3D bounding box of the head for each object (person). **Note**: They are defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. **Warning**: Not available with SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_XXX. ### variable head_positions ```cpp struct SL_Vector3[MAX_TRAJECTORY_SIZE] head_positions; ``` Array of 3D centroid of the head for each object (person). **Note**: They are defined in SL_InitParameters.coordinate_unit and expressed in SL_RuntimeParameters.reference_frame. **Warning**: Not available with SL_OBJECT_DETECTION_MODEL_MULTI_CLASS_BOX_XXX. --- # SL_PlaneData Structure representing a plane defined by a point and a normal, or a plane equation. More... `#include ` ## Detailed Description ```cpp struct SL_PlaneData; ``` Structure representing a plane defined by a point and a normal, or a plane equation. **Note**: The plane measurements are expressed in reference defined by SL_RuntimeParameters.reference_frame. ## Public Attributes Documentation ### variable error_code ```cpp int error_code; ``` SL_ERROR_CODE returned by the ZED SDK when the plane detection was attempted. ### variable type ```cpp enum UNITY_PLAN_TYPE type; ``` Type of the plane defined by its orientation. **Note**: It is deduced from the gravity vector and is therefore not available with on SL_MODEL_ZED. ### variable plane_normal ```cpp struct SL_Vector3 plane_normal; ``` Plane normalized normal vector. ### variable plane_center ```cpp struct SL_Vector3 plane_center; ``` Plane center point. ### variable plane_transform_position ```cpp struct SL_Vector3 plane_transform_position; ``` Plane position relative to the global reference frame. ### variable plane_transform_orientation ```cpp struct SL_Quaternion plane_transform_orientation; ``` Plane orientation relative to the global reference frame. ### variable plane_equation ```cpp struct SL_Vector4 plane_equation; ``` Plane equation coefficients `{a, b, c, d}`. **Note**: The plane equation has the following form: `ax + by + cz = d`. ### variable extents ```cpp struct SL_Vector2 extents; ``` Width and height of the bounding rectangle around the plane contours. ### variable bounds_size ```cpp int bounds_size; ``` Size of bounds. ### variable bounds ```cpp struct SL_Vector3[256] bounds; ``` Array of 3D points forming a polygon bounds corresponding to the current visible limits of the plane. --- # SL_PlaneDetectionParameters Structure containing a set of parameters for the plane detection functionality. More... `#include ` ## Detailed Description ```cpp struct SL_PlaneDetectionParameters; ``` Structure containing a set of parameters for the plane detection functionality. **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable max_distance_threshold ```cpp float max_distance_threshold; ``` Controls the spread of plane by checking the position difference. Default: 0.15 meters ### variable normal_similarity_threshold ```cpp float normal_similarity_threshold; ``` Controls the spread of plane by checking the angle difference. Default: 15 degrees --- # SL_PoseData Structure containing positional tracking data giving the position and orientation of the camera in 3D space. More... `#include ` ## Detailed Description ```cpp struct SL_PoseData; ``` Structure containing positional tracking data giving the position and orientation of the camera in 3D space. Different representations of position and orientation can be retrieved, along with timestamp and pose confidence. ## Public Attributes Documentation ### variable valid ```cpp bool valid; ``` Whether the tracking is activated or not. **Note**: You should check that first if something is wrong. ### variable timestamp ```cpp uint64_t timestamp; ``` Timestamp of the SL_PoseData. This timestamp should be compared with the camera timestamp for synchronization. ### variable rotation ```cpp struct SL_Quaternion rotation; ``` Quaternion/orientation component of the SL_PoseData. ### variable translation ```cpp struct SL_Vector3 translation; ``` Translation component of the SL_PoseData. ### variable pose_confidence ```cpp int pose_confidence; ``` Confidence/quality of the pose estimation for the target frame. A confidence metric of the tracking [0-100] with: * 0: tracking is lost * 100: tracking can be fully trusted ### variable pose_covariance ```cpp float[36] pose_covariance; ``` 6x6 pose covariance matrix of translation (the first 3 values) and rotation in so3 (the last 3 values). ### variable twist ```cpp float[6] twist; ``` Twist of the camera available in reference camera. This expresses velocity in free space, broken into its linear and angular parts. ### variable twist_covariance ```cpp float[36] twist_covariance; ``` Row-major representation of the 6x6 twist covariance matrix of the camera. This expresses the uncertainty of the twist. --- # SL_PositionalTrackingFusionParameters Holds the options used for initializing the positional tracking fusion module. `#include ` ## Public Attributes Documentation ### variable enable_GNSS_fusion ```cpp bool enable_GNSS_fusion; ``` This attribute is responsible for enabling or not GNSS positional tracking fusion. Default: false ### variable gnss_calibration_parameters ```cpp struct SL_GNSSCalibrationParameters gnss_calibration_parameters; ``` Control the VIO / GNSS calibration process. ### variable base_footprint_to_world_translation ```cpp struct SL_Vector3 base_footprint_to_world_translation; ``` Position of the base footprint with respect to the user world. ### variable base_footprint_to_world_rotation ```cpp struct SL_Quaternion base_footprint_to_world_rotation; ``` Orientation of the base footprint with respect to the user world. ### variable base_footprint_to_baselink_translation ```cpp struct SL_Vector3 base_footprint_to_baselink_translation; ``` Position of the base footprint with respect to the baselink. ### variable base_footprint_to_baselink_rotation ```cpp struct SL_Quaternion base_footprint_to_baselink_rotation; ``` Orientation of the base footprint with respect to the baselink. ### variable set_gravity_as_origin ```cpp bool set_gravity_as_origin; ``` Whether to override 2 of the 3 rotations from base_footprint_to_world_transform using the IMU gravity. ### variable tracking_camera_id ```cpp struct SL_CameraIdentifier tracking_camera_id; ``` ID of the camera used for positional tracking. If not specified, will use the first camera called with the subscribe() method. --- # SL_PositionalTrackingStatus Lists the different status of positional tracking. `#include ` ## Public Attributes Documentation ### variable odometry_status ```cpp enum SL_ODOMETRY_STATUS odometry_status; ``` Represents the current state of Visual-Inertial Odometry (VIO) tracking between the previous frame and the current frame. ### variable spatial_memory_status ```cpp enum SL_SPATIAL_MEMORY_STATUS spatial_memory_status; ``` Represents the current state of camera tracking in the global map. ### variable tracking_fusion_status ```cpp enum SL_POSITIONAL_TRACKING_FUSION_STATUS tracking_fusion_status; ``` Represents the current state of positional tracking fusion. --- # SL_Quaternion Structure representing a quaternion. `#include ` ## Public Attributes Documentation ### variable x ```cpp float x; ``` First component of the quaternion. ### variable y ```cpp float y; ``` Second component of the quaternion. ### variable z ```cpp float z; ``` Third component of the quaternion. ### variable w ```cpp float w; ``` Forth component of the quaternion. --- # SL_RecordingStatus Structure containing information about the status of the recording. `#include ` ## Public Attributes Documentation ### variable is_recording ```cpp bool is_recording; ``` Report if the recording has been enabled. ### variable is_paused ```cpp bool is_paused; ``` Report if the recording has been paused. ### variable status ```cpp bool status; ``` Status of current frame. True for success or false if the frame could not be written in the SVO file. ### variable current_compression_time ```cpp double current_compression_time; ``` Compression time for the current frame in milliseconds. ### variable current_compression_ratio ```cpp double current_compression_ratio; ``` Compression ratio (% of raw size) for the current frame. ### variable average_compression_time ```cpp double average_compression_time; ``` Average compression time in milliseconds since beginning of recording. ### variable average_compression_ratio ```cpp double average_compression_ratio; ``` Average compression ratio (% of raw size) since beginning of recording. --- # SL_Rect Structure defining a 2D rectangle with top-left corner coordinates and width/height in pixels. `#include ` ## Public Attributes Documentation ### variable x ```cpp int x; ``` x coordinates of top-left corner. ### variable y ```cpp int y; ``` y coordinates of top-left corner. ### variable width ```cpp int width; ``` Width of the rectangle in pixels. ### variable height ```cpp int height; ``` Height of the rectangle in pixels. --- # SL_RegionOfInterestParameters Structure containing a set of parameters for the region of interest. `#include ` ## Public Attributes Documentation ### variable depth_far_threshold_meters ```cpp float depth_far_threshold_meters; ``` Filtering how far object in the ROI should be considered, this is useful for a vehicle for instance. Default: 2.5 meters ### variable image_height_ratio_cutoff ```cpp float image_height_ratio_cutoff; ``` By default consider only the lower half of the image, can be useful to filter out the sky. Default: 0.5, correspond to the lower half of the image ### variable auto_apply_module ```cpp bool[SL_MODULE_LAST] auto_apply_module; ``` List of modules on which the ROI will be used. Default: All modules --- # SL_Resolution Structure containing the width and height of an image. `#include ` ## Public Attributes Documentation ### variable width ```cpp int width; ``` Width of the image in pixels. ### variable height ```cpp int height; ``` Height of the image in pixels. --- # SL_SVOData Structure containing data that can be stored in and retrieved from SVOs. That information will be ingested with sl_ingest_data_into_svo and retrieved with sl_retrieve_svo_data. `#include ` ## Public Attributes Documentation ### variable key ```cpp char * key; ``` Key used to retrieve the data stored into SVOData's content. ### variable key_size ```cpp int key_size; ``` Size of the key. ### variable content ```cpp char * content; ``` content stored as SVOData. Allow any type of content, including raw data like compressed images or JSON. ### variable content_size ```cpp int content_size; ``` Size of the content. ### variable timestamp_ns ```cpp uint64_t timestamp_ns; ``` Timestamp of the data. --- # SL_SensorParameters Structure containing information about a single sensor available in the current device. More... `#include ` ## Detailed Description ```cpp struct SL_SensorParameters; ``` Structure containing information about a single sensor available in the current device. **Note**: * This structure is meant to be used as a read-only container. * Editing any of its fields will not impact the ZED SDK. Information about the camera sensors is available in the SL_CameraInformation struct returned by sl_get_camera_information(). ## Public Attributes Documentation ### variable type ```cpp enum SL_SENSOR_TYPE type; ``` Type of the sensor. ### variable resolution ```cpp float resolution; ``` Resolution of the sensor. ### variable sampling_rate ```cpp float sampling_rate; ``` Sampling rate (or ODR) of the sensor. ### variable range ```cpp struct SL_Vector2 range; ``` Range of the sensor (minimum: `range.x`, maximum: `range.y`). ### variable noise_density ```cpp float noise_density; ``` White noise density given as continuous (frequency-independent). **Note**: * The units will be expressed in `sensor_unit / √(Hz)`. * `NAN` if the information is not available. ### variable random_walk ```cpp float random_walk; ``` Random walk derived from the Allan Variance given as continuous (frequency-independent). **Note**: * The units will be expressed in `sensor_unit / √(Hz)`. * `NAN` if the information is not available. ### variable sensor_unit ```cpp enum SL_SENSORS_UNIT sensor_unit; ``` Unit of the sensor. ### variable is_available ```cpp bool is_available; ``` Whether the sensor is available in your camera. --- # SL_SensorsConfiguration Structure containing information about all the sensors available in the current device. More... `#include ` ## Detailed Description ```cpp struct SL_SensorsConfiguration; ``` Structure containing information about all the sensors available in the current device. **Note**: * This structure is meant to be used as a read-only container. * Editing any of its fields will not impact the ZED SDK. Information about the camera sensors is available in the SL_CameraInformation struct returned by sl_get_camera_information(). ## Public Attributes Documentation ### variable firmware_version ```cpp unsigned int firmware_version; ``` Firmware version of the sensor module. **Note**: 0 if no sensors are available (SL_MODEL_ZED). ### variable camera_ium_rotation ```cpp struct SL_Vector4 camera_ium_rotation; ``` IMU to left camera rotation (quaternion). **Note**: It contains the rotation between the IMU frame and camera frame. ### variable camera_imu_translation ```cpp struct SL_Vector3 camera_imu_translation; ``` IMU to left camera translation. **Note**: It contains the translation between the IMU frame and camera frame. ### variable ium_magnetometer_rotation ```cpp struct SL_Vector4 ium_magnetometer_rotation; ``` Magnetometer to IMU rotation (quaternion). **Note**: It contains rotation between IMU frame and magnetometer frame. ### variable ium_magnetometer_translation ```cpp struct SL_Vector3 ium_magnetometer_translation; ``` Magnetometer to IMU translation (quaternion). **Note**: It contains translation between IMU frame and magnetometer frame. ### variable accelerometer_parameters ```cpp struct SL_SensorParameters accelerometer_parameters; ``` Configuration of the accelerometer. ### variable gyroscope_parameters ```cpp struct SL_SensorParameters gyroscope_parameters; ``` Configuration of the gyroscope. ### variable magnetometer_parameters ```cpp struct SL_SensorParameters magnetometer_parameters; ``` Configuration of the magnetometer. ### variable barometer_parameters ```cpp struct SL_SensorParameters barometer_parameters; ``` Configuration of the barometer. --- # SL_SpatialMappingParameters Structure containing a set of parameters for the spatial mapping module. More... `#include ` ## Detailed Description ```cpp struct SL_SpatialMappingParameters; ``` Structure containing a set of parameters for the spatial mapping module. **Note**: Parameters can be adjusted by the user. The default constructor sets all parameters to their default settings. ## Public Attributes Documentation ### variable resolution_meter ```cpp float resolution_meter; ``` Spatial mapping resolution in meters. Default: 0.05f ### variable range_meter ```cpp float range_meter; ``` Depth range in meters. **Note**: 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. Can be different from the value set by SL_InitParameters.depth_maximum_distance. ### variable save_texture ```cpp bool save_texture; ``` Whether to save the texture. **Note**: * This option will consume more memory. * This option is only available for SL_SPATIAL_MAP_TYPE_MESH. If set to true, you will be able to apply the texture to your mesh after it is created. Default: false ### variable use_chunk_only ```cpp bool use_chunk_only; ``` Whether to only use chunks. **Note**: * Updating the mesh is time-consuming. * Setting this to true results in better performance. If set to false, you will ensure consistency between the mesh and its inner chunk data. Default: false ### variable max_memory_usage ```cpp int max_memory_usage; ``` The maximum CPU memory (in MB) allocated for the meshing process. Default: 2048 ### variable reverse_vertex_order ```cpp bool reverse_vertex_order; ``` Whether to inverse the order of the vertices of the triangles. **Note**: This option is only available for SL_SPATIAL_MAP_TYPE_MESH. If your display process does not handle front and back face culling, you can use this to correct it. Default: false ### variable map_type ```cpp enum SL_SPATIAL_MAP_TYPE map_type; ``` 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 SL_SPATIAL_MAP_TYPE. ### variable stability_counter ```cpp int stability_counter; ``` Control the integration rate of the current depth into the mapping process. This parameter controls how many times a stable 3D points should be seen before it is integrated into the spatial mapping. Default: 0 (this will define the stability counter based on the mesh resolution, the higher the resolution, the higher the stability counter) ### variable disparity_std ```cpp float disparity_std; ``` Control the disparity noise (standard deviation) in px. set a very small value (<0.1) if the depth map of the scene is accurate. set a big value (>0.5) if the depth map is noisy. ### variable decay ```cpp float decay; ``` Adjust the weighting factor for the current depth during the integration process. By default, the value is set to 1, which results in the complete integration and fusion of the current depth with the previously integrated depth. Setting it to 0 discards all previous data and solely integrates the current depth. ### variable enable_forget_past ```cpp bool enable_forget_past; ``` This parameter enables the forgetting of the previous map to limit memory and drift issues. It enables a local spatial mapping that only keeps a mapped scene around the current camera position. The distance threshold is set to be equal to 1.5 x the range of the spatial mapping. --- # SL_StreamingProperties Structure containing information about the properties of a streaming device. `#include ` ## Public Attributes Documentation ### variable ip ```cpp unsigned char[16] ip; ``` IP address of the streaming device. ### variable port ```cpp unsigned short port; ``` Streaming port of the streaming device. Default: 0 ### variable serial_number ```cpp unsigned int serial_number; ``` Serial number of the streaming camera. Default: 0 ### variable current_bitrate ```cpp int current_bitrate; ``` Current bitrate of encoding of the streaming device. Default: 0 ### variable codec ```cpp enum SL_STREAMING_CODEC codec; ``` Current codec used for compression in streaming device. Default: SL_STREAMING_CODEC_H265 ### variable camera_model ```cpp enum SL_MODEL camera_model; ``` Model of the streaming device. Default: SL_MODEL_LAST --- # SL_SynchronizationParameter Configuration parameters for data synchronization. More... `#include ` ## Detailed Description ```cpp struct SL_SynchronizationParameter; ``` Configuration parameters for data synchronization. The SynchronizationParameter struct represents the configuration parameters used by the synchronizer. It allows customization of the synchronization process based on specific requirements. ## Public Attributes Documentation ### variable windows_size ```cpp double windows_size; ``` Size of synchronization windows in milliseconds. The synchronization window is used by the synchronizer to return all data present inside the current synchronization window. For efficient fusion, the synchronization window size is expected to be equal to the mean `grab()` duration of the camera at the lowest FPS. If not provided, the fusion SDK will compute it from the data's sources. Default value: 0 ### variable data_source_timeout ```cpp double data_source_timeout; ``` Duration in milliseconds before considering a camera as inactive if no more data is present (for example camera disconnection). The data_source_timeout parameter specifies the duration to wait before considering a camera as inactive if no new data is received within the specified time frame. Default value: 50 ### variable keep_last_data ```cpp bool keep_last_data; ``` Determines whether to include the last data returned by a source in the final synchronized data. If the keep_last_data parameter is set to true and no data is present in the current synchronization window, the last data returned by the source will be included in the final synchronized data. This ensures continuity even in the absence of fresh data. Default value: false ### variable maximum_lateness ```cpp double maximum_lateness; ``` Maximum duration in milliseconds allowed for data to be considered as the last data. The maximum_lateness parameter sets the maximum duration within which data can be considered as the last available data. If the duration between the last received data and the current synchronization window exceeds this value, the data will not be included as the last data in the final synchronized output. Default value: 50 --- # SL_TemperatureData Structure containing data from the temperature sensors. `#include ` ## Public Attributes Documentation ### variable imu_temp ```cpp float imu_temp; ``` Temperature in °C at the IMU location (-100 if not available). ### variable barometer_temp ```cpp float barometer_temp; ``` Temperature in °C at the barometer location (-100 if not available). ### variable onboard_left_temp ```cpp float onboard_left_temp; ``` Temperature in °C next to the left image sensor (-100 if not available). ### variable onboard_right_temp ```cpp float onboard_right_temp; ``` Temperature in °C next to the right image sensor (-100 if not available). --- # SL_Transform Structure representing a transformation (translation and rotation) `#include ` ## Public Attributes Documentation ### variable translation ```cpp struct SL_Vector3 translation; ``` Translation part of the transform. ### variable rotation ```cpp struct SL_Quaternion rotation; ``` Rotation part of the transform. --- # SL_UTM Represents a world position in UTM format. `#include ` ## Public Attributes Documentation ### variable northing ```cpp double northing; ``` Northing coordinate. ### variable easting ```cpp double easting; ``` Easting coordinate. ### variable gamma ```cpp double gamma; ``` Gamma coordinate. ### variable UTMZone ```cpp char[256] UTMZone; ``` UTMZone of the coordinate. --- # SL_Uchar2 Structure representing an unsigned char 2-dimensional vector. `#include ` ## Public Attributes Documentation ### variable x ```cpp unsigned char x; ``` Fist component of the vector. ### variable y ```cpp unsigned char y; ``` Second component of the vector. --- # SL_Uchar3 Structure representing an unsigned char 3-dimensional vector. `#include ` ## Public Attributes Documentation ### variable x ```cpp unsigned char x; ``` Fist component of the vector. ### variable y ```cpp unsigned char y; ``` Second component of the vector. ### variable z ```cpp unsigned char z; ``` Third component of the vector. --- # SL_Uchar4 Structure representing an unsigned char 4-dimensional vector. `#include ` ## Public Attributes Documentation ### variable x ```cpp unsigned char x; ``` Fist component of the vector. ### variable y ```cpp unsigned char y; ``` Second component of the vector. ### variable z ```cpp unsigned char z; ``` Third component of the vector. ### variable w ```cpp unsigned char w; ``` Fourth component of the vector. --- # SL_Uint2 Structure representing a generic 2-dimensional unsigned integer vector. `#include ` ## Public Attributes Documentation ### variable x ```cpp unsigned int x; ``` Fist component of the vector. ### variable y ```cpp unsigned int y; ``` Second component of the vector. --- # SL_Vector2 Structure representing a generic 2-dimensional vector. `#include ` ## Public Attributes Documentation ### variable x ```cpp float x; ``` Fist component of the vector. ### variable y ```cpp float y; ``` Second component of the vector. --- # SL_Vector3 Structure representing a generic 3-dimensional vector. `#include ` ## Public Attributes Documentation ### variable x ```cpp float x; ``` Fist component of the vector. ### variable y ```cpp float y; ``` Second component of the vector. ### variable z ```cpp float z; ``` Third component of the vector. --- # SL_Vector4 Structure representing a generic 4-dimensional vector. `#include ` ## Public Attributes Documentation ### variable x ```cpp float x; ``` Fist component of the vector. ### variable y ```cpp float y; ``` Second component of the vector. ### variable z ```cpp float z; ``` Third component of the vector. ### variable w ```cpp float w; ``` Forth component of the vector. --- # SL_VoxelMeasureParameters Parameters controlling voxel decimation in sl_retrieve_voxel_measure. `#include ` ## Public Attributes Documentation ### variable voxel_size ```cpp float voxel_size; ``` Voxel grid cell size in coordinate_units defined in SL_InitParameters. If <= 0, a 100 mm equivalent default is used. Clamped internally to [5 mm equivalent, max_depth_range]. ### variable centroid ```cpp bool centroid; ``` Controls output point positions within each voxel. If true, output point positions are the centroid of all points in each voxel. If false, output positions are snapped to the voxel grid center. ### variable resolution_mode ```cpp enum SL_VOXELIZATION_MODE resolution_mode; ``` How voxel size adapts with depth. Default: SL_VOXELIZATION_MODE_STEREO_UNCERTAINTY. ### variable resolution_scale ```cpp float resolution_scale; ``` Scale factor for depth-adaptive voxel growth. Typical range: [0.01, 1.0]. Clamped internally to [0.01, 3.0]. **Note**: Only used when resolution_mode is not SL_VOXELIZATION_MODE_FIXED. --- # add-on-c.txt --- # c_api ## Files | Name | | -------------- | | **c_api/types_c.h** | | **c_api/zed_interface.h** | --- # c-api ## Directories | Name | | -------------- | | **include** | --- # include ## Directories | Name | | -------------- | | **sl** | --- # release-notes.md