ds5/advanced_mode/advanced_mode.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2017 Intel Corporation. All Rights Reserved.
3 
4 #include "core/advanced_mode.h"
5 #include "ds5/ds5-active.h"
7 #include "json_loader.hpp"
8 #include "ds5/ds5-color.h"
9 
10 namespace librealsense
11 {
12  ds5_advanced_mode_base::ds5_advanced_mode_base(std::shared_ptr<hw_monitor> hwm,
14  : _hw_monitor(hwm),
15  _depth_sensor(depth_sensor),
16  _color_sensor(nullptr)
17  {
18  _enabled = [this]() {
21  return results[4] > 0;
22  };
23  _preset_opt = std::make_shared<advanced_mode_preset_option>(*this,
25  option_range{ 0,
27  1,
29  _depth_sensor.register_option(RS2_OPTION_VISUAL_PRESET, _preset_opt);
30  _color_sensor = [this]() {
31  auto& dev = _depth_sensor.get_device();
32  for (size_t i = 0; i < dev.get_sensors_count(); ++i)
33  {
34  if (auto s = dynamic_cast<const ds5_color_sensor*>(&(dev.get_sensor(i))))
35  {
36  return const_cast<ds5_color_sensor*>(s);
37  }
38  }
39  return (ds5_color_sensor*)nullptr;
40  };
41  _amplitude_factor_support = [this]() {
42  auto fw_ver = firmware_version(_depth_sensor.get_device().get_info(rs2_camera_info::RS2_CAMERA_INFO_FIRMWARE_VERSION));
43  return (fw_ver >= firmware_version("5.11.9.0"));
44  };
45  _rgb_exposure_gain_bind = [this]() {
46  auto fw_ver = firmware_version(_depth_sensor.get_device().get_info(rs2_camera_info::RS2_CAMERA_INFO_FIRMWARE_VERSION));
47  return (fw_ver >= firmware_version("5.11.9.0"));
48  };
49  }
50 
52  {
53  return *_enabled;
54  }
55 
57  {
60  }
61 
62  void ds5_advanced_mode_base::apply_preset(const std::vector<platform::stream_profile>& configuration,
64  const firmware_version& fw_version)
65  {
66  auto p = get_all();
67  auto res = get_res_type(configuration.front().width, configuration.front().height);
68 
69  switch (preset)
70  {
72  switch (device_pid)
73  {
74  case ds::RS410_PID:
75  case ds::RS415_PID:
76  default_410(p);
77  break;
78  case ds::RS430_PID:
79  case ds::RS430I_PID:
80  case ds::RS435_RGB_PID:
81  case ds::RS435I_PID:
82  case ds::RS465_PID:
83  case ds::RS405_PID:
84  case ds::RS455_PID:
85  default_430(p);
86  break;
87  case ds::RS405U_PID:
88  default_405(p);
89  break;
90  case ds::RS400_PID:
91  default_400(p);
92  break;
93  case ds::RS420_PID:
94  default_420(p);
95  break;
96  default:
97  throw invalid_value_exception(to_string() << "apply_preset(...) failed! Given device doesn't support Default Preset (pid=0x" <<
98  std::hex << device_pid << ")");
99  break;
100  }
101  break;
103  hand_gesture(p);
104  break;
106  switch (res)
107  {
108  case low_resolution:
110  break;
111  case medium_resolution:
113  break;
114  case high_resolution:
116  break;
117  }
118  break;
120  switch (res)
121  {
122  case low_resolution:
124  break;
125  case medium_resolution:
127  break;
128  case high_resolution:
130  break;
131  }
132  break;
134  switch (res)
135  {
136  case low_resolution:
138  break;
139  case medium_resolution:
141  break;
142  case high_resolution:
144  break;
145  }
146  break;
148  {
149  static const firmware_version remove_ir_pattern_fw_ver{ "5.9.10.0" };
150  if (fw_version < remove_ir_pattern_fw_ver)
151  throw invalid_value_exception(to_string() << "apply_preset(...) failed! FW version doesn't support Remove IR Pattern Preset (curr_fw_ver=" <<
152  fw_version << " ; required_fw_ver=" << remove_ir_pattern_fw_ver << ")");
153 
154  switch (device_pid)
155  {
156  case ds::RS400_PID:
157  case ds::RS410_PID:
158  case ds::RS415_PID:
159  case ds::RS465_PID://TODO: verify
160  d415_remove_ir(p);
161  break;
162  case ds::RS460_PID:
163  d460_remove_ir(p);
164  break;
165  default:
166  throw invalid_value_exception(to_string() << "apply_preset(...) failed! Given device doesn't support Remove IR Pattern Preset (pid=0x" <<
167  std::hex << device_pid << ")");
168  break;
169  }
170  }
171  break;
172  default:
173  throw invalid_value_exception(to_string() << "apply_preset(...) failed! Invalid preset! (" << preset << ")");
174  }
175  set_all(p);
176  }
177 
179  {
180  *ptr = get<STDepthControlGroup>(advanced_mode_traits<STDepthControlGroup>::group, nullptr, mode);
181  }
182 
184  {
185  *ptr = get<STRsm>(advanced_mode_traits<STRsm>::group, nullptr, mode);
186  }
187 
189  {
190  *ptr = get<STRauSupportVectorControl>(advanced_mode_traits<STRauSupportVectorControl>::group, nullptr, mode);
191  }
192 
194  {
195  *ptr = get<STColorControl>(advanced_mode_traits<STColorControl>::group, nullptr, mode);
196  }
197 
199  {
200  *ptr = get<STRauColorThresholdsControl>(advanced_mode_traits<STRauColorThresholdsControl>::group, nullptr, mode);
201  }
202 
204  {
205  *ptr = get<STSloColorThresholdsControl>(advanced_mode_traits<STSloColorThresholdsControl>::group, nullptr, mode);
206  }
207 
209  {
210  *ptr = get<STSloPenaltyControl>(advanced_mode_traits<STSloPenaltyControl>::group, nullptr, mode);
211  }
212 
214  {
215  *ptr = get<STHdad>(advanced_mode_traits<STHdad>::group, nullptr, mode);
216  }
217 
219  {
220  *ptr = get<STColorCorrection>(advanced_mode_traits<STColorCorrection>::group, nullptr, mode);
221  }
222 
224  {
225  *ptr = get<STDepthTableControl>(advanced_mode_traits<STDepthTableControl>::group, nullptr, mode);
226  }
227 
229  {
230  *ptr = get<STAEControl>(advanced_mode_traits<STAEControl>::group, nullptr, mode);
231  }
232 
234  {
235  *ptr = get<STCensusRadius>(advanced_mode_traits<STCensusRadius>::group, nullptr, mode);
236  }
237 
239  {
240  *ptr = *_amplitude_factor_support ? get<STAFactor>(advanced_mode_traits<STAFactor>::group, nullptr, mode) :
241  []() { STAFactor af; af.amplitude = 0.f; return af; }();
242  }
243 
245  {
246  return sensor.supports_option(opt);
247  }
248 
250  {
252  {
254  ptr->was_set = true;
255  }
256  }
257 
259  {
261  {
263  ptr->was_set = true;
264  }
265  }
266 
268  {
270  {
271  ptr->exposure = sensor.get_option(RS2_OPTION_EXPOSURE).query();
272  ptr->was_set = true;
273  }
274  }
275 
277  {
279  {
280  ptr->auto_exposure = static_cast<int>(sensor.get_option(RS2_OPTION_ENABLE_AUTO_EXPOSURE).query());
281  ptr->was_set = true;
282  }
283  }
284 
286  {
288  }
289 
291  {
293  }
294 
296  {
298  {
300  ptr->was_set = true;
301  }
302  }
303 
305  {
307  {
309  ptr->was_set = true;
310  }
311  }
312 
314  {
315  if (*_color_sensor)
316  {
317  get_exposure(**_color_sensor, ptr);
318  }
319  }
320 
322  {
323  if (*_color_sensor)
324  {
326  }
327  }
328 
330  {
332  {
333  ptr->backlight_compensation = static_cast<int>((*_color_sensor)->get_option(RS2_OPTION_BACKLIGHT_COMPENSATION).query());
334  ptr->was_set = true;
335  }
336  }
337 
339  {
341  {
342  ptr->brightness = (*_color_sensor)->get_option(RS2_OPTION_BRIGHTNESS).query();
343  ptr->was_set = true;
344  }
345  }
346 
348  {
350  {
351  ptr->contrast = (*_color_sensor)->get_option(RS2_OPTION_CONTRAST).query();
352  ptr->was_set = true;
353  }
354  }
355 
357  {
359  {
360  ptr->gain = (*_color_sensor)->get_option(RS2_OPTION_GAIN).query();
361  ptr->was_set = true;
362  }
363  }
364 
366  {
368  {
369  ptr->gamma = (*_color_sensor)->get_option(RS2_OPTION_GAMMA).query();
370  ptr->was_set = true;
371  }
372  }
373 
375  {
377  {
378  ptr->hue = (*_color_sensor)->get_option(RS2_OPTION_HUE).query();
379  ptr->was_set = true;
380  }
381  }
382 
384  {
386  {
387  ptr->saturation = (*_color_sensor)->get_option(RS2_OPTION_SATURATION).query();
388  ptr->was_set = true;
389  }
390  }
391 
393  {
395  {
396  ptr->sharpness = (*_color_sensor)->get_option(RS2_OPTION_SHARPNESS).query();
397  ptr->was_set = true;
398  }
399  }
400 
402  {
404  {
405  ptr->white_balance = (*_color_sensor)->get_option(RS2_OPTION_WHITE_BALANCE).query();
406  ptr->was_set = true;
407  }
408  }
409 
411  {
413  {
414  ptr->auto_white_balance = static_cast<int>((*_color_sensor)->get_option(RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE).query());
415  ptr->was_set = true;
416  }
417  }
418 
420  {
422  {
423  ptr->power_line_frequency = static_cast<int>((*_color_sensor)->get_option(RS2_OPTION_POWER_LINE_FREQUENCY).query());
424  ptr->was_set = true;
425  }
426  }
427 
429  {
432  }
433 
435  {
438  }
439 
441  {
444  }
445 
447  {
450  }
451 
453  {
456  }
457 
459  {
462  }
463 
465  {
468  }
469 
471  {
474  }
475 
477  {
480  }
481 
483  {
486  }
487 
489  {
492  }
493 
495  {
498  }
499 
501  {
503  {
506  }
507  }
508 
510  {
511  if (val.was_set)
513  }
514 
516  {
517  if (val.was_set)
519  }
520 
522  {
524  }
525 
527  {
529  }
530 
532  {
533  if (val.was_set)
535  }
536 
538  {
539  if (val.was_set)
541  }
542 
544  {
545  if (val.was_set)
547  }
548 
550  {
551  if (val.was_set)
553  }
554 
556  {
557  if (val.was_set && !*_color_sensor)
558  throw invalid_value_exception("Can't set color_exposure value! Color sensor not found.");
559 
560  if (val.was_set)
561  set_exposure(**_color_sensor, val);
562  }
563 
565  {
566  if (val.was_set && !*_color_sensor)
567  throw invalid_value_exception("Can't set color_auto_exposure value! Color sensor not found.");
568 
569  if (val.was_set)
571  }
572 
574  {
575  if (val.was_set && !*_color_sensor)
576  throw invalid_value_exception("Can't set color_backlight_compensation value! Color sensor not found.");
577 
578  if (val.was_set)
579  (*_color_sensor)->get_option(RS2_OPTION_BACKLIGHT_COMPENSATION).set((float)val.backlight_compensation);
580  }
581 
583  {
584  if (val.was_set && !*_color_sensor)
585  throw invalid_value_exception("Can't set color_brightness value! Color sensor not found.");
586 
587  if (val.was_set)
588  (*_color_sensor)->get_option(RS2_OPTION_BRIGHTNESS).set(val.brightness);
589  }
590 
592  {
593  if (val.was_set && !*_color_sensor)
594  throw invalid_value_exception("Can't set color_contrast value! Color sensor not found.");
595 
596  if (val.was_set)
597  (*_color_sensor)->get_option(RS2_OPTION_CONTRAST).set(val.contrast);
598  }
599 
601  {
602  if (val.was_set && !*_color_sensor)
603  throw invalid_value_exception("Can't set color_gain value! Color sensor not found.");
604 
605  if (val.was_set)
606  (*_color_sensor)->get_option(RS2_OPTION_GAIN).set(val.gain);
607  }
608 
610  {
611  if (val.was_set && !*_color_sensor)
612  throw invalid_value_exception("Can't set color_gamma value! Color sensor not found.");
613 
614  if (val.was_set)
615  (*_color_sensor)->get_option(RS2_OPTION_GAMMA).set(val.gamma);
616  }
617 
619  {
620  if (val.was_set && !*_color_sensor)
621  throw invalid_value_exception("Can't set color_hue value! Color sensor not found.");
622 
623  if (val.was_set)
624  (*_color_sensor)->get_option(RS2_OPTION_HUE).set(val.hue);
625  }
626 
628  {
629  if (val.was_set && !*_color_sensor)
630  throw invalid_value_exception("Can't set color_saturation value! Color sensor not found.");
631 
632  if (val.was_set)
633  (*_color_sensor)->get_option(RS2_OPTION_SATURATION).set(val.saturation);
634  }
635 
637  {
638  if (val.was_set && !*_color_sensor)
639  throw invalid_value_exception("Can't set color_sharpness value! Color sensor not found.");
640 
641  if (val.was_set)
642  (*_color_sensor)->get_option(RS2_OPTION_SHARPNESS).set(val.sharpness);
643  }
644 
646  {
647  if (val.was_set && !*_color_sensor)
648  throw invalid_value_exception("Can't set color_white_balance value! Color sensor not found.");
649 
650  if (val.was_set)
651  (*_color_sensor)->get_option(RS2_OPTION_WHITE_BALANCE).set(val.white_balance);
652  }
653 
655  {
656  if (val.was_set && !*_color_sensor)
657  throw invalid_value_exception("Can't set color_auto_white_balance value! Color sensor not found.");
658 
659  if (val.was_set)
660  (*_color_sensor)->get_option(RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE).set((float)val.auto_white_balance);
661  }
662 
664  {
665  if (val.was_set && !*_color_sensor)
666  throw invalid_value_exception("Can't set color_power_line_frequency value! Color sensor not found.");
667 
668  if (val.was_set)
669  (*_color_sensor)->get_option(RS2_OPTION_POWER_LINE_FREQUENCY).set((float)val.power_line_frequency);
670  }
671 
672  std::vector<uint8_t> ds5_advanced_mode_base::serialize_json() const
673  {
674  if (!is_enabled())
675  throw wrong_api_call_sequence_exception(to_string() << "serialize_json() failed! Device is not in Advanced-Mode.");
676 
677  auto p = get_all();
678  return generate_json(p);
679  }
680 
682  {
683  if (!is_enabled())
684  throw wrong_api_call_sequence_exception(to_string() << "load_json(...) failed! Device is not in Advanced-Mode.");
685 
686  auto p = get_all();
687  update_structs(json_content, p);
688  set_all(p);
690  }
691 
693  {
694  preset p;
696  get_rsm(&p.rsm);
702  get_hdad(&p.hdad);
705  get_ae_control(&p.ae);
727  return p;
728  }
729 
731  {
740 
741  // Setting auto-white-balance control before colorCorrection parameters
744 
750 
752  if (p.laser_state.was_set && p.laser_state.laser_state == 1) // 1 - on
754 
757  {
760  }
761 
764  {
767  }
768 
776 
780 
781  // TODO: W/O due to a FW bug of power_line_frequency control on Windows OS
782  //set_color_power_line_frequency(p.color_power_line_frequency);
783  }
784 
785  std::vector<uint8_t> ds5_advanced_mode_base::send_receive(const std::vector<uint8_t>& input) const
786  {
787  auto res = _hw_monitor->send(input);
788  if (res.empty())
789  {
790  throw std::runtime_error("Advanced mode write failed!");
791  }
792  return res;
793  }
794 
796  {
797  return (c0 << 24) | (c1 << 16) | (c2 << 8) | c3;
798  }
799 
800  std::vector<uint8_t> ds5_advanced_mode_base::assert_no_error(ds::fw_cmd opcode, const std::vector<uint8_t>& results)
801  {
802  if (results.size() < sizeof(uint32_t)) throw std::runtime_error("Incomplete operation result!");
803  auto opCodeAsUint32 = pack(results[3], results[2], results[1], results[0]);
804  if (opCodeAsUint32 != static_cast<uint32_t>(opcode))
805  {
806  std::stringstream ss;
807  ss << "Operation failed with error code=" << static_cast<int>(opCodeAsUint32);
808  throw std::runtime_error(ss.str());
809  }
810  std::vector<uint8_t> result;
811  result.resize(results.size() - sizeof(uint32_t));
812  std::copy(results.data() + sizeof(uint32_t),
813  results.data() + results.size(), result.data());
814  return result;
815  }
816 
818  uint32_t p1,
819  uint32_t p2,
820  uint32_t p3,
821  uint32_t p4,
822  std::vector<uint8_t> data) const
823  {
824  std::vector<uint8_t> raw_data;
825  auto cmd_op_code = static_cast<uint32_t>(opcode);
826 
827  const uint16_t pre_header_data = 0xcdab;
828  raw_data.resize(HW_MONITOR_BUFFER_SIZE);
829  auto write_ptr = raw_data.data();
830  auto header_size = 4;
831 
832  size_t cur_index = 2;
833  *reinterpret_cast<uint16_t *>(write_ptr + cur_index) = pre_header_data;
834  cur_index += sizeof(uint16_t);
835  *reinterpret_cast<unsigned int *>(write_ptr + cur_index) = cmd_op_code;
836  cur_index += sizeof(unsigned int);
837 
838  // Parameters
839  *reinterpret_cast<unsigned*>(write_ptr + cur_index) = p1;
840  cur_index += sizeof(unsigned);
841  *reinterpret_cast<unsigned*>(write_ptr + cur_index) = p2;
842  cur_index += sizeof(unsigned);
843  *reinterpret_cast<unsigned*>(write_ptr + cur_index) = p3;
844  cur_index += sizeof(unsigned);
845  *reinterpret_cast<unsigned*>(write_ptr + cur_index) = p4;
846  cur_index += sizeof(unsigned);
847 
848  // Data
849  std::copy(data.begin(), data.end(), reinterpret_cast<uint8_t*>(write_ptr + cur_index));
850  cur_index += data.size();
851 
852  *reinterpret_cast<uint16_t*>(raw_data.data()) = static_cast<uint16_t>(cur_index - header_size);// Length doesn't include hdr.
853  raw_data.resize(cur_index);
854  return raw_data;
855  }
856 
858  synthetic_sensor& ep, const option_range& opt_range)
859  : option_base(opt_range),
860  _ep(ep),
861  _advanced(advanced),
862  _last_preset(RS2_RS400_VISUAL_PRESET_CUSTOM)
863  {
864  _ep.register_on_open([this](std::vector<platform::stream_profile> configurations) {
865  std::lock_guard<std::mutex> lock(_mtx);
866  auto uvc_sen = As<uvc_sensor, sensor_base>(_ep.get_raw_sensor());
868  _advanced.apply_preset(configurations, _last_preset, get_device_pid(*uvc_sen), get_firmware_version(*uvc_sen));
869  });
870  }
871 
873  {
874  return (static_cast<rs2_rs400_visual_preset>((int)x));
875  }
876 
878  {
879  std::lock_guard<std::mutex> lock(_mtx);
880  if (!is_valid(value))
881  throw invalid_value_exception(to_string() << "set(advanced_mode_preset_option) failed! Given value " << value << " is out of range.");
882 
883  if (!_advanced.is_enabled())
884  throw wrong_api_call_sequence_exception(to_string() << "set(advanced_mode_preset_option) failed! Device is not in Advanced-Mode.");
885 
886  auto preset = to_preset(value);
888  {
890  return;
891  }
892 
893  auto uvc_sen = As<uvc_sensor, sensor_base>(_ep.get_raw_sensor());
894  auto configurations = uvc_sen->get_configuration();
895  _advanced.apply_preset(configurations, preset, get_device_pid(*uvc_sen), get_firmware_version(*uvc_sen));
897  _recording_function(*this);
898  }
899 
901  {
902  return static_cast<float>(_last_preset);
903  }
904 
906  {
907  return true;
908  }
909 
911  {
912  return "Advanced-Mode Preset";
913  }
914 
916  {
917  try {
919  }
920  catch (std::out_of_range)
921  {
922  throw invalid_value_exception(to_string() << "advanced_mode_preset: get_value_description(...) failed! Description of value " << val << " is not found.");
923  }
924  }
925 
927  {
928  auto str_pid = sensor.get_info(RS2_CAMERA_INFO_PRODUCT_ID);
929  uint16_t device_pid{};
930  std::stringstream ss;
931  ss << std::hex << str_pid;
932  ss >> device_pid;
933  return device_pid;
934  }
935 
937  {
939  }
940 }
void get_depth_table_control(STDepthTableControl *ptr, int mode=0) const override
void set_color_saturation(const saturation_control &val)
static const textual_icon lock
Definition: model-views.h:218
void default_400(preset &p)
Definition: presets.cpp:8
void set_depth_table_control(const STDepthTableControl &val) override
void d460_remove_ir(preset &p)
Definition: presets.cpp:839
void default_430(preset &p)
Definition: presets.cpp:284
void set_color_correction(const STColorCorrection &val) override
void set_laser_state(const laser_state_control &val)
static const uint16_t HW_MONITOR_BUFFER_SIZE
void get_depth_exposure(exposure_control *ptr) const
ds5_advanced_mode_base(std::shared_ptr< hw_monitor > hwm, synthetic_sensor &depth_sensor)
std::vector< uint8_t > serialize_json() const override
void get_color_saturation(saturation_control *ptr) const
exposure_control color_exposure
Definition: presets.h:119
static std::vector< uint8_t > assert_no_error(ds::fw_cmd opcode, const std::vector< uint8_t > &results)
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
Definition: rs_option.h:22
STColorControl color_control
Definition: presets.h:103
GLdouble s
void get_slo_penalty_control(STSloPenaltyControl *ptr, int mode=0) const override
virtual void set(float value)=0
laser_power_control laser_power
Definition: presets.h:114
void high_res_high_accuracy(preset &p)
Definition: presets.cpp:353
const char * get_value_description(float val) const override
GLfloat GLfloat p
Definition: glext.h:12687
void get_depth_auto_white_balance(auto_white_balance_control *ptr) const
void get_laser_state(laser_state_control *ptr) const
std::shared_ptr< sensor_base > get_raw_sensor() const
Definition: sensor.h:218
void load_json(const std::string &json_content) override
std::vector< uint8_t > generate_json(const preset &in_preset)
STSloColorThresholdsControl sctc
Definition: presets.h:105
const uint16_t RS415_PID
Definition: ds5-private.h:27
void get_depth_control_group(STDepthControlGroup *ptr, int mode=0) const override
auto_white_balance_control depth_auto_white_balance
Definition: presets.h:118
auto_exposure_control color_auto_exposure
Definition: presets.h:120
GLfloat value
std::shared_ptr< hw_monitor > _hw_monitor
STDepthControlGroup depth_controls
Definition: presets.h:100
const uint16_t RS460_PID
Definition: ds5-private.h:39
STCensusRadius census
Definition: presets.h:111
lazy< ds5_color_sensor * > _color_sensor
const uint16_t RS435_RGB_PID
Definition: ds5-private.h:40
void get_depth_auto_exposure(auto_exposure_control *ptr) const
void get_color_sharpness(sharpness_control *ptr) const
bool supports_option(rs2_option id) const override
Definition: options.h:51
STAEControl ae
Definition: presets.h:110
unsigned short uint16_t
Definition: stdint.h:79
GLsizei const GLchar *const * string
void mid_res_high_density(preset &p)
Definition: presets.cpp:676
void set_amp_factor(const STAFactor &val) override
void set_census_radius(const STCensusRadius &val) override
unsigned char uint8_t
Definition: stdint.h:78
std::shared_ptr< advanced_mode_preset_option > _preset_opt
void get_exposure(synthetic_sensor &sensor, exposure_control *ptr) const
option & get_option(rs2_option id) override
Definition: options.h:58
virtual float query() const =0
gain_control color_gain
Definition: presets.h:124
gain_control depth_gain
Definition: presets.h:117
void set_laser_power(const laser_power_control &val)
void set_auto_exposure(synthetic_sensor &sensor, const auto_exposure_control &val)
GLuint GLfloat * val
void high_res_mid_density(preset &p)
Definition: presets.cpp:443
void get_auto_exposure(synthetic_sensor &sensor, auto_exposure_control *ptr) const
void set_color_control(const STColorControl &val) override
void hand_gesture(preset &p)
Definition: presets.cpp:770
void get_ae_control(STAEControl *ptr, int mode=0) const override
static rs2_rs400_visual_preset to_preset(float x)
void low_res_mid_density(preset &p)
Definition: presets.cpp:582
const uint16_t RS405U_PID
Definition: ds5-private.h:41
void set_depth_exposure(const exposure_control &val)
void update_structs(const std::string &content, preset &in_preset)
GLenum mode
laser_state_control laser_state
Definition: presets.h:113
void get_laser_power(laser_power_control *ptr) const
void set_slo_penalty_control(const STSloPenaltyControl &val) override
const uint16_t RS455_PID
Definition: ds5-private.h:48
void d415_remove_ir(preset &p)
Definition: presets.cpp:823
sharpness_control color_sharpness
Definition: presets.h:128
brightness_control color_brightness
Definition: presets.h:122
void low_res_high_density(preset &p)
Definition: presets.cpp:535
const uint16_t RS410_PID
Definition: ds5-private.h:26
void get_color_auto_white_balance(auto_white_balance_control *ptr) const
std::vector< uint8_t > encode_command(ds::fw_cmd opcode, uint32_t p1=0, uint32_t p2=0, uint32_t p3=0, uint32_t p4=0, std::vector< uint8_t > data=std::vector< uint8_t >()) const
auto_exposure_control depth_auto_exposure
Definition: presets.h:116
white_balance_control color_white_balance
Definition: presets.h:129
GLdouble x
STSloPenaltyControl spc
Definition: presets.h:106
unsigned int uint32_t
Definition: stdint.h:80
STAFactor amplitude_factor
Definition: presets.h:112
void set_color_brightness(const brightness_control &val)
const std::string & get_info(rs2_camera_info info) const override
Definition: sensor.cpp:49
void set_exposure(synthetic_sensor &sensor, const exposure_control &val)
void high_res_high_density(preset &p)
Definition: presets.cpp:398
STRauSupportVectorControl rsvc
Definition: presets.h:102
void get_color_backlight_compensation(backlight_compensation_control *ptr) const
void set_depth_auto_exposure(const auto_exposure_control &val)
void get_color_white_balance(white_balance_control *ptr) const
const uint16_t RS420_PID
Definition: ds5-private.h:34
void get_color_exposure(exposure_control *ptr) const
hue_control color_hue
Definition: presets.h:126
void get_color_brightness(brightness_control *ptr) const
void get_amp_factor(STAFactor *ptr, int mode=0) const override
gamma_control color_gamma
Definition: presets.h:125
void default_410(preset &p)
Definition: presets.cpp:146
void set_rau_support_vector_control(const STRauSupportVectorControl &val) override
std::vector< std::pair< stream_profile, frame_callback > > configurations
Definition: recorder.h:485
bool is_streaming() const override
Definition: sensor.cpp:1619
auto_white_balance_control color_auto_white_balance
Definition: presets.h:130
void set_ae_control(const STAEControl &val) override
void get_rau_support_vector_control(STRauSupportVectorControl *ptr, int mode=0) const override
void get_color_power_line_frequency(power_line_frequency_control *ptr) const
std::function< void(const option &)> _recording_function
Definition: option.h:100
void get_color_contrast(contrast_control *ptr) const
void get_color_correction(STColorCorrection *ptr, int mode=0) const override
firmware_version get_firmware_version(const uvc_sensor &sensor) const
advanced_mode_preset_option(ds5_advanced_mode_base &advanced, synthetic_sensor &ep, const option_range &opt_range)
const uint16_t RS430_PID
Definition: ds5-private.h:28
void set_color_white_balance(const white_balance_control &val)
static uint32_t pack(uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3)
void set_depth_control_group(const STDepthControlGroup &val) override
const uint16_t RS435I_PID
Definition: ds5-private.h:42
void get_census_radius(STCensusRadius *ptr, int mode=0) const override
std::vector< uint8_t > send_receive(const std::vector< uint8_t > &input) const
STDepthTableControl depth_table
Definition: presets.h:109
GLboolean enable
Definition: glext.h:5688
GLenum GLenum GLenum input
Definition: glext.h:10805
bool supports_option(const synthetic_sensor &sensor, rs2_option opt) const
contrast_control color_contrast
Definition: presets.h:123
void register_on_open(on_open callback)
Definition: sensor.h:67
void mid_res_high_accuracy(preset &p)
Definition: presets.cpp:629
rs2_rs400_visual_preset
For RS400 devices: provides optimized settings (presets) for specific types of usage.
Definition: rs_option.h:137
void get_hdad(STHdad *ptr, int mode=0) const override
void set_color_power_line_frequency(const power_line_frequency_control &val)
void default_420(preset &p)
Definition: presets.cpp:216
exposure_control depth_exposure
Definition: presets.h:115
saturation_control color_saturation
Definition: presets.h:127
void set_color_exposure(const exposure_control &val)
STColorCorrection cc
Definition: presets.h:108
void set_color_contrast(const contrast_control &val)
backlight_compensation_control color_backlight_compensation
Definition: presets.h:121
int i
GLuint res
Definition: glext.h:8856
void set_depth_auto_white_balance(const auto_white_balance_control &val)
void set_color_auto_exposure(const auto_exposure_control &val)
void get_rsm(STRsm *ptr, int mode=0) const override
const char * rs2_rs400_visual_preset_to_string(rs2_rs400_visual_preset preset)
void default_405(preset &p)
Definition: presets.cpp:76
void mid_res_mid_density(preset &p)
Definition: presets.cpp:723
void get_slo_color_thresholds_control(STSloColorThresholdsControl *ptr, int mode=0) const override
void low_res_high_accuracy(preset &p)
Definition: presets.cpp:488
power_line_frequency_control color_power_line_frequency
Definition: presets.h:131
const uint16_t RS465_PID
Definition: ds5-private.h:45
bool is_valid(float value) const
Definition: option.cpp:6
void set_rau_color_thresholds_control(const STRauColorThresholdsControl &val) override
const uint16_t RS400_PID
Definition: ds5-private.h:25
GLuint64EXT * result
Definition: glext.h:10921
void set_color_auto_white_balance(const auto_white_balance_control &val)
void get_color_auto_exposure(auto_exposure_control *ptr) const
const uint16_t RS430I_PID
Definition: ds5-private.h:44
void get_color_control(STColorControl *ptr, int mode=0) const override
void set_slo_color_thresholds_control(const STSloColorThresholdsControl &val) override
void set_color_sharpness(const sharpness_control &val)
STRauColorThresholdsControl rctc
Definition: presets.h:104
Definition: parser.hpp:150
void set_color_backlight_compensation(const backlight_compensation_control &val)
void copy(void *dst, void const *src, size_t size)
Definition: types.cpp:836
const uint16_t RS405_PID
Definition: ds5-private.h:47
res_type get_res_type(uint32_t width, uint32_t height)
Definition: src/types.h:1926
uint16_t get_device_pid(const uvc_sensor &sensor) const
void apply_preset(const std::vector< platform::stream_profile > &configuration, rs2_rs400_visual_preset preset, uint16_t device_pid, const firmware_version &fw_version) override
std::string to_string(T value)
void get_rau_color_thresholds_control(STRauColorThresholdsControl *ptr, int mode=0) const override


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:45:06