Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Classes | Typedefs | Enumerations | Functions
rs_types.h File Reference

Exposes RealSense structs. More...

Go to the source code of this file.

Classes

struct  rs2_intrinsics
 Video stream intrinsics. More...
 
struct  rs2_motion_device_intrinsic
 Motion device intrinsics: scale, bias, and variances. More...
 
struct  rs2_vertex
 3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from the camera, positive X pointing camera right and positive Y pointing camera down More...
 
struct  rs2_pixel
 Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down. More...
 
struct  rs2_vector
 3D vector in Euclidean coordinate space More...
 
struct  rs2_quaternion
 Quaternion used to represent rotation. More...
 
struct  rs2_pose
 

Typedefs

typedef enum rs2_notification_category rs2_notification_category
 Category of the librealsense notification. More...
 
typedef enum rs2_exception_type rs2_exception_type
 Exception types are the different categories of errors that RealSense API might return. More...
 
typedef enum rs2_distortion rs2_distortion
 Distortion model: defines how pixel coordinates should be mapped to sensor coordinates. More...
 
typedef struct rs2_intrinsics rs2_intrinsics
 Video stream intrinsics. More...
 
typedef struct rs2_motion_device_intrinsic rs2_motion_device_intrinsic
 Motion device intrinsics: scale, bias, and variances. More...
 
typedef struct rs2_vertex rs2_vertex
 3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from the camera, positive X pointing camera right and positive Y pointing camera down More...
 
typedef struct rs2_pixel rs2_pixel
 Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down. More...
 
typedef struct rs2_vector rs2_vector
 3D vector in Euclidean coordinate space More...
 
typedef struct rs2_quaternion rs2_quaternion
 Quaternion used to represent rotation. More...
 
typedef struct rs2_pose rs2_pose
 
typedef enum rs2_log_severity rs2_log_severity
 Severity of the librealsense logger. More...
 
typedef enum rs2_extension rs2_extension
 Specifies advanced interfaces (capabilities) objects may implement. More...
 
typedef enum rs2_matchers rs2_matchers
 Specifies types of different matchers. More...
 
typedef struct rs2_device_info rs2_device_info
 
typedef struct rs2_device rs2_device
 
typedef struct rs2_error rs2_error
 
typedef struct rs2_log_message rs2_log_message
 
typedef struct rs2_raw_data_buffer rs2_raw_data_buffer
 
typedef struct rs2_frame rs2_frame
 
typedef struct rs2_frame_queue rs2_frame_queue
 
typedef struct rs2_pipeline rs2_pipeline
 
typedef struct rs2_pipeline_profile rs2_pipeline_profile
 
typedef struct rs2_config rs2_config
 
typedef struct rs2_device_list rs2_device_list
 
typedef struct rs2_stream_profile_list rs2_stream_profile_list
 
typedef struct rs2_processing_block_list rs2_processing_block_list
 
typedef struct rs2_stream_profile rs2_stream_profile
 
typedef struct rs2_frame_callback rs2_frame_callback
 
typedef struct rs2_log_callback rs2_log_callback
 
typedef struct rs2_syncer rs2_syncer
 
typedef struct rs2_device_serializer rs2_device_serializer
 
typedef struct rs2_source rs2_source
 
typedef struct rs2_processing_block rs2_processing_block
 
typedef struct rs2_frame_processor_callback rs2_frame_processor_callback
 
typedef struct rs2_playback_status_changed_callback rs2_playback_status_changed_callback
 
typedef struct rs2_update_progress_callback rs2_update_progress_callback
 
typedef struct rs2_context rs2_context
 
typedef struct rs2_device_hub rs2_device_hub
 
typedef struct rs2_sensor_list rs2_sensor_list
 
typedef struct rs2_sensor rs2_sensor
 
typedef struct rs2_options rs2_options
 
typedef struct rs2_options_list rs2_options_list
 
typedef struct rs2_devices_changed_callback rs2_devices_changed_callback
 
typedef struct rs2_notification rs2_notification
 
typedef struct rs2_notifications_callback rs2_notifications_callback
 
typedef void(* rs2_log_callback_ptr) (rs2_log_severity, rs2_log_message const *, void *arg)
 
typedef void(* rs2_notification_callback_ptr) (rs2_notification *, void *)
 
typedef void(* rs2_software_device_destruction_callback_ptr) (void *)
 
typedef void(* rs2_devices_changed_callback_ptr) (rs2_device_list *, rs2_device_list *, void *)
 
typedef void(* rs2_frame_callback_ptr) (rs2_frame *, void *)
 
typedef void(* rs2_frame_processor_callback_ptr) (rs2_frame *, rs2_source *, void *)
 
typedef void(* rs2_update_progress_callback_ptr) (const float, void *)
 
typedef double rs2_time_t
 
typedef long long rs2_metadata_type
 

Enumerations

enum  rs2_notification_category {
  RS2_NOTIFICATION_CATEGORY_FRAMES_TIMEOUT, RS2_NOTIFICATION_CATEGORY_FRAME_CORRUPTED, RS2_NOTIFICATION_CATEGORY_HARDWARE_ERROR, RS2_NOTIFICATION_CATEGORY_HARDWARE_EVENT,
  RS2_NOTIFICATION_CATEGORY_UNKNOWN_ERROR, RS2_NOTIFICATION_CATEGORY_FIRMWARE_UPDATE_RECOMMENDED, RS2_NOTIFICATION_CATEGORY_POSE_RELOCALIZATION, RS2_NOTIFICATION_CATEGORY_COUNT
}
 Category of the librealsense notification. More...
 
enum  rs2_exception_type {
  RS2_EXCEPTION_TYPE_UNKNOWN, RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED, RS2_EXCEPTION_TYPE_BACKEND, RS2_EXCEPTION_TYPE_INVALID_VALUE,
  RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE, RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED, RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE, RS2_EXCEPTION_TYPE_IO,
  RS2_EXCEPTION_TYPE_COUNT
}
 Exception types are the different categories of errors that RealSense API might return. More...
 
enum  rs2_distortion {
  RS2_DISTORTION_NONE, RS2_DISTORTION_MODIFIED_BROWN_CONRADY, RS2_DISTORTION_INVERSE_BROWN_CONRADY, RS2_DISTORTION_FTHETA,
  RS2_DISTORTION_BROWN_CONRADY, RS2_DISTORTION_KANNALA_BRANDT4, RS2_DISTORTION_COUNT
}
 Distortion model: defines how pixel coordinates should be mapped to sensor coordinates. More...
 
enum  rs2_log_severity {
  RS2_LOG_SEVERITY_DEBUG, RS2_LOG_SEVERITY_INFO, RS2_LOG_SEVERITY_WARN, RS2_LOG_SEVERITY_ERROR,
  RS2_LOG_SEVERITY_FATAL, RS2_LOG_SEVERITY_NONE, RS2_LOG_SEVERITY_COUNT, RS2_LOG_SEVERITY_ALL = RS2_LOG_SEVERITY_DEBUG
}
 Severity of the librealsense logger. More...
 
enum  rs2_extension {
  RS2_EXTENSION_UNKNOWN, RS2_EXTENSION_DEBUG, RS2_EXTENSION_INFO, RS2_EXTENSION_MOTION,
  RS2_EXTENSION_OPTIONS, RS2_EXTENSION_VIDEO, RS2_EXTENSION_ROI, RS2_EXTENSION_DEPTH_SENSOR,
  RS2_EXTENSION_VIDEO_FRAME, RS2_EXTENSION_MOTION_FRAME, RS2_EXTENSION_COMPOSITE_FRAME, RS2_EXTENSION_POINTS,
  RS2_EXTENSION_DEPTH_FRAME, RS2_EXTENSION_ADVANCED_MODE, RS2_EXTENSION_RECORD, RS2_EXTENSION_VIDEO_PROFILE,
  RS2_EXTENSION_PLAYBACK, RS2_EXTENSION_DEPTH_STEREO_SENSOR, RS2_EXTENSION_DISPARITY_FRAME, RS2_EXTENSION_MOTION_PROFILE,
  RS2_EXTENSION_POSE_FRAME, RS2_EXTENSION_POSE_PROFILE, RS2_EXTENSION_TM2, RS2_EXTENSION_SOFTWARE_DEVICE,
  RS2_EXTENSION_SOFTWARE_SENSOR, RS2_EXTENSION_DECIMATION_FILTER, RS2_EXTENSION_THRESHOLD_FILTER, RS2_EXTENSION_DISPARITY_FILTER,
  RS2_EXTENSION_SPATIAL_FILTER, RS2_EXTENSION_TEMPORAL_FILTER, RS2_EXTENSION_HOLE_FILLING_FILTER, RS2_EXTENSION_ZERO_ORDER_FILTER,
  RS2_EXTENSION_RECOMMENDED_FILTERS, RS2_EXTENSION_POSE, RS2_EXTENSION_POSE_SENSOR, RS2_EXTENSION_WHEEL_ODOMETER,
  RS2_EXTENSION_GLOBAL_TIMER, RS2_EXTENSION_UPDATABLE, RS2_EXTENSION_UPDATE_DEVICE, RS2_EXTENSION_L500_DEPTH_SENSOR,
  RS2_EXTENSION_TM2_SENSOR, RS2_EXTENSION_AUTO_CALIBRATED_DEVICE, RS2_EXTENSION_COLOR_SENSOR, RS2_EXTENSION_MOTION_SENSOR,
  RS2_EXTENSION_FISHEYE_SENSOR, RS2_EXTENSION_DEPTH_HUFFMAN_DECODER, RS2_EXTENSION_SERIALIZABLE, RS2_EXTENSION_COUNT
}
 Specifies advanced interfaces (capabilities) objects may implement. More...
 
enum  rs2_matchers {
  RS2_MATCHER_DI, RS2_MATCHER_DI_C, RS2_MATCHER_DLR_C, RS2_MATCHER_DLR,
  RS2_MATCHER_DIC, RS2_MATCHER_DIC_C, RS2_MATCHER_DEFAULT, RS2_MATCHER_COUNT
}
 Specifies types of different matchers. More...
 

Functions

const char * rs2_notification_category_to_string (rs2_notification_category category)
 
const char * rs2_exception_type_to_string (rs2_exception_type type)
 
const char * rs2_distortion_to_string (rs2_distortion distortion)
 
const char * rs2_log_severity_to_string (rs2_log_severity info)
 
const char * rs2_extension_type_to_string (rs2_extension type)
 
const char * rs2_extension_to_string (rs2_extension type)
 
rs2_errorrs2_create_error (const char *what, const char *name, const char *args, rs2_exception_type type)
 
rs2_exception_type rs2_get_librealsense_exception_type (const rs2_error *error)
 
const char * rs2_get_failed_function (const rs2_error *error)
 
const char * rs2_get_failed_args (const rs2_error *error)
 
const char * rs2_get_error_message (const rs2_error *error)
 
void rs2_free_error (rs2_error *error)
 

Detailed Description

Exposes RealSense structs.

Typedef Documentation

◆ rs2_config

typedef struct rs2_config rs2_config

◆ rs2_context

typedef struct rs2_context rs2_context

◆ rs2_device

typedef struct rs2_device rs2_device

◆ rs2_device_hub

◆ rs2_device_info

◆ rs2_device_list

◆ rs2_device_serializer

◆ rs2_devices_changed_callback

◆ rs2_devices_changed_callback_ptr

typedef void(* rs2_devices_changed_callback_ptr) (rs2_device_list *, rs2_device_list *, void *)

◆ rs2_distortion

Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.

◆ rs2_error

typedef struct rs2_error rs2_error

◆ rs2_exception_type

Exception types are the different categories of errors that RealSense API might return.

◆ rs2_extension

Specifies advanced interfaces (capabilities) objects may implement.

◆ rs2_frame

typedef struct rs2_frame rs2_frame

◆ rs2_frame_callback

◆ rs2_frame_callback_ptr

typedef void(* rs2_frame_callback_ptr) (rs2_frame *, void *)

◆ rs2_frame_processor_callback

◆ rs2_frame_processor_callback_ptr

typedef void(* rs2_frame_processor_callback_ptr) (rs2_frame *, rs2_source *, void *)

◆ rs2_frame_queue

◆ rs2_intrinsics

Video stream intrinsics.

◆ rs2_log_callback

◆ rs2_log_callback_ptr

typedef void(* rs2_log_callback_ptr) (rs2_log_severity, rs2_log_message const *, void *arg)

◆ rs2_log_message

◆ rs2_log_severity

Severity of the librealsense logger.

◆ rs2_matchers

typedef enum rs2_matchers rs2_matchers

Specifies types of different matchers.

◆ rs2_metadata_type

typedef long long rs2_metadata_type

Metadata attribute type is defined as 64 bit signed integer

◆ rs2_motion_device_intrinsic

Motion device intrinsics: scale, bias, and variances.

◆ rs2_notification

◆ rs2_notification_callback_ptr

typedef void(* rs2_notification_callback_ptr) (rs2_notification *, void *)

◆ rs2_notification_category

Category of the librealsense notification.

◆ rs2_notifications_callback

◆ rs2_options

typedef struct rs2_options rs2_options

◆ rs2_options_list

◆ rs2_pipeline

typedef struct rs2_pipeline rs2_pipeline

◆ rs2_pipeline_profile

◆ rs2_pixel

typedef struct rs2_pixel rs2_pixel

Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down.

◆ rs2_playback_status_changed_callback

◆ rs2_pose

typedef struct rs2_pose rs2_pose

◆ rs2_processing_block

◆ rs2_processing_block_list

◆ rs2_quaternion

Quaternion used to represent rotation.

◆ rs2_raw_data_buffer

◆ rs2_sensor

typedef struct rs2_sensor rs2_sensor

◆ rs2_sensor_list

◆ rs2_software_device_destruction_callback_ptr

typedef void(* rs2_software_device_destruction_callback_ptr) (void *)

◆ rs2_source

typedef struct rs2_source rs2_source

◆ rs2_stream_profile

◆ rs2_stream_profile_list

◆ rs2_syncer

typedef struct rs2_syncer rs2_syncer

◆ rs2_time_t

typedef double rs2_time_t

Timestamp format. units are milliseconds

◆ rs2_update_progress_callback

◆ rs2_update_progress_callback_ptr

typedef void(* rs2_update_progress_callback_ptr) (const float, void *)

◆ rs2_vector

typedef struct rs2_vector rs2_vector

3D vector in Euclidean coordinate space

◆ rs2_vertex

typedef struct rs2_vertex rs2_vertex

3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from the camera, positive X pointing camera right and positive Y pointing camera down

Enumeration Type Documentation

◆ rs2_distortion

Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.

Enumerator
RS2_DISTORTION_NONE 

Rectilinear images. No distortion compensation required.

RS2_DISTORTION_MODIFIED_BROWN_CONRADY 

Equivalent to Brown-Conrady distortion, except that tangential distortion is applied to radially distorted points

RS2_DISTORTION_INVERSE_BROWN_CONRADY 

Equivalent to Brown-Conrady distortion, except undistorts image instead of distorting it

RS2_DISTORTION_FTHETA 

F-Theta fish-eye distortion model

RS2_DISTORTION_BROWN_CONRADY 

Unmodified Brown-Conrady distortion model

RS2_DISTORTION_KANNALA_BRANDT4 

Four parameter Kannala Brandt distortion model

RS2_DISTORTION_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

◆ rs2_exception_type

Exception types are the different categories of errors that RealSense API might return.

Enumerator
RS2_EXCEPTION_TYPE_UNKNOWN 
RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED 

Device was disconnected, this can be caused by outside intervention, by internal firmware error or due to insufficient power

RS2_EXCEPTION_TYPE_BACKEND 

Error was returned from the underlying OS-specific layer

RS2_EXCEPTION_TYPE_INVALID_VALUE 

Invalid value was passed to the API

RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE 

Function precondition was violated

RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED 

The method is not implemented at this point

RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE 

Device is in recovery mode and might require firmware update

RS2_EXCEPTION_TYPE_IO 

IO Device failure

RS2_EXCEPTION_TYPE_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

◆ rs2_extension

Specifies advanced interfaces (capabilities) objects may implement.

Enumerator
RS2_EXTENSION_UNKNOWN 
RS2_EXTENSION_DEBUG 
RS2_EXTENSION_INFO 
RS2_EXTENSION_MOTION 
RS2_EXTENSION_OPTIONS 
RS2_EXTENSION_VIDEO 
RS2_EXTENSION_ROI 
RS2_EXTENSION_DEPTH_SENSOR 
RS2_EXTENSION_VIDEO_FRAME 
RS2_EXTENSION_MOTION_FRAME 
RS2_EXTENSION_COMPOSITE_FRAME 
RS2_EXTENSION_POINTS 
RS2_EXTENSION_DEPTH_FRAME 
RS2_EXTENSION_ADVANCED_MODE 
RS2_EXTENSION_RECORD 
RS2_EXTENSION_VIDEO_PROFILE 
RS2_EXTENSION_PLAYBACK 
RS2_EXTENSION_DEPTH_STEREO_SENSOR 
RS2_EXTENSION_DISPARITY_FRAME 
RS2_EXTENSION_MOTION_PROFILE 
RS2_EXTENSION_POSE_FRAME 
RS2_EXTENSION_POSE_PROFILE 
RS2_EXTENSION_TM2 
RS2_EXTENSION_SOFTWARE_DEVICE 
RS2_EXTENSION_SOFTWARE_SENSOR 
RS2_EXTENSION_DECIMATION_FILTER 
RS2_EXTENSION_THRESHOLD_FILTER 
RS2_EXTENSION_DISPARITY_FILTER 
RS2_EXTENSION_SPATIAL_FILTER 
RS2_EXTENSION_TEMPORAL_FILTER 
RS2_EXTENSION_HOLE_FILLING_FILTER 
RS2_EXTENSION_ZERO_ORDER_FILTER 
RS2_EXTENSION_RECOMMENDED_FILTERS 
RS2_EXTENSION_POSE 
RS2_EXTENSION_POSE_SENSOR 
RS2_EXTENSION_WHEEL_ODOMETER 
RS2_EXTENSION_GLOBAL_TIMER 
RS2_EXTENSION_UPDATABLE 
RS2_EXTENSION_UPDATE_DEVICE 
RS2_EXTENSION_L500_DEPTH_SENSOR 
RS2_EXTENSION_TM2_SENSOR 
RS2_EXTENSION_AUTO_CALIBRATED_DEVICE 
RS2_EXTENSION_COLOR_SENSOR 
RS2_EXTENSION_MOTION_SENSOR 
RS2_EXTENSION_FISHEYE_SENSOR 
RS2_EXTENSION_DEPTH_HUFFMAN_DECODER 
RS2_EXTENSION_SERIALIZABLE 
RS2_EXTENSION_COUNT 

◆ rs2_log_severity

Severity of the librealsense logger.

Enumerator
RS2_LOG_SEVERITY_DEBUG 

Detailed information about ordinary operations

RS2_LOG_SEVERITY_INFO 

Terse information about ordinary operations

RS2_LOG_SEVERITY_WARN 

Indication of possible failure

RS2_LOG_SEVERITY_ERROR 

Indication of definite failure

RS2_LOG_SEVERITY_FATAL 

Indication of unrecoverable failure

RS2_LOG_SEVERITY_NONE 

No logging will occur

RS2_LOG_SEVERITY_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

RS2_LOG_SEVERITY_ALL 

Include any/all log messages

◆ rs2_matchers

Specifies types of different matchers.

Enumerator
RS2_MATCHER_DI 
RS2_MATCHER_DI_C 
RS2_MATCHER_DLR_C 
RS2_MATCHER_DLR 
RS2_MATCHER_DIC 
RS2_MATCHER_DIC_C 
RS2_MATCHER_DEFAULT 
RS2_MATCHER_COUNT 

◆ rs2_notification_category

Category of the librealsense notification.

Enumerator
RS2_NOTIFICATION_CATEGORY_FRAMES_TIMEOUT 

Frames didn't arrived within 5 seconds

RS2_NOTIFICATION_CATEGORY_FRAME_CORRUPTED 

Received partial/incomplete frame

RS2_NOTIFICATION_CATEGORY_HARDWARE_ERROR 

Error reported from the device

RS2_NOTIFICATION_CATEGORY_HARDWARE_EVENT 

General Hardeware notification that is not an error

RS2_NOTIFICATION_CATEGORY_UNKNOWN_ERROR 

Received unknown error from the device

RS2_NOTIFICATION_CATEGORY_FIRMWARE_UPDATE_RECOMMENDED 

Current firmware version installed is not the latest available

RS2_NOTIFICATION_CATEGORY_POSE_RELOCALIZATION 

A relocalization event has updated the pose provided by a pose sensor

RS2_NOTIFICATION_CATEGORY_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Function Documentation

◆ rs2_create_error()

rs2_error* rs2_create_error ( const char *  what,
const char *  name,
const char *  args,
rs2_exception_type  type 
)

◆ rs2_distortion_to_string()

const char* rs2_distortion_to_string ( rs2_distortion  distortion)

◆ rs2_exception_type_to_string()

const char* rs2_exception_type_to_string ( rs2_exception_type  type)

◆ rs2_extension_to_string()

const char* rs2_extension_to_string ( rs2_extension  type)

◆ rs2_extension_type_to_string()

const char* rs2_extension_type_to_string ( rs2_extension  type)

◆ rs2_free_error()

void rs2_free_error ( rs2_error error)

◆ rs2_get_error_message()

const char* rs2_get_error_message ( const rs2_error error)

◆ rs2_get_failed_args()

const char* rs2_get_failed_args ( const rs2_error error)

◆ rs2_get_failed_function()

const char* rs2_get_failed_function ( const rs2_error error)

◆ rs2_get_librealsense_exception_type()

rs2_exception_type rs2_get_librealsense_exception_type ( const rs2_error error)

◆ rs2_log_severity_to_string()

const char* rs2_log_severity_to_string ( rs2_log_severity  info)

◆ rs2_notification_category_to_string()

const char* rs2_notification_category_to_string ( rs2_notification_category  category)