4 #define _USE_MATH_DEFINES 18 return{ dims.
x, dims.
y, (c.
Kc[0][2] * 0.5f + 0.5f) * dims.
x, (c.
Kc[1][2] * 0.5f + 0.5f) * dims.
y, c.
Kc[0][0] * 0.5f * dims.
x, c.
Kc[1][1] * 0.5f * dims.
y,
25 if (dims.
x * 3 == dims.
y * 4)
27 intrin.
fx *= 4.0f / 3;
28 intrin.
ppx *= 4.0f / 3;
29 intrin.
ppx -= 1.0f / 6;
40 const std::vector <std::pair<rs_option, char>> options,
41 std::vector<supported_option>& supported_options)
43 for (
auto p : options)
45 int min, max, step, def;
53 supported_options.push_back(so);
59 base_calibration(calib)
80 for (
const auto &
m : selected_modes)
82 for (
const auto & output :
m.get_outputs())
84 fps[output.first] =
m.mode.fps;
85 max_fps = std::max(max_fps,
m.mode.fps);
92 if (fps[
s] == max_fps)
return s;
99 std::vector<rs_option> base_opt;
100 std::vector<double> base_opt_val;
102 for (
size_t i = 0; i <
count; ++i)
128 base_opt.push_back(options[i]); base_opt_val.push_back(values[i]);
break;
133 if (!base_opt.empty())
139 std::vector<rs_option> base_opt;
140 std::vector<size_t> base_opt_index;
141 std::vector<double> base_opt_val;
143 for (
size_t i = 0; i <
count; ++i)
145 LOG_INFO(
"Reading option " << options[i]);
148 throw std::logic_error(
to_string() << __FUNCTION__ <<
" Option " << options[i] <<
" must be processed by a concrete class");
160 base_opt.push_back(options[i]); base_opt_index.push_back(i);
169 base_opt_val.resize(base_opt.size());
174 for (
auto i : base_opt_index)
175 values[i] = base_opt_val[i];
207 int rolling_timestamp = *
reinterpret_cast<const int32_t *
>(frame);
211 last_timestamp = rolling_timestamp;
215 const int delta = rolling_timestamp - last_timestamp;
216 last_timestamp = rolling_timestamp;
218 const int timestamp =
static_cast<int>(total / 100000);
229 auto the_reader = std::make_shared<rolling_timestamp_reader>();
230 return { the_reader, the_reader };
void get_filter_option(const uvc::device &device, uint8_t &filter_option)
iv_camera(std::shared_ptr< uvc::device > device, const static_device_info &info, const ivcam::camera_calib_params &calib)
void get_motion_range(const uvc::device &device, uint8_t &motion_range)
void get_laser_power(const uvc::device &device, uint8_t &laser_power)
virtual void get_options(const rs_option options[], size_t count, double values[]) override
const rsimpl::uvc::device & get_device() const
void update_supported_options(uvc::device &dev, const uvc::extension_unit depth_xu, const std::vector< std::pair< rs_option, char >> options, std::vector< supported_option > &supported_options)
rs_option
Defines general configuration controls.
void set_confidence_threshold(uvc::device &device, uint8_t conf_thresh)
void start_fw_logger(char fw_log_op_code, int grab_rate_in_ms, std::timed_mutex &mutex) override
void get_confidence_threshold(const uvc::device &device, uint8_t &conf_thresh)
void set_laser_power(uvc::device &device, uint8_t laser_power)
const uint8_t RS_STREAM_NATIVE_COUNT
rs_intrinsics MakeDepthIntrinsics(const ivcam::camera_calib_params &c, const int2 &dims)
GLuint GLuint GLsizei count
void get_extension_control_range(const device &device, const extension_unit &xu, char control, int *min, int *max, int *step, int *def)
rs_stream select_key_stream(const std::vector< rsimpl::subdevice_mode_selection > &selected_modes) override
const uvc::extension_unit depth_xu
void get_accuracy(const uvc::device &device, uint8_t &accuracy)
rolling_timestamp_reader()
void set_filter_option(uvc::device &device, uint8_t filter_option)
unsigned long long get_frame_counter(const subdevice_mode &, const void *) override
virtual void disable_auto_option(int subdevice, rs_option auto_opt)
void set_accuracy(uvc::device &device, uint8_t accuracy)
rs_intrinsics MakeColorIntrinsics(const ivcam::camera_calib_params &c, const int2 &dims)
void get_options(const rs_option options[], size_t count, double values[]) override
void set_options(const rs_option options[], size_t count, const double values[]) override
void set_pu_control_with_retry(device &device, int subdevice, rs_option option, int value)
GLenum GLsizei GLsizei GLint * values
void on_before_start(const std::vector< subdevice_mode_selection > &selected_modes) override
rs_stream
Streams are different types of data provided by RealSense devices.
std::vector< std::shared_ptr< frame_timestamp_reader > > create_frame_timestamp_readers() const override
void stop_fw_logger() override
bool is_pu_control(rs_option option)
void set_motion_range(uvc::device &device, uint8_t motion_range)
virtual void set_options(const rs_option options[], size_t count, const double values[]) override
virtual void stop_fw_logger() override
virtual void start_fw_logger(char fw_log_op_code, int grab_rate_in_ms, std::timed_mutex &mutex) override
bool validate_frame(const subdevice_mode &mode, const void *frame) override
double get_frame_timestamp(const subdevice_mode &, const void *frame, double) override