src
proc
auto-exposure-processor.cpp
Go to the documentation of this file.
1
// License: Apache 2.0. See LICENSE file in root directory.
2
// Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3
4
#include "
auto-exposure-processor.h
"
5
#include <
src/frame.h
>
6
7
librealsense::auto_exposure_processor::auto_exposure_processor
(
rs2_stream
stream
,
enable_auto_exposure_option
& enable_ae_option)
8
:
auto_exposure_processor
(
"Auto Exposure Processor"
,
stream
, enable_ae_option) {}
9
10
librealsense::auto_exposure_processor::auto_exposure_processor
(
const
char
*
name
,
rs2_stream
stream
,
enable_auto_exposure_option
& enable_ae_option)
11
:
generic_processing_block
(
name
),
12
_stream(
stream
),
13
_enable_ae_option(enable_ae_option) {}
14
15
bool
librealsense::auto_exposure_processor::should_process
(
const
rs2::frame
&
frame
)
16
{
17
return
_enable_ae_option.to_add_frames() && _stream ==
RS2_STREAM_FISHEYE
;
18
}
19
20
rs2::frame
librealsense::auto_exposure_processor::process_frame
(
const
rs2::frame_source
&
source
,
const
rs2::frame
&
f
)
21
{
22
// We dont actually modify the frame, only calculate and process the exposure values.
23
auto
&& fi = (
frame_interface
*)
f
.
get
();
24
((
librealsense::frame
*)fi)->additional_data.fisheye_ae_mode =
true
;
25
26
fi->acquire();
27
auto
&&
auto_exposure
= _enable_ae_option.get_auto_exposure();
28
if
(
auto_exposure
)
29
auto_exposure
->add_frame(fi);
30
31
return
f
;
32
}
librealsense::auto_exposure_processor::should_process
bool should_process(const rs2::frame &frame) override
Definition:
auto-exposure-processor.cpp:15
rs2::frame
Definition:
rs_frame.hpp:345
rs2::frame_source
Definition:
rs_processing.hpp:18
librealsense::enable_auto_exposure_option
Definition:
ds-options.h:62
librealsense::auto_exposure_processor::process_frame
rs2::frame process_frame(const rs2::frame_source &source, const rs2::frame &f) override
Definition:
auto-exposure-processor.cpp:20
RS2_STREAM_FISHEYE
@ RS2_STREAM_FISHEYE
Definition:
rs_sensor.h:49
librealsense::frame_interface
Definition:
frame-interface.h:20
librealsense::auto_exposure_processor
Definition:
auto-exposure-processor.h:13
rs2::frame::get
rs2_frame * get() const
Definition:
rs_frame.hpp:592
f
GLdouble f
Definition:
glad/glad/glad.h:1517
name
GLuint const GLchar * name
Definition:
glad/glad/glad.h:2777
frame.h
source
GLsizei GLsizei GLchar * source
Definition:
glad/glad/glad.h:2828
librealsense::stream
Definition:
src/stream.h:30
librealsense::frame
Definition:
frame.h:19
librealsense::legacy_file_format::auto_exposure
constexpr uint32_t auto_exposure
Definition:
ros_file_format.h:644
auto-exposure-processor.h
librealsense::generic_processing_block
Definition:
synthetic-stream.h:71
librealsense::auto_exposure_processor::auto_exposure_processor
auto_exposure_processor(rs2_stream stream, enable_auto_exposure_option &enable_ae_option)
Definition:
auto-exposure-processor.cpp:7
rs2_stream
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition:
rs_sensor.h:43
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:00