d400-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 "d400-device.h"
7 #include "ds/ds-color-common.h"
8 #include <src/color-sensor.h>
9 
10 #include "stream.h"
11 
12 #include <rsutils/lazy.h>
13 #include <map>
14 
15 namespace librealsense
16 {
17  class d400_color : public virtual d400_device
18  {
19  public:
20  d400_color( std::shared_ptr< const d400_info > const & );
21 
23  {
24  return dynamic_cast<synthetic_sensor&>(get_sensor(_color_device_idx));
25  }
26 
27  std::shared_ptr< uvc_sensor > get_raw_color_sensor()
28  {
30  return std::dynamic_pointer_cast< uvc_sensor >( color_sensor.get_raw_sensor() );
31  }
32 
33  protected:
35 
36  std::shared_ptr<stream_interface> _color_stream;
37  std::shared_ptr<ds_color_common> _ds_color_common;
38 
39  private:
40  void register_options();
42 
43  void register_metadata(const synthetic_sensor& color_ep) const;
44  void register_metadata_mipi(const synthetic_sensor& color_ep) const;
45 
47 
48  void create_color_device(std::shared_ptr<context> ctx,
49  const platform::backend_device_group& group);
50  void init();
51 
52  friend class d400_color_sensor;
53  friend class rs435i_device;
54  friend class ds_color_common;
55 
59  std::shared_ptr< rsutils::lazy< rs2_extrinsics > > _color_extrinsic;
60  };
61 
64  public roi_sensor_base,
65  public color_sensor
66  {
67  public:
68  explicit d400_color_sensor(d400_color* owner,
69  std::shared_ptr<uvc_sensor> uvc_sensor,
70  std::map<uint32_t, rs2_format> d400_color_fourcc_to_rs2_format,
71  std::map<uint32_t, rs2_stream> d400_color_fourcc_to_rs2_stream)
73  _owner(owner)
74  {}
75 
76  rs2_intrinsics get_intrinsics(const stream_profile& profile) const override;
79 
80  protected:
82  };
83 
84 }
librealsense
Definition: algo.h:18
librealsense::d400_color_sensor::get_intrinsics
rs2_intrinsics get_intrinsics(const stream_profile &profile) const override
Definition: d400-color.cpp:344
uint8_t
unsigned char uint8_t
Definition: stdint.h:78
librealsense::d400_color::_ds_color_common
std::shared_ptr< ds_color_common > _ds_color_common
Definition: d400-color.h:37
librealsense::d400_color_fourcc_to_rs2_format
std::map< uint32_t, rs2_format > d400_color_fourcc_to_rs2_format
Definition: d400-color.cpp:23
librealsense::d400_color::_color_device_idx
uint8_t _color_device_idx
Definition: d400-color.h:56
d400-device.h
rsutils::lazy
Definition: lazy.h:16
ds-color-common.h
rs2_intrinsics
Video stream intrinsics.
Definition: rs_types.h:58
librealsense::ds_color_common
Definition: ds-color-common.h:12
librealsense::d400_color::register_stream_to_extrinsic_group
void register_stream_to_extrinsic_group(const stream_interface &stream, uint32_t group_index)
Definition: d400-color.cpp:339
librealsense::d400_color::register_metadata
void register_metadata(const synthetic_sensor &color_ep) const
Definition: d400-color.cpp:197
librealsense::d400_color_sensor
Definition: d400-color.h:62
librealsense::uvc_sensor
Definition: uvc-sensor.h:13
librealsense::d400_color::register_options
void register_options()
Definition: d400-color.cpp:153
librealsense::stream_profile
Definition: core/stream-profile.h:15
librealsense::d400_color::register_processing_blocks
void register_processing_blocks()
Definition: d400-color.cpp:221
librealsense::color_sensor
Definition: color-sensor.h:11
librealsense::platform::backend_device_group
Definition: backend-device-group.h:50
lazy.h
librealsense::d400_color_sensor::get_recommended_processing_blocks
processing_blocks get_recommended_processing_blocks() const override
Definition: d400-color.cpp:383
librealsense::roi_sensor_base
Definition: roi.h:38
librealsense::d400_color::_separate_color
bool _separate_color
Definition: d400-color.h:57
uint32_t
unsigned int uint32_t
Definition: stdint.h:80
librealsense::d400_color_fourcc_to_rs2_stream
std::map< uint32_t, rs2_stream > d400_color_fourcc_to_rs2_stream
Definition: d400-color.cpp:30
librealsense::d400_color::d400_color
d400_color(std::shared_ptr< const d400_info > const &)
Definition: d400-color.cpp:38
librealsense::stream_interface
Definition: stream-interface.h:13
librealsense::d400_color::_color_stream
std::shared_ptr< stream_interface > _color_stream
Definition: d400-color.h:36
librealsense::d400_color::create_color_device
void create_color_device(std::shared_ptr< context > ctx, const platform::backend_device_group &group)
Definition: d400-color.cpp:47
librealsense::synthetic_sensor
Definition: sensor.h:208
librealsense::d400_color_sensor::d400_color_sensor
d400_color_sensor(d400_color *owner, std::shared_ptr< uvc_sensor > uvc_sensor, std::map< uint32_t, rs2_format > d400_color_fourcc_to_rs2_format, std::map< uint32_t, rs2_stream > d400_color_fourcc_to_rs2_stream)
Definition: d400-color.h:68
librealsense::stream
Definition: src/stream.h:30
librealsense::video_sensor_interface
Definition: video.h:11
librealsense::d400_color
Definition: d400-color.h:17
librealsense::stream_profiles
std::vector< std::shared_ptr< stream_profile_interface > > stream_profiles
Definition: stream-profile-interface.h:38
librealsense::d400_color::init
void init()
Definition: d400-color.cpp:132
librealsense::d400_color::get_raw_color_sensor
std::shared_ptr< uvc_sensor > get_raw_color_sensor()
Definition: d400-color.h:27
processing_blocks
Definition: rs-benchmark.cpp:165
librealsense::d400_color_sensor::_owner
const d400_color * _owner
Definition: d400-color.h:81
librealsense::d400_color::_color_extrinsic
std::shared_ptr< rsutils::lazy< rs2_extrinsics > > _color_extrinsic
Definition: d400-color.h:59
test-projection-from-recording.ctx
ctx
Definition: test-projection-from-recording.py:16
librealsense::d400_color::register_color_features
void register_color_features()
Definition: d400-color.cpp:124
librealsense::d400_color::register_metadata_mipi
void register_metadata_mipi(const synthetic_sensor &color_ep) const
Definition: d400-color.cpp:248
librealsense::d400_color_sensor::init_stream_profiles
stream_profiles init_stream_profiles() override
Definition: d400-color.cpp:352
color-sensor.h
librealsense::rs435i_device
Definition: d400-factory.cpp:656
librealsense::d400_color::_color_calib_table_raw
rsutils::lazy< std::vector< uint8_t > > _color_calib_table_raw
Definition: d400-color.h:58
librealsense::device::get_sensor
sensor_interface & get_sensor(size_t subdevice) override
Definition: device.cpp:101
profile
Definition: unit-tests-common.h:58
librealsense::d400_color::get_color_sensor
synthetic_sensor & get_color_sensor()
Definition: d400-color.h:22
librealsense::d400_device
Definition: d400-device.h:26


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:02