sl Namespace Reference

Classes

struct  CalibrationParameters
 Intrinsic and Extrinsic parameters of the camera (translation and rotation). More...
 
class  Camera
 This class is the main interface with the camera and the SDK features, suche as: video, depth, tracking, mapping, and more.
Find more information in the detailed description below.
. More...
 
struct  CameraInformation
 Structure containing information of a signle camera (serial number, model, calibration, etc.) More...
 
struct  CameraParameters
 Intrinsic parameters of a camera. More...
 
class  Chunk
 Represents a sub-mesh, it contains local vertices and triangles. More...
 
struct  DeviceProperties
 Properties of a camera. More...
 
class  FusedPointCloud
 A fused point cloud contains both geometric and color data of the scene captured by spatial mapping. More...
 
class  IMUData
 Contains inertial positional tracking data which gives the orientation of the ZED-M. More...
 
class  InitParameters
 Holds the options used to initialize the Camera object.
Once passed to the Camera::open() function, these settings will be set for the entire execution life time of the Camera.
You can get further information in the detailed description bellow.
. More...
 
class  InputType
 Defines the input type used in the ZED SDK. Can be used to select a specific camera with ID or serial number, or a svo file. More...
 
class  Mat
 The Mat class can handle multiple matrix format from 1 to 4 channels, with different value types (float or uchar), and can be stored CPU and/or GPU side. More...
 
class  Matrix3f
 Represents a generic 3*3 matrix. More...
 
class  Matrix4f
 Represents a generic 4*4 matrix. More...
 
class  Mesh
 A mesh contains the geometric (and optionally texture) data of the scene captured by spatial mapping. More...
 
class  MeshFilterParameters
 Defines the behavior of the sl::Mesh::filter function. More...
 
class  Orientation
 Designed to contain orientation (quaternion) data of the positional tracking. More...
 
class  Plane
 A plane defined by a point and a normal, or a plane equation Other elements can be extracted such as the mesh, the 3D bounds... More...
 
class  PointCloudChunk
 Represents a sub fused point cloud, it contains local vertices and colors. More...
 
class  Pose
 Contains positional tracking data which gives the position and orientation of the ZED in 3D space. More...
 
struct  RecordingState
 Recording structure that contains information about SVO. More...
 
struct  Resolution
 Width and height of an array. More...
 
class  Rotation
 Designed to contain rotation data of the positional tracking. It inherits from the generic Matrix3f. More...
 
class  RuntimeParameters
 Parameters that defines the behavior of the grab. More...
 
class  SpatialMappingParameters
 Sets the spatial mapping parameters. More...
 
class  StreamingParameters
 Sets the streaming parameters. More...
 
struct  StreamingProperties
 Properties of a all streaming devices. More...
 
class  String
 Defines a string. More...
 
class  Texture
 Contains information about texture image associated to a Mesh. More...
 
class  TrackingParameters
 Parameters for positional tracking initialization. More...
 
class  Transform
 Designed to contain translation and rotation data of the positional tracking. More...
 
class  Translation
 Designed to contain translation data of the positional tracking. More...
 
class  Vector2
 Represents a two dimensions vector for both CPU and GPU. More...
 
class  Vector3
 Represents a three dimensions vector for both CPU and GPU. More...
 
class  Vector4
 Represents a four dimensions vector for both CPU and GPU. More...
 

Typedefs

Types definition
typedef float float1
 
typedef Vector2< float > float2
 
typedef Vector3< float > float3
 
typedef Vector4< float > float4
 
typedef unsigned char uchar1
 
typedef Vector2< unsigned char > uchar2
 
typedef Vector3< unsigned char > uchar3
 
typedef Vector4< unsigned char > uchar4
 
typedef double double1
 
typedef Vector2< double > double2
 
typedef Vector3< double > double3
 
typedef Vector4< double > double4
 
typedef unsigned int uint1
 
typedef Vector2< unsigned int > uint2
 
typedef Vector3< unsigned int > uint3
 
typedef Vector4< unsigned int > uint4
 
typedef uint64_t timeStamp
 

Enumerations

enum  UNIT
 Lists available unit for measures. More...
 
enum  COORDINATE_SYSTEM
 Lists available coordinates systems for positional tracking and 3D measures. More...
 
enum  ERROR_CODE
 Lists error codes in the ZED SDK. More...
 
enum  MODEL
 Lists compatible ZED Camera model. More...
 
enum  INPUT_TYPE
 Lists availble input type in SDK. More...
 
enum  CAMERA_STATE
 List of possible camera state. More...
 
enum  STREAMING_CODEC
 List of possible camera state. More...
 
enum  MESH_FILE_FORMAT
 Lists available mesh file formats. More...
 
enum  MESH_TEXTURE_FORMAT
 Lists available mesh texture formats. More...
 
enum  PLANE_TYPE
 List available plane type detected from the orientation. More...
 
enum  MEM
 List available memory type. More...
 
enum  COPY_TYPE
 List available copy operation on Mat. More...
 
enum  MAT_TYPE
 List available Mat formats. More...
 
enum  RESOLUTION
 Represents the available resolution defined in the cameraResolution list. More...
 
enum  CAMERA_SETTINGS
 Lists available camera settings for the ZED camera (contrast, hue, saturation, gain...). More...
 
enum  SELF_CALIBRATION_STATE
 Status for asynchrnous self-calibration. More...
 
enum  DEPTH_MODE
 Lists available depth computation modes. More...
 
enum  SENSING_MODE
 Lists available depth sensing modes. More...
 
enum  MEASURE
 Lists retrievable measures. More...
 
enum  VIEW
 Lists available views. More...
 
enum  TIME_REFERENCE
 Lists specific and particular timestamps. More...
 
enum  DEPTH_FORMAT
 Lists available file formats for saving depth maps. More...
 
enum  POINT_CLOUD_FORMAT
 Lists available file formats for saving point clouds. Stores the spatial coordinates (x,y,z) of each pixel and optionally its RGB color. More...
 
enum  TRACKING_STATE
 Lists the different states of positional tracking. More...
 
enum  AREA_EXPORT_STATE
 Lists the different states of spatial memory area export. More...
 
enum  REFERENCE_FRAME
 Defines which type of position matrix is used to store camera path and pose. More...
 
enum  SPATIAL_MAPPING_STATE
 Gives the spatial mapping state. More...
 
enum  SVO_COMPRESSION_MODE
 Lists available compression modes for SVO recording. More...
 

Functions

String toString (const UNIT &unit)
 Converts the given enum to a readable string. More...
 
String toString (const COORDINATE_SYSTEM &coord_system)
 Converts the given enum to a readable string. More...
 
String toString (const ERROR_CODE &errorCode)
 Converts the given enum to a readable string. More...
 
String toVerbose (const ERROR_CODE &errorCode)
 Return a text explaining how to fix the given ERROR_CODE. More...
 
String toString (const MODEL &model)
 Converts the given enum to a readable string. More...
 
String toString (const INPUT_TYPE &input_type)
 Converts the given enum to a readable string. More...
 
String toString (const CAMERA_STATE &camera_state)
 Converts the given enum to a readable string. More...
 
String toString (const DeviceProperties &properties)
 Converts the given struct to a readable string. More...
 
String toString (const StreamingProperties &properties)
 Converts the given struct to a readable string. More...
 
void sleep_ms (int time)
 Tells the program to wait for x ms. More...
 
void sleep_us (int time)
 Tells the program to wait for x us. More...
 
String toString (const MESH_FILE_FORMAT &mesh_frmt)
 Converts the given enumerated value into readable text. More...
 
String toString (const MESH_TEXTURE_FORMAT &text_frmt)
 Converts the given enumerated value into readable text. More...
 
String toString (const MeshFilterParameters::MESH_FILTER &mesh_filter)
 Converts the given enumerated value into readable text. More...
 
String toString (const PLANE_TYPE &type)
 Converts the given enumerated value into readable text. More...
 
bool saveDepthAs (Camera &zed, DEPTH_FORMAT format, String name, float factor=1.)
 Writes the current depth map into a file. More...
 
bool saveDepthAs (Mat &depth, DEPTH_FORMAT format, String name, float factor=1.)
 Writes the current depth map into a file. More...
 
bool savePointCloudAs (Camera &zed, POINT_CLOUD_FORMAT format, String name, bool with_color=false)
 Writes the current point cloud into a file. More...
 
bool savePointCloudAs (Mat &cloud, POINT_CLOUD_FORMAT format, String name, bool with_color=false)
 Writes the current point cloud into a file. More...
 
String toString (const SpatialMappingParameters::MAPPING_RESOLUTION &resolution)
 Converts the given enumerated value into readable text. More...
 
String toString (const SpatialMappingParameters::MAPPING_RANGE &range)
 Converts the given enumerated value into readable text. More...
 
String toString (const SpatialMappingParameters::SPATIAL_MAP_TYPE &map_type)
 Converts the given enumerated value into readable text. More...
 
String toString (const MEM &mem)
 Convert the given enumerated value into readable text. More...
 
String toString (const COPY_TYPE &cpy)
 Convert the given enumerated value into readable text. More...
 
String toString (const MAT_TYPE &type)
 Convert the given enumerated value into readable text. More...
 
Rotation computeRotationMatrixFromGravity (sl::float3 axis_to_align, sl::float3 gravity_vector)
 Compute the rotation matrix from the gravity vector : the rotation can used to find the world rotation from the gravity of an IMU. More...
 
Matrix3f getCoordinateTransformConversion3f (COORDINATE_SYSTEM coord_system_src, COORDINATE_SYSTEM coord_system_dst)
 Get the coordinate transform conversion matrix to change coordinate system. More...
 
Matrix4f getCoordinateTransformConversion4f (COORDINATE_SYSTEM coord_system_src, COORDINATE_SYSTEM coord_system_dst)
 Get the coordinate transform conversion matrix to change coordinate system. More...
 
ERROR_CODE convertCoordinateSystem (Mat &floatMat, COORDINATE_SYSTEM coord_system_src, COORDINATE_SYSTEM coord_system_dst, MEM mem=MEM_CPU)
 Change the coordinate system of a matrix. More...
 
ERROR_CODE convertCoordinateSystem (Transform &motionMat, COORDINATE_SYSTEM coord_system_src, COORDINATE_SYSTEM coord_system_dst)
 Change the coordinate system of a transform matrix. More...
 
float getUnitScale (UNIT unit_src, UNIT unit_dst)
 Get the unit factor to change units. More...
 
ERROR_CODE convertUnit (Mat &floatMat, UNIT unit_src, UNIT unit_dst, MEM mem=MEM_CPU)
 Change the unit of a matrix. More...
 
ERROR_CODE convertUnit (Transform &motionMat, UNIT unit_src, UNIT unit_dst)
 Change the unit (of the translations) of a transform matrix. More...
 
String toString (const RESOLUTION &resolution)
 Converts the given enumerated value into readable text. More...
 
String toString (const CAMERA_SETTINGS &camSettings)
 Converts the given enumerated value into readable text. More...
 
String toString (const SELF_CALIBRATION_STATE &selfCalibState)
 Converts the given enumerated value into readable text. More...
 
String toString (const DEPTH_MODE &depthMode)
 Converts the given enumerated value into readable text. More...
 
String toString (const SENSING_MODE &sensingMode)
 Converts the given enumerated value into readable text. More...
 
String toString (const MEASURE &measure)
 Converts the given enumerated value into readable text. More...
 
String toString (const VIEW &view)
 Converts the given enumerated value into readable text. More...
 
String toString (const TIME_REFERENCE &time_reference)
 Converts the given enumerated value into readable text. More...
 
String toString (const DEPTH_FORMAT &depth_frmt)
 Converts the given enumerated value into readable text. More...
 
String toString (const POINT_CLOUD_FORMAT &pc_frmt)
 Converts the given enumerated value into readable text. More...
 
String toString (const TRACKING_STATE &track_state)
 Converts the given enumerated value into readable text. More...
 
String toString (const AREA_EXPORT_STATE &area_export)
 Converts the given enumerated value into readable text. More...
 
String toString (const REFERENCE_FRAME &ref_frame)
 Converts the given enumerated value into readable text. More...
 
String toString (const SPATIAL_MAPPING_STATE &mapping_state)
 Converts the given enumerated value into readable text. More...
 
String toString (const SVO_COMPRESSION_MODE &svo_compression)
 Converts the given enumerated value into readable text. More...
 
String resolution2str (RESOLUTION res)
 Converts the given RESOLUTION into a string. More...
 
String statusCode2str (SELF_CALIBRATION_STATE state)
 Converts the given SELF_CALIBRATION_STATE into a string. More...
 
DEPTH_MODE str2mode (String mode)
 Converts the given string into a DEPTH_MODE. More...
 
String depthMode2str (DEPTH_MODE mode)
 Converts the given DEPTH_MODE into a string. More...
 
String sensingMode2str (SENSING_MODE mode)
 Converts the given SENSING_MODE into a string. More...
 
String trackingState2str (TRACKING_STATE state)
 Converts the given TRACKING_STATE into a string. More...
 
String spatialMappingState2str (SPATIAL_MAPPING_STATE state)
 Converts the given SPATIAL_MAPPING_STATE into a string. More...
 
Enumeration conversion
String model2str (MODEL model)
 Converts the given MODEL into a string. More...
 
String errorCode2str (ERROR_CODE errorCode)
 Converts the given ERROR_CODE into a string. More...
 
String unit2str (UNIT unit)
 Converts the given UNIT into a string. More...
 
UNIT str2unit (String unit)
 Converts the given string into a UNIT. More...
 

Variables

static const float INVALID_VALUE = NAN
 
Unavailable Values
static const float TOO_FAR = INFINITY
 
static const float TOO_CLOSE = -INFINITY
 
static const float OCCLUSION_VALUE = NAN
 
ZED Camera Resolution
static const std::vector< std::pair< int, int > > cameraResolution
 Lists available video modes for the ZED camera. std::vector<std::pair(width, height)> More...
 

Typedef Documentation

◆ float1

typedef float float1

◆ float2

typedef Vector2<float> float2

◆ float3

typedef Vector3<float> float3

◆ float4

typedef Vector4<float> float4

◆ uchar1

typedef unsigned char uchar1

◆ uchar2

typedef Vector2<unsigned char> uchar2

◆ uchar3

typedef Vector3<unsigned char> uchar3

◆ uchar4

typedef Vector4<unsigned char> uchar4

◆ double1

typedef double double1

◆ double2

typedef Vector2<double> double2

◆ double3

typedef Vector3<double> double3

◆ double4

typedef Vector4<double> double4

◆ uint1

typedef unsigned int uint1

◆ uint2

typedef Vector2<unsigned int> uint2

◆ uint3

typedef Vector3<unsigned int> uint3

◆ uint4

typedef Vector4<unsigned int> uint4

◆ timeStamp

typedef uint64_t timeStamp

Enumeration Type Documentation

◆ PLANE_TYPE

enum PLANE_TYPE

List available plane type detected from the orientation.

Enumerator
PLANE_TYPE_HORIZONTAL 
PLANE_TYPE_VERTICAL 
PLANE_TYPE_UNKNOWN 
PLANE_TYPE_LAST 

Function Documentation

◆ toString()

String sl::toString ( const PLANE_TYPE type)

Converts the given enumerated value into readable text.

Returns
The enumerated value as a string.

◆ computeRotationMatrixFromGravity()

Rotation sl::computeRotationMatrixFromGravity ( sl::float3  axis_to_align,
sl::float3  gravity_vector 
)

Compute the rotation matrix from the gravity vector : the rotation can used to find the world rotation from the gravity of an IMU.

Parameters
axis_to_align: define the axis to align with the gravity, for instance : to align the "y" axis, axis_to_align = (0, 1, 0)'
gravity_vector: the gravity vector, acceleration set by an IMU
Returns
Rotation : rotation matrix, useful for Camera::detectFloorPlane as a gravity prior

◆ getCoordinateTransformConversion3f()

Matrix3f sl::getCoordinateTransformConversion3f ( COORDINATE_SYSTEM  coord_system_src,
COORDINATE_SYSTEM  coord_system_dst 
)

Get the coordinate transform conversion matrix to change coordinate system.

Parameters
coord_system_src: the source coordinate system.
coord_system_dst: the destination coordinate system.
Returns
Matrix3f : transformation matrix, to apply to a float3 point simply multiply by this matrix (pt_coord_dst = tf_matrix * pt_coord_src).

◆ getCoordinateTransformConversion4f()

Matrix4f sl::getCoordinateTransformConversion4f ( COORDINATE_SYSTEM  coord_system_src,
COORDINATE_SYSTEM  coord_system_dst 
)

Get the coordinate transform conversion matrix to change coordinate system.

Parameters
coord_system_src: the source coordinate system.
coord_system_dst: the destination coordinate system.
Returns
Matrix4f : transformation matrix, to apply to a float4 point simply multiply by this matrix (pt_coord_dst = tf_matrix * pt_coord_src).

◆ convertCoordinateSystem() [1/2]

ERROR_CODE sl::convertCoordinateSystem ( Mat floatMat,
COORDINATE_SYSTEM  coord_system_src,
COORDINATE_SYSTEM  coord_system_dst,
MEM  mem = MEM_CPU 
)

Change the coordinate system of a matrix.

Parameters
floatMat: (in/out) matrix to transform, can be either a MAT_TYPE_32F_C4 (the fourth value will be ignored as it contained the color information) or a MAT_TYPE_32F_C3.
coord_system_src: the current coordinate system of floatMat.
coord_system_dst: the destination coordinate system for floatMat.
mem: define which memory should be transformed from floatMat.
Returns
SUCCESS if everything went well, ERROR_CODE_FAILURE otherwise.

◆ convertCoordinateSystem() [2/2]

ERROR_CODE sl::convertCoordinateSystem ( Transform motionMat,
COORDINATE_SYSTEM  coord_system_src,
COORDINATE_SYSTEM  coord_system_dst 
)

Change the coordinate system of a transform matrix.

Parameters
motionMat: (in/out) matrix to transform
coord_system_src: the current coordinate system of motionMat.
coord_system_dst: the destination coordinate system for motionMat.
Returns
SUCCESS if everything went well, ERROR_CODE_FAILURE otherwise.

◆ getUnitScale()

float sl::getUnitScale ( UNIT  unit_src,
UNIT  unit_dst 
)

Get the unit factor to change units.

Parameters
unit_src: the source coordinate system.
unit_dst: the destination coordinate system.
Returns
float : unit scale (pt_coord_dst = factor * pt_coord_src).

◆ convertUnit() [1/2]

ERROR_CODE sl::convertUnit ( Mat floatMat,
UNIT  unit_src,
UNIT  unit_dst,
MEM  mem = MEM_CPU 
)

Change the unit of a matrix.

Parameters
floatMat: (in/out) matrix to transform, can be either a MAT_TYPE_32F_C4 (the fourth value will be ignored as it contained the color information), MAT_TYPE_32F_C3 or a MAT_TYPE_32F_C1.
unit_src: the current unit of floatMat.
unit_dst: the destination unit for floatMat.
mem: define which memory should be transformed from floatMat.
Returns
SUCCESS if everything went well, ERROR_CODE_FAILURE otherwise.

◆ convertUnit() [2/2]

ERROR_CODE sl::convertUnit ( Transform motionMat,
UNIT  unit_src,
UNIT  unit_dst 
)

Change the unit (of the translations) of a transform matrix.

Parameters
floatMat: (in/out) matrix to transform
unit_src: the current unit of motionMat.
unit_dst: the destination unit for motionMat.
Returns
SUCCESS if everything went well, ERROR_CODE_FAILURE otherwise.

Variable Documentation

◆ TOO_FAR

const float TOO_FAR = INFINITY
static

Defines an unavailable depth value that is above the depth Max value.

◆ TOO_CLOSE

const float TOO_CLOSE = -INFINITY
static

Defines an unavailable depth value that is below the depth Min value.

◆ OCCLUSION_VALUE

const float OCCLUSION_VALUE = NAN
static

Defines an unavailable depth value that is on an occluded image area.

◆ INVALID_VALUE

const float INVALID_VALUE = NAN
static

Referenced by Camera::isOpened().