Class AutoExposure
Defined in File image_processing.h
Class Documentation
-
class AutoExposure
Adjusts brightness to between 0 and 1 using a simple auto-exposure method.
Works with 1 or 3 channel images. For 3 channel images it applies autoexposure in luminance space to keep colors consistent.
Public Functions
-
AutoExposure()
Default constructor using default percentile and update values.
-
AutoExposure(int update_every)
Constructor specifying update modulo, and using default percentiles.
- Parameters:
update_every[in] – update every this number of frames.
-
AutoExposure(double lo_percentile, double hi_percentile, int update_every)
Constructor specifying low and high percentiles, and update modulo.
- Parameters:
lo_percentile[in] – low percentile to use for adjustment.
hi_percentile[in] – high percentile to use for adjustment.
update_every[in] – update every this number of frames.
-
void update(Eigen::Ref<img_t<float>> image, bool update_state = true)
Scales the image so that contrast is stretched between 0 and 1.
The top percentile is 1 - hi_percentile and the bottom percentile is lo_percentile. Similar to linear ‘contrast-stretch’, i.e. normalization.
- Parameters:
image[in] – Reference to the image, modified in place.
update_state[in] – Update lo/hi percentiles if true.
-
void update(Eigen::Ref<img_t<double>> image, bool update_state = true)
Scales the image so that contrast is stretched between 0 and 1.
The top percentile is 1 - hi_percentile and the bottom percentile is lo_percentile. Similar to linear ‘contrast-stretch’, i.e. normalization.
- Parameters:
image[in] – Reference to the image, modified in place.
update_state[in] – Update lo/hi percentiles if true.
-
void update(Eigen::TensorMap<rgb_img_t<float>> image, bool update_state = true)
Apply global RGB auto-exposure in-place stretching constrast between 0 and 1.
- Parameters:
image[in] – RGB image tensor (H x W x 3), modified in-place.
update_state[in] – Update lo/hi luminance percentiles if true.
-
void update(Eigen::TensorMap<rgb_img_t<double>> image, bool update_state = true)
Apply global RGB auto-exposure in-place stretching constrast between 0 and 1.
- Parameters:
image[in] – RGB image tensor (H x W x 3), modified in-place.
update_state[in] – Update lo/hi luminance percentiles if true.
-
void update(Eigen::TensorMap<const rgb_img_t<ouster::sdk::core::float16_t>> input, Eigen::TensorMap<rgb_img_t<float>> out, bool update_state = true)
Convert fp16-bit RGB to float and apply global RGB auto-exposure stretching constrast between 0 and 1.
- Parameters:
input[in] – input RGB image tensor (H x W x 3) as float16_t.
out[out] – output RGB image tensor (H x W x 3) as float.
update_state[in] – Update lo/hi luminance percentiles if true.
-
AutoExposure()