Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
librealsense::auto_exposure_algorithm Class Reference

#include <algo.h>

Classes

struct  histogram_metric
 

Public Member Functions

bool analyze_image (const frame_interface *image)
 
 auto_exposure_algorithm (const auto_exposure_state &auto_exposure_state)
 
void modify_exposure (float &exposure_value, bool &exp_modified, float &gain_value, bool &gain_modified)
 
void update_options (const auto_exposure_state &options)
 
void update_roi (const region_of_interest &ae_roi)
 

Private Types

enum  rounding_mode_type { rounding_mode_type::round, rounding_mode_type::ceil, rounding_mode_type::floor }
 

Private Member Functions

void anti_flicker_decrease_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 
void anti_flicker_increase_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 
void decrease_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 
void decrease_exposure_target (float mult, float &target_exposure)
 
float exposure_to_value (float exp_ms, rounding_mode_type rounding_mode)
 
float gain_to_value (float gain, rounding_mode_type rounding_mode)
 
void histogram_score (std::vector< int > &h, const int total_weight, histogram_metric &score)
 
void hybrid_decrease_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 
void hybrid_increase_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 
void im_hist (const uint8_t *data, const region_of_interest &image_roi, const int rowStep, int h[])
 
void increase_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 
void increase_exposure_target (float mult, float &target_exposure)
 
float round (float x)
 
template<typename T >
sqr (const T &x)
 
void static_decrease_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 
void static_increase_exposure_gain (const float &target_exposure, const float &target_exposure0, float &exposure, float &gain)
 

Private Attributes

bool anti_flicker_mode = true
 
float base_gain = 2.0f
 
int direction = 0
 
float eps = 0.01f
 
float exposure = 10.0f
 
std::atomic< float > exposure_step
 
float flicker_cycle
 
float gain = 2.0f
 
float gain_limit = 15.0f
 
float hysteresis = 0.075f
 
bool is_roi_initialized = false
 
float maximal_exposure = 20.f
 
float minimal_exposure = 0.2f
 
uint8_t over_exposure_limit = 250
 
int over_exposure_noise_limit = 50
 
int prev_direction = 0
 
region_of_interest roi {}
 
auto_exposure_state state
 
std::recursive_mutex state_mutex
 
float target_exposure = 0.0f
 
uint8_t under_exposure_limit = 5
 
int under_exposure_noise_limit = 50
 

Detailed Description

Definition at line 57 of file algo.h.

Member Enumeration Documentation

Enumerator
round 
ceil 
floor 

Definition at line 67 of file algo.h.

Constructor & Destructor Documentation

auto_exposure_algorithm::auto_exposure_algorithm ( const auto_exposure_state auto_exposure_state)

Definition at line 167 of file algo.cpp.

Member Function Documentation

bool auto_exposure_algorithm::analyze_image ( const frame_interface image)

Definition at line 220 of file algo.cpp.

void auto_exposure_algorithm::anti_flicker_decrease_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 378 of file algo.cpp.

void auto_exposure_algorithm::anti_flicker_increase_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 352 of file algo.cpp.

void auto_exposure_algorithm::decrease_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 331 of file algo.cpp.

void auto_exposure_algorithm::decrease_exposure_target ( float  mult,
float &  target_exposure 
)
private

Definition at line 315 of file algo.cpp.

float auto_exposure_algorithm::exposure_to_value ( float  exp_ms,
rounding_mode_type  rounding_mode 
)
private

Definition at line 443 of file algo.cpp.

float auto_exposure_algorithm::gain_to_value ( float  gain,
rounding_mode_type  rounding_mode 
)
private

Definition at line 454 of file algo.cpp.

void auto_exposure_algorithm::histogram_score ( std::vector< int > &  h,
const int  total_weight,
histogram_metric score 
)
private

Definition at line 467 of file algo.cpp.

void auto_exposure_algorithm::hybrid_decrease_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 421 of file algo.cpp.

void auto_exposure_algorithm::hybrid_increase_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 403 of file algo.cpp.

void auto_exposure_algorithm::im_hist ( const uint8_t data,
const region_of_interest image_roi,
const int  rowStep,
int  h[] 
)
inlineprivate

Definition at line 297 of file algo.cpp.

void auto_exposure_algorithm::increase_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 320 of file algo.cpp.

void auto_exposure_algorithm::increase_exposure_target ( float  mult,
float &  target_exposure 
)
private

Definition at line 310 of file algo.cpp.

void auto_exposure_algorithm::modify_exposure ( float &  exposure_value,
bool &  exp_modified,
float &  gain_value,
bool &  gain_modified 
)

Definition at line 173 of file algo.cpp.

float librealsense::auto_exposure_algorithm::round ( float  x)
inlineprivate

Definition at line 84 of file algo.h.

template<typename T >
T librealsense::auto_exposure_algorithm::sqr ( const T &  x)
inlineprivate

Definition at line 89 of file algo.h.

void auto_exposure_algorithm::static_decrease_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 347 of file algo.cpp.

void auto_exposure_algorithm::static_increase_exposure_gain ( const float &  target_exposure,
const float &  target_exposure0,
float &  exposure,
float &  gain 
)
private

Definition at line 342 of file algo.cpp.

void auto_exposure_algorithm::update_options ( const auto_exposure_state options)

Definition at line 281 of file algo.cpp.

void auto_exposure_algorithm::update_roi ( const region_of_interest ae_roi)

Definition at line 290 of file algo.cpp.

Member Data Documentation

bool librealsense::auto_exposure_algorithm::anti_flicker_mode = true
private

Definition at line 99 of file algo.h.

float librealsense::auto_exposure_algorithm::base_gain = 2.0f
private

Definition at line 93 of file algo.h.

int librealsense::auto_exposure_algorithm::direction = 0
private

Definition at line 96 of file algo.h.

float librealsense::auto_exposure_algorithm::eps = 0.01f
private

Definition at line 97 of file algo.h.

float librealsense::auto_exposure_algorithm::exposure = 10.0f
private

Definition at line 94 of file algo.h.

std::atomic<float> librealsense::auto_exposure_algorithm::exposure_step
private

Definition at line 98 of file algo.h.

float librealsense::auto_exposure_algorithm::flicker_cycle
private

Definition at line 99 of file algo.h.

float librealsense::auto_exposure_algorithm::gain = 2.0f
private

Definition at line 94 of file algo.h.

float librealsense::auto_exposure_algorithm::gain_limit = 15.0f
private

Definition at line 93 of file algo.h.

float librealsense::auto_exposure_algorithm::hysteresis = 0.075f
private

Definition at line 96 of file algo.h.

bool librealsense::auto_exposure_algorithm::is_roi_initialized = false
private

Definition at line 101 of file algo.h.

float librealsense::auto_exposure_algorithm::maximal_exposure = 20.f
private

Definition at line 93 of file algo.h.

float librealsense::auto_exposure_algorithm::minimal_exposure = 0.2f
private

Definition at line 93 of file algo.h.

uint8_t librealsense::auto_exposure_algorithm::over_exposure_limit = 250
private

Definition at line 95 of file algo.h.

int librealsense::auto_exposure_algorithm::over_exposure_noise_limit = 50
private

Definition at line 95 of file algo.h.

int librealsense::auto_exposure_algorithm::prev_direction = 0
private

Definition at line 96 of file algo.h.

region_of_interest librealsense::auto_exposure_algorithm::roi {}
private

Definition at line 100 of file algo.h.

auto_exposure_state librealsense::auto_exposure_algorithm::state
private

Definition at line 99 of file algo.h.

std::recursive_mutex librealsense::auto_exposure_algorithm::state_mutex
private

Definition at line 102 of file algo.h.

float librealsense::auto_exposure_algorithm::target_exposure = 0.0f
private

Definition at line 94 of file algo.h.

uint8_t librealsense::auto_exposure_algorithm::under_exposure_limit = 5
private

Definition at line 95 of file algo.h.

int librealsense::auto_exposure_algorithm::under_exposure_noise_limit = 50
private

Definition at line 95 of file algo.h.


The documentation for this class was generated from the following files:


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