Monado OpenXR Runtime
u_autoexpgain.h File Reference

Automatically compute exposure and gain values from an image stream. More...

#include "xrt/xrt_frame.h"
#include <stdint.h>
Include dependency graph for u_autoexpgain.h:

Go to the source code of this file.

Enumerations

enum  u_aeg_strategy { U_AEG_STRATEGY_TRACKING = 0 , U_AEG_STRATEGY_DYNAMIC_RANGE , U_AEG_STRATEGY_COUNT }
 An auto exposure/gain strategy tunes the algorithm for specific objectives. More...
 

Functions

struct u_autoexpgainu_autoexpgain_create (enum u_aeg_strategy strategy, bool enabled_from_start, int frame_delay)
 Create auto exposure and gain (AEG) algorithm object. More...
 
void u_autoexpgain_add_vars (struct u_autoexpgain *aeg, void *root, char *prefix)
 Setup UI for the AEG algorithm. More...
 
void u_autoexpgain_update (struct u_autoexpgain *aeg, struct xrt_frame *xf)
 Update the AEG with a frame. More...
 
float u_autoexpgain_get_exposure (struct u_autoexpgain *aeg)
 Get currently computed exposure value in usecs. More...
 
float u_autoexpgain_get_gain (struct u_autoexpgain *aeg)
 Get currently computed gain value in the [0, 255] range. More...
 
void u_autoexpgain_destroy (struct u_autoexpgain **aeg)
 Destroy AEG object. More...
 

Detailed Description

Automatically compute exposure and gain values from an image stream.

Author
Mateo de Mayo mateo.nosp@m..dem.nosp@m.ayo@c.nosp@m.olla.nosp@m.bora..nosp@m.com

Enumeration Type Documentation

◆ u_aeg_strategy

An auto exposure/gain strategy tunes the algorithm for specific objectives.

Enumerator
U_AEG_STRATEGY_TRACKING 

Lower exposure and gain at the cost of darker images.

U_AEG_STRATEGY_DYNAMIC_RANGE 

Tries to maximize the image information.

Function Documentation

◆ u_autoexpgain_add_vars()

void u_autoexpgain_add_vars ( struct u_autoexpgain aeg,
void *  root,
char *  prefix 
)

Setup UI for the AEG algorithm.

◆ u_autoexpgain_create()

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.

Parameters
strategyWhat objective is preferred for the algorithm.
enabled_from_startUpdate exposure/gain from the start.
frame_delayAbout how many frames does it take for exp and gain to settle in.
Returns
struct u_autoexpgain* Created object

References u_autoexpgain::enable, u_autoexpgain::state, and U_TYPED_CALLOC.

◆ u_autoexpgain_destroy()

void u_autoexpgain_destroy ( struct u_autoexpgain **  aeg)

Destroy AEG object.

◆ u_autoexpgain_get_exposure()

float u_autoexpgain_get_exposure ( struct u_autoexpgain aeg)

Get currently computed exposure value in usecs.

References u_autoexpgain::exposure.

Referenced by update_expgain().

◆ u_autoexpgain_get_gain()

float u_autoexpgain_get_gain ( struct u_autoexpgain aeg)

Get currently computed gain value in the [0, 255] range.

References u_autoexpgain::gain.

Referenced by update_expgain().

◆ u_autoexpgain_update()

void u_autoexpgain_update ( struct u_autoexpgain aeg,
struct xrt_frame xf 
)

Update the AEG with a frame.

Referenced by update_expgain().