OpenFFmpeg
Classes | Macros | Typedefs
vf_colorconstancy.c File Reference

Color Constancy filter. More...

#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include <math.h>

Classes

struct  ThreadData
 Used for passing data between threads. More...
 
struct  ColorConstancyContext
 Common struct for all algorithms contexts. More...
 

Macros

#define GREY_EDGE   "greyedge"
 
#define SQRT3   1.73205080757
 
#define NUM_PLANES   3
 
#define MAX_DIFF_ORD   2
 
#define MAX_META_DATA   4
 
#define MAX_DATA   4
 
#define INDEX_TEMP   0
 
#define INDEX_DX   1
 
#define INDEX_DY   2
 
#define INDEX_DXY   3
 
#define INDEX_NORM   INDEX_DX
 
#define INDEX_SRC   0
 
#define INDEX_DST   1
 
#define INDEX_ORD   2
 
#define INDEX_DIR   3
 
#define DIR_X   0
 
#define DIR_Y   1
 
#define OFFSET(x)   offsetof(ColorConstancyContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define GINDX(s, i)   ( (i) - ((s) >> 2) )
 
#define CLAMP(x, mx)   av_clip((x), 0, (mx-1))
 
#define INDX2D(r, c, w)   ( (r) * (w) + (c) )
 
#define GAUSS(s, sr, sc, sls, sh, sw, g)   ( (s)[ INDX2D(CLAMP((sr), (sh)), CLAMP((sc), (sw)), (sls)) ] * (g) )
 

Typedefs

typedef struct ThreadData ThreadData
 Used for passing data between threads.
 
typedef struct ColorConstancyContext ColorConstancyContext
 Common struct for all algorithms contexts.
 

Detailed Description

Color Constancy filter.

See also
http://colorconstancy.com/

[J]. van de Weijer, Th. Gevers, A. Gijsenij "Edge-Based Color Constancy".