Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bebop_ae_awb.c File Reference
+ Include dependency graph for bebop_ae_awb.c:

Go to the source code of this file.

Macros

#define MAX_HIST_Y   255
 
#define MIN_HIST_Y   1
 
#define BEBOP_AE_AWB_CAMERA   front_camera
 
#define BEBOP_AE_AWB_VERBOSE   0
 
#define PRINT(string,...)   fprintf(stderr, "[bebop_ae_awb->%s()] " string,__FUNCTION__ , ##__VA_ARGS__)
 
#define VERBOSE_PRINT(...)
 
#define BEBOP_AE_AWB_NICE   5
 
#define BEBOP_AUTO_EXPOSURE   true
 
#define BEBOP_AE_EXPOSURE_GAIN   0.8
 
#define BEBOP_AE_MIDDLE_INDEX   180
 
#define BEBOP_AE_DARK_IGNORE   0.4
 
#define BEBOP_AE_BRIGHT_IGNORE   0.2
 
#define BEBOP_AE_DARK_BINS   80
 
#define BEBOP_AE_BRIGHT_BINS   20
 
#define BEBOP_AUTO_WHITE_BALANCE   true
 
#define BEBOP_AWB_MIN_GAINS   1.0
 
#define BEBOP_AWB_MAX_GAINS   63.5
 
#define BEBOP_AWB_GAIN   0.25
 
#define BEBOP_AWB_GAIN_SCHEDULING   false
 
#define BEBOP_AWB_GAIN_SCHEDULING_TARGET   10.0
 
#define BEBOP_AWB_GAIN_SCHEDULING_TOLERANCE   7.5
 
#define BEBOP_AWB_GAIN_SCHEDULING_STEP   0.02
 
#define BEBOP_AWB_MIN_GREY_PIXELS   1000
 

Functions

static void bebop_awb_reset (void)
 
static void bebop_ae_reset (void)
 
static struct image_tupdate_ae_awb (struct image_t *img)
 
void bebop_ae_awb_init (void)
 

Variables

struct ae_setting_t ae_set
 
struct awb_setting_t awb_set
 

Detailed Description

Author
Freek van Tienen, Kirk Scheper Auto exposure and Auto white balancing for the Bebop 1 and 2

Definition in file bebop_ae_awb.c.

Macro Definition Documentation

#define BEBOP_AE_AWB_CAMERA   front_camera

Definition at line 36 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AE_AWB_NICE   5

Definition at line 56 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AE_AWB_VERBOSE   0

Definition at line 41 of file bebop_ae_awb.c.

#define BEBOP_AE_BRIGHT_BINS   20

Definition at line 95 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AE_BRIGHT_IGNORE   0.2

Definition at line 83 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AE_DARK_BINS   80

Definition at line 89 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AE_DARK_IGNORE   0.4

Definition at line 77 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AE_EXPOSURE_GAIN   0.8

Definition at line 65 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AE_MIDDLE_INDEX   180

Definition at line 71 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AUTO_EXPOSURE   true

Definition at line 60 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AUTO_WHITE_BALANCE   true

Definition at line 100 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AWB_GAIN   0.25

Definition at line 117 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AWB_GAIN_SCHEDULING   false

Definition at line 123 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AWB_GAIN_SCHEDULING_STEP   0.02

Definition at line 141 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AWB_GAIN_SCHEDULING_TARGET   10.0

Definition at line 129 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AWB_GAIN_SCHEDULING_TOLERANCE   7.5

Definition at line 135 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init().

#define BEBOP_AWB_MAX_GAINS   63.5

Definition at line 111 of file bebop_ae_awb.c.

Referenced by update_ae_awb().

#define BEBOP_AWB_MIN_GAINS   1.0

Definition at line 105 of file bebop_ae_awb.c.

Referenced by update_ae_awb().

#define BEBOP_AWB_MIN_GREY_PIXELS   1000

Definition at line 147 of file bebop_ae_awb.c.

Referenced by update_ae_awb().

#define MAX_HIST_Y   255

Definition at line 32 of file bebop_ae_awb.c.

Referenced by update_ae_awb().

#define MIN_HIST_Y   1

Definition at line 33 of file bebop_ae_awb.c.

Referenced by update_ae_awb().

#define PRINT (   string,
  ... 
)    fprintf(stderr, "[bebop_ae_awb->%s()] " string,__FUNCTION__ , ##__VA_ARGS__)

Definition at line 45 of file bebop_ae_awb.c.

#define VERBOSE_PRINT (   ...)

Definition at line 51 of file bebop_ae_awb.c.

Referenced by update_ae_awb().

Function Documentation

static void bebop_ae_reset ( void  )
static

Definition at line 164 of file bebop_ae_awb.c.

References mt9f002, mt9f002_set_exposure(), MT9F002_TARGET_EXPOSURE, and mt9f002_t::target_exposure.

Referenced by bebop_ae_awb_init(), and update_ae_awb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void bebop_awb_reset ( void  )
static

Definition at line 154 of file bebop_ae_awb.c.

References mt9f002_t::gain_blue, mt9f002_t::gain_green1, mt9f002_t::gain_green2, mt9f002_t::gain_red, mt9f002, MT9F002_GAIN_BLUE, MT9F002_GAIN_GREEN1, MT9F002_GAIN_GREEN2, MT9F002_GAIN_RED, and mt9f002_set_gains().

Referenced by bebop_ae_awb_init(), and update_ae_awb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct ae_setting_t ae_set

Definition at line 151 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init(), and update_ae_awb().

struct awb_setting_t awb_set

Definition at line 152 of file bebop_ae_awb.c.

Referenced by bebop_ae_awb_init(), and update_ae_awb().