ds5-color.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "ds5-device.h"
7 
8 #include <map>
9 
10 #include "stream.h"
11 
12 namespace librealsense
13 {
14  class ds5_color : public virtual ds5_device
15  {
16  public:
17  ds5_color(std::shared_ptr<context> ctx,
19 
21  {
22  return dynamic_cast<synthetic_sensor&>(get_sensor(_color_device_idx));
23  }
24 
26  {
28  return dynamic_cast<uvc_sensor&>(*color_sensor.get_raw_sensor());
29  }
30 
31  protected:
32  std::shared_ptr<stream_interface> _color_stream;
33 
34  private:
35  void create_color_device(std::shared_ptr<context> ctx,
36  const platform::backend_device_group& group);
37  void init();
38 
39  friend class ds5_color_sensor;
40  friend class rs435i_device;
41 
45  std::shared_ptr<lazy<rs2_extrinsics>> _color_extrinsic;
46  };
47 
50  public roi_sensor_base,
51  public color_sensor
52  {
53  public:
54  explicit ds5_color_sensor(ds5_color* owner,
55  std::shared_ptr<uvc_sensor> uvc_sensor,
56  std::map<uint32_t, rs2_format> ds5_color_fourcc_to_rs2_format,
57  std::map<uint32_t, rs2_stream> ds5_color_fourcc_to_rs2_stream)
58  : synthetic_sensor("RGB Camera", uvc_sensor, owner, ds5_color_fourcc_to_rs2_format, ds5_color_fourcc_to_rs2_stream),
59  _owner(owner)
60  {}
61 
62  rs2_intrinsics get_intrinsics(const stream_profile& profile) const override;
64  processing_blocks get_recommended_processing_blocks() const override;
65 
66  protected:
67  const ds5_color* _owner;
68  };
69 
70 }
synthetic_sensor & get_color_sensor()
Definition: ds5-color.h:20
std::shared_ptr< lazy< rs2_extrinsics > > _color_extrinsic
Definition: ds5-color.h:45
std::shared_ptr< stream_interface > _color_stream
Definition: ds5-color.h:32
std::map< uint32_t, rs2_format > ds5_color_fourcc_to_rs2_format
Definition: ds5-color.cpp:14
std::shared_ptr< sensor_base > get_raw_sensor() const
Definition: sensor.h:218
uvc_sensor & get_raw_color_sensor()
Definition: ds5-color.h:25
unsigned char uint8_t
Definition: stdint.h:78
ds5_color(std::shared_ptr< context > ctx, const platform::backend_device_group &group)
Definition: ds5-color.cpp:29
void create_color_device(std::shared_ptr< context > ctx, const platform::backend_device_group &group)
Definition: ds5-color.cpp:39
std::vector< rs2::stream_profile > init_stream_profiles(sw_context &sctx, std::shared_ptr< rs2::software_sensor > ss, std::string sensor_name, rs2::video_stream_profile c, rs2::video_stream_profile d)
GLboolean GLuint group
Definition: glext.h:5688
lazy< std::vector< uint8_t > > _color_calib_table_raw
Definition: ds5-color.h:44
std::map< uint32_t, rs2_stream > ds5_color_fourcc_to_rs2_stream
Definition: ds5-color.cpp:21
std::vector< std::shared_ptr< stream_profile_interface >> stream_profiles
Definition: streaming.h:165
sensor_interface & get_sensor(size_t subdevice) override
Definition: device.cpp:187
const ds5_color * _owner
Definition: ds5-color.h:67
Video stream intrinsics.
Definition: rs_types.h:58
ds5_color_sensor(ds5_color *owner, std::shared_ptr< uvc_sensor > uvc_sensor, std::map< uint32_t, rs2_format > ds5_color_fourcc_to_rs2_format, std::map< uint32_t, rs2_stream > ds5_color_fourcc_to_rs2_stream)
Definition: ds5-color.h:54


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