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

Exposes sensor options functionality for C compilers. More...

#include "rs_types.h"

Go to the source code of this file.

Typedefs

typedef enum rs2_option rs2_option
 Defines general configuration controls. These can generally be mapped to camera UVC controls, and unless stated otherwise, can be set/queried at any time. More...
 
typedef enum rs2_sr300_visual_preset rs2_sr300_visual_preset
 For SR300 devices: provides optimized settings (presets) for specific types of usage. More...
 
typedef enum rs2_rs400_visual_preset rs2_rs400_visual_preset
 For RS400 devices: provides optimized settings (presets) for specific types of usage. More...
 

Enumerations

enum  rs2_option {
  RS2_OPTION_BACKLIGHT_COMPENSATION, RS2_OPTION_BRIGHTNESS, RS2_OPTION_CONTRAST, RS2_OPTION_EXPOSURE,
  RS2_OPTION_GAIN, RS2_OPTION_GAMMA, RS2_OPTION_HUE, RS2_OPTION_SATURATION,
  RS2_OPTION_SHARPNESS, RS2_OPTION_WHITE_BALANCE, RS2_OPTION_ENABLE_AUTO_EXPOSURE, RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE,
  RS2_OPTION_VISUAL_PRESET, RS2_OPTION_LASER_POWER, RS2_OPTION_ACCURACY, RS2_OPTION_MOTION_RANGE,
  RS2_OPTION_FILTER_OPTION, RS2_OPTION_CONFIDENCE_THRESHOLD, RS2_OPTION_EMITTER_ENABLED, RS2_OPTION_FRAMES_QUEUE_SIZE,
  RS2_OPTION_TOTAL_FRAME_DROPS, RS2_OPTION_AUTO_EXPOSURE_MODE, RS2_OPTION_POWER_LINE_FREQUENCY, RS2_OPTION_ASIC_TEMPERATURE,
  RS2_OPTION_ERROR_POLLING_ENABLED, RS2_OPTION_PROJECTOR_TEMPERATURE, RS2_OPTION_OUTPUT_TRIGGER_ENABLED, RS2_OPTION_MOTION_MODULE_TEMPERATURE,
  RS2_OPTION_DEPTH_UNITS, RS2_OPTION_ENABLE_MOTION_CORRECTION, RS2_OPTION_AUTO_EXPOSURE_PRIORITY, RS2_OPTION_COLOR_SCHEME,
  RS2_OPTION_HISTOGRAM_EQUALIZATION_ENABLED, RS2_OPTION_MIN_DISTANCE, RS2_OPTION_MAX_DISTANCE, RS2_OPTION_TEXTURE_SOURCE,
  RS2_OPTION_FILTER_MAGNITUDE, RS2_OPTION_FILTER_SMOOTH_ALPHA, RS2_OPTION_FILTER_SMOOTH_DELTA, RS2_OPTION_HOLES_FILL,
  RS2_OPTION_STEREO_BASELINE, RS2_OPTION_AUTO_EXPOSURE_CONVERGE_STEP, RS2_OPTION_INTER_CAM_SYNC_MODE, RS2_OPTION_COUNT
}
 Defines general configuration controls. These can generally be mapped to camera UVC controls, and unless stated otherwise, can be set/queried at any time. More...
 
enum  rs2_sr300_visual_preset {
  RS2_SR300_VISUAL_PRESET_SHORT_RANGE, RS2_SR300_VISUAL_PRESET_LONG_RANGE, RS2_SR300_VISUAL_PRESET_BACKGROUND_SEGMENTATION, RS2_SR300_VISUAL_PRESET_GESTURE_RECOGNITION,
  RS2_SR300_VISUAL_PRESET_OBJECT_SCANNING, RS2_SR300_VISUAL_PRESET_FACE_ANALYTICS, RS2_SR300_VISUAL_PRESET_FACE_LOGIN, RS2_SR300_VISUAL_PRESET_GR_CURSOR,
  RS2_SR300_VISUAL_PRESET_DEFAULT, RS2_SR300_VISUAL_PRESET_MID_RANGE, RS2_SR300_VISUAL_PRESET_IR_ONLY, RS2_SR300_VISUAL_PRESET_COUNT
}
 For SR300 devices: provides optimized settings (presets) for specific types of usage. More...
 
enum  rs2_rs400_visual_preset {
  RS2_RS400_VISUAL_PRESET_CUSTOM, RS2_RS400_VISUAL_PRESET_DEFAULT, RS2_RS400_VISUAL_PRESET_HAND, RS2_RS400_VISUAL_PRESET_HIGH_ACCURACY,
  RS2_RS400_VISUAL_PRESET_HIGH_DENSITY, RS2_RS400_VISUAL_PRESET_MEDIUM_DENSITY, RS2_RS400_VISUAL_PRESET_REMOVE_IR_PATTERN, RS2_RS400_VISUAL_PRESET_COUNT
}
 For RS400 devices: provides optimized settings (presets) for specific types of usage. More...
 

Functions

const char * rs2_option_to_string (rs2_option option)
 
const char * rs2_sr300_visual_preset_to_string (rs2_sr300_visual_preset preset)
 
const char * rs2_rs400_visual_preset_to_string (rs2_rs400_visual_preset preset)
 
int rs2_is_option_read_only (const rs2_options *options, rs2_option option, rs2_error **error)
 
float rs2_get_option (const rs2_options *options, rs2_option option, rs2_error **error)
 
void rs2_set_option (const rs2_options *options, rs2_option option, float value, rs2_error **error)
 
int rs2_supports_option (const rs2_options *options, rs2_option option, rs2_error **error)
 
void rs2_get_option_range (const rs2_options *sensor, rs2_option option, float *min, float *max, float *step, float *def, rs2_error **error)
 
const char * rs2_get_option_description (const rs2_options *options, rs2_option option, rs2_error **error)
 
const char * rs2_get_option_value_description (const rs2_options *options, rs2_option option, float value, rs2_error **error)
 

Detailed Description

Exposes sensor options functionality for C compilers.

Typedef Documentation

◆ rs2_option

typedef enum rs2_option rs2_option

Defines general configuration controls. These can generally be mapped to camera UVC controls, and unless stated otherwise, can be set/queried at any time.

◆ rs2_rs400_visual_preset

For RS400 devices: provides optimized settings (presets) for specific types of usage.

◆ rs2_sr300_visual_preset

For SR300 devices: provides optimized settings (presets) for specific types of usage.

Enumeration Type Documentation

◆ rs2_option

enum rs2_option

Defines general configuration controls. These can generally be mapped to camera UVC controls, and unless stated otherwise, can be set/queried at any time.

Enumerator
RS2_OPTION_BACKLIGHT_COMPENSATION 

Enable / disable color backlight compensation

RS2_OPTION_BRIGHTNESS 

Color image brightness

RS2_OPTION_CONTRAST 

Color image contrast

RS2_OPTION_EXPOSURE 

Controls exposure time of color camera. Setting any value will disable auto exposure

RS2_OPTION_GAIN 

Color image gain

RS2_OPTION_GAMMA 

Color image gamma setting

RS2_OPTION_HUE 

Color image hue

RS2_OPTION_SATURATION 

Color image saturation setting

RS2_OPTION_SHARPNESS 

Color image sharpness setting

RS2_OPTION_WHITE_BALANCE 

Controls white balance of color image. Setting any value will disable auto white balance

RS2_OPTION_ENABLE_AUTO_EXPOSURE 

Enable / disable color image auto-exposure

RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE 

Enable / disable color image auto-white-balance

RS2_OPTION_VISUAL_PRESET 

Provide access to several recommend sets of option presets for the depth camera

RS2_OPTION_LASER_POWER 

Power of the F200 / SR300 projector, with 0 meaning projector off

RS2_OPTION_ACCURACY 

Set the number of patterns projected per frame. The higher the accuracy value the more patterns projected. Increasing the number of patterns help to achieve better accuracy. Note that this control is affecting the Depth FPS

RS2_OPTION_MOTION_RANGE 

Motion vs. Range trade-off, with lower values allowing for better motion sensitivity and higher values allowing for better depth range

RS2_OPTION_FILTER_OPTION 

Set the filter to apply to each depth frame. Each one of the filter is optimized per the application requirements

RS2_OPTION_CONFIDENCE_THRESHOLD 

The confidence level threshold used by the Depth algorithm pipe to set whether a pixel will get a valid range or will be marked with invalid range

RS2_OPTION_EMITTER_ENABLED 

Laser Emitter enabled

RS2_OPTION_FRAMES_QUEUE_SIZE 

Number of frames the user is allowed to keep per stream. Trying to hold-on to more frames will cause frame-drops.

RS2_OPTION_TOTAL_FRAME_DROPS 

Total number of detected frame drops from all streams

RS2_OPTION_AUTO_EXPOSURE_MODE 

Auto-Exposure modes: Static, Anti-Flicker and Hybrid

RS2_OPTION_POWER_LINE_FREQUENCY 

Power Line Frequency control for anti-flickering Off/50Hz/60Hz/Auto

RS2_OPTION_ASIC_TEMPERATURE 

Current Asic Temperature

RS2_OPTION_ERROR_POLLING_ENABLED 

disable error handling

RS2_OPTION_PROJECTOR_TEMPERATURE 

Current Projector Temperature

RS2_OPTION_OUTPUT_TRIGGER_ENABLED 

Enable / disable trigger to be outputed from the camera to any external device on every depth frame

RS2_OPTION_MOTION_MODULE_TEMPERATURE 

Current Motion-Module Temperature

RS2_OPTION_DEPTH_UNITS 

Number of meters represented by a single depth unit

RS2_OPTION_ENABLE_MOTION_CORRECTION 

Enable/Disable automatic correction of the motion data

RS2_OPTION_AUTO_EXPOSURE_PRIORITY 

Allows sensor to dynamically ajust the frame rate depending on lighting conditions

RS2_OPTION_COLOR_SCHEME 

Color scheme for data visualization

RS2_OPTION_HISTOGRAM_EQUALIZATION_ENABLED 

Perform histogram equalization post-processing on the depth data

RS2_OPTION_MIN_DISTANCE 

Minimal distance to the target

RS2_OPTION_MAX_DISTANCE 

Maximum distance to the target

RS2_OPTION_TEXTURE_SOURCE 

Texture mapping stream unique ID

RS2_OPTION_FILTER_MAGNITUDE 

The 2D-filter effect. The specific interpretation is given within the context of the filter

RS2_OPTION_FILTER_SMOOTH_ALPHA 

2D-filter parameter controls the weight/radius for smoothing.

RS2_OPTION_FILTER_SMOOTH_DELTA 

2D-filter range/validity threshold

RS2_OPTION_HOLES_FILL 

Enhance depth data post-processing with holes filling where appropriate

RS2_OPTION_STEREO_BASELINE 

The distance in mm between the first and the second imagers in stereo-based depth cameras

RS2_OPTION_AUTO_EXPOSURE_CONVERGE_STEP 

Allows dynamically ajust the converge step value of the target exposure in Auto-Exposure algorithm

RS2_OPTION_INTER_CAM_SYNC_MODE 

Impose Inter-camera HW synchronization mode. Applicable for D400/Rolling Shutter SKUs

RS2_OPTION_COUNT 

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

◆ rs2_rs400_visual_preset

For RS400 devices: provides optimized settings (presets) for specific types of usage.

Enumerator
RS2_RS400_VISUAL_PRESET_CUSTOM 
RS2_RS400_VISUAL_PRESET_DEFAULT 
RS2_RS400_VISUAL_PRESET_HAND 
RS2_RS400_VISUAL_PRESET_HIGH_ACCURACY 
RS2_RS400_VISUAL_PRESET_HIGH_DENSITY 
RS2_RS400_VISUAL_PRESET_MEDIUM_DENSITY 
RS2_RS400_VISUAL_PRESET_REMOVE_IR_PATTERN 
RS2_RS400_VISUAL_PRESET_COUNT 

◆ rs2_sr300_visual_preset

For SR300 devices: provides optimized settings (presets) for specific types of usage.

Enumerator
RS2_SR300_VISUAL_PRESET_SHORT_RANGE 

Preset for short range

RS2_SR300_VISUAL_PRESET_LONG_RANGE 

Preset for long range

RS2_SR300_VISUAL_PRESET_BACKGROUND_SEGMENTATION 

Preset for background segmentation

RS2_SR300_VISUAL_PRESET_GESTURE_RECOGNITION 

Preset for gesture recognition

RS2_SR300_VISUAL_PRESET_OBJECT_SCANNING 

Preset for object scanning

RS2_SR300_VISUAL_PRESET_FACE_ANALYTICS 

Preset for face analytics

RS2_SR300_VISUAL_PRESET_FACE_LOGIN 

Preset for face login

RS2_SR300_VISUAL_PRESET_GR_CURSOR 

Preset for GR cursor

RS2_SR300_VISUAL_PRESET_DEFAULT 

Camera default settings

RS2_SR300_VISUAL_PRESET_MID_RANGE 

Preset for mid-range

RS2_SR300_VISUAL_PRESET_IR_ONLY 

Preset for IR only

RS2_SR300_VISUAL_PRESET_COUNT 

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

Function Documentation

◆ rs2_get_option()

float rs2_get_option ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

read option value from the sensor

Parameters
[in]sensorthe RealSense sensor
[in]optionoption id to be queried
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
value of the option

◆ rs2_get_option_description()

const char* rs2_get_option_description ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

get option description

Parameters
[in]sensorthe RealSense sensor
[in]optionoption id to be checked
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
human-readable option description

◆ rs2_get_option_range()

void rs2_get_option_range ( const rs2_options sensor,
rs2_option  option,
float *  min,
float *  max,
float *  step,
float *  def,
rs2_error **  error 
)

retrieve the available range of values of a supported option

Parameters
[in]sensorthe RealSense device
[in]optionthe option whose range should be queried
[out]minthe minimum value which will be accepted for this option
[out]maxthe maximum value which will be accepted for this option
[out]stepthe granularity of options which accept discrete values, or zero if the option accepts continuous values
[out]defthe default value of the option
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

◆ rs2_get_option_value_description()

const char* rs2_get_option_value_description ( const rs2_options options,
rs2_option  option,
float  value,
rs2_error **  error 
)

get option value description (in case specific option value hold special meaning)

Parameters
[in]devicethe RealSense device
[in]optionoption id to be checked
[in]valuevalue of the option
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
human-readable description of a specific value of an option or null if no special meaning

◆ rs2_is_option_read_only()

int rs2_is_option_read_only ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

check if an option is read-only

Parameters
[in]sensorthe RealSense sensor
[in]optionoption id to be checked
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if option is read-only

◆ rs2_option_to_string()

const char* rs2_option_to_string ( rs2_option  option)

◆ rs2_rs400_visual_preset_to_string()

const char* rs2_rs400_visual_preset_to_string ( rs2_rs400_visual_preset  preset)

◆ rs2_set_option()

void rs2_set_option ( const rs2_options options,
rs2_option  option,
float  value,
rs2_error **  error 
)

write new value to sensor option

Parameters
[in]sensorthe RealSense sensor
[in]optionoption id to be queried
[in]valuenew value for the option
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

◆ rs2_sr300_visual_preset_to_string()

const char* rs2_sr300_visual_preset_to_string ( rs2_sr300_visual_preset  preset)

◆ rs2_supports_option()

int rs2_supports_option ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

check if particular option is supported by a subdevice

Parameters
[in]sensorthe RealSense sensor
[in]optionoption id to be checked
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if option is supported