20#define U_AEG_MAX_STEPS 16
59 bool enabled_from_start,
These are steps for constructing a piecewise linear function that maps brightness into (exposure,...
Definition u_autoexpgain.h:35
float exposure
Must be set such that pixel brightness increases with brightness, ideally linearly.
Definition u_autoexpgain.h:37
float brightness
Must be between 0 and 1.
Definition u_autoexpgain.h:36
float gain
Must be set such that pixel brightness increases with brightness, ideally linearly.
Definition u_autoexpgain.h:38
Auto exposure and gain (AEG) adjustment algorithm state.
Definition u_autoexpgain.c:68
enum u_aeg_strategy strategy
The selected strategy affects various targets of the algorithm.
Definition u_autoexpgain.c:86
int frame_delay
A camera might take a couple of frames until the new exposure/gain sets in the image.
Definition u_autoexpgain.c:112
struct u_aeg_step steps[U_AEG_MAX_STEPS]
Custom exp/gain table, used instead of the strategy's default when not empty.
Definition u_autoexpgain.c:118
Basic frame data structure - holds a pointer to buffer.
Definition xrt_frame.h:25
u_aeg_strategy
An auto exposure/gain strategy tunes the algorithm for specific objectives.
Definition u_autoexpgain.h:24
@ U_AEG_STRATEGY_TRACKING
Lower exposure and gain at the cost of darker images.
Definition u_autoexpgain.h:25
@ U_AEG_STRATEGY_DYNAMIC_RANGE
Tries to maximize the image information.
Definition u_autoexpgain.h:26
float u_autoexpgain_get_exposure(struct u_autoexpgain *aeg)
Get currently computed exposure value in usecs.
Definition u_autoexpgain.c:522
void u_autoexpgain_add_vars(struct u_autoexpgain *aeg, void *root, char *prefix)
Setup UI for the AEG algorithm.
Definition u_autoexpgain.c:477
float u_autoexpgain_get_gain(struct u_autoexpgain *aeg)
Get currently computed gain value.
Definition u_autoexpgain.c:528
void u_autoexpgain_destroy(struct u_autoexpgain **aeg)
Destroy AEG object.
Definition u_autoexpgain.c:534
struct u_autoexpgain * u_autoexpgain_create(enum u_aeg_strategy strategy, bool enabled_from_start, int frame_delay)
Create auto exposure and gain (AEG) algorithm object.
Definition u_autoexpgain.c:421
struct u_autoexpgain * u_autoexpgain_create_with_steps(enum u_aeg_strategy strategy, bool enabled_from_start, int frame_delay, const struct u_aeg_step *steps, int step_count)
Create auto exposure and gain (AEG) algorithm object.
Definition u_autoexpgain.c:454
void u_autoexpgain_update(struct u_autoexpgain *aeg, struct xrt_frame *xf)
Update the AEG with a frame.
Definition u_autoexpgain.c:515