Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
#include "bebop_ae_awb.h"
#include "boards/bebop.h"
#include "boards/bebop/mt9f002.h"
#include "lib/isp/libisp.h"
#include "modules/computer_vision/cv.h"
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_t * | update_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 |
Definition in file bebop_ae_awb.c.
#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().
void bebop_ae_awb_init | ( | void | ) |
Definition at line 357 of file bebop_ae_awb.c.
References ae_setting_t::active, awb_setting_t::active, ae_set, awb_set, BEBOP_AE_AWB_CAMERA, BEBOP_AE_AWB_NICE, BEBOP_AE_BRIGHT_BINS, BEBOP_AE_BRIGHT_IGNORE, BEBOP_AE_DARK_BINS, BEBOP_AE_DARK_IGNORE, BEBOP_AE_EXPOSURE_GAIN, BEBOP_AE_MIDDLE_INDEX, bebop_ae_reset(), BEBOP_AUTO_EXPOSURE, BEBOP_AUTO_WHITE_BALANCE, BEBOP_AWB_GAIN, BEBOP_AWB_GAIN_SCHEDULING, BEBOP_AWB_GAIN_SCHEDULING_STEP, BEBOP_AWB_GAIN_SCHEDULING_TARGET, BEBOP_AWB_GAIN_SCHEDULING_TOLERANCE, bebop_awb_reset(), ae_setting_t::bright_bins, ae_setting_t::bright_ignore, cv_add_to_device_async(), ae_setting_t::dark_bins, ae_setting_t::dark_ignore, ae_setting_t::exposure_gain, awb_setting_t::gain, awb_setting_t::gain_scheduling, awb_setting_t::gain_scheduling_step, awb_setting_t::gain_scheduling_target, awb_setting_t::gain_scheduling_tolerance, ae_setting_t::middle_index, ae_setting_t::prev_active, awb_setting_t::prev_active, and update_ae_awb().
|
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().
|
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().
Definition at line 170 of file bebop_ae_awb.c.
References ae_setting_t::active, awb_setting_t::active, isp_yuv_stats_t::ae_histogram_Y, ae_set, isp_yuv_stats_t::awb_nb_grey_pixels, awb_set, isp_yuv_stats_t::awb_sum_U, isp_yuv_stats_t::awb_sum_V, isp_yuv_stats_t::awb_sum_Y, bebop_ae_reset(), BEBOP_AWB_MAX_GAINS, BEBOP_AWB_MIN_GAINS, BEBOP_AWB_MIN_GREY_PIXELS, bebop_awb_reset(), ae_setting_t::bright_bins, ae_setting_t::bright_ignore, ae_setting_t::dark_bins, ae_setting_t::dark_ignore, ae_setting_t::exposure_gain, awb_setting_t::gain, mt9f002_t::gain_blue, mt9f002_t::gain_green1, mt9f002_t::gain_green2, mt9f002_t::gain_red, awb_setting_t::gain_scheduling, awb_setting_t::gain_scheduling_step, awb_setting_t::gain_scheduling_target, awb_setting_t::gain_scheduling_tolerance, isp_get_statistics_yuv(), MAX_HIST_Y, ae_setting_t::middle_index, MIN_HIST_Y, mt9f002, mt9f002_set_exposure(), mt9f002_set_gains(), isp_yuv_stats_t::nb_valid_Y, image_t::pprz_ts, ae_setting_t::prev_active, awb_setting_t::prev_active, mt9f002_t::real_exposure, mt9f002_t::target_exposure, and VERBOSE_PRINT.
Referenced by bebop_ae_awb_init().
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().