Skip to content
Permalink
Browse files

avfilter: Add colorconstancy filter

Signed-off-by: Mina <minasamy_@hotmail.com>
  • Loading branch information...
MinaBombo authored and thiloborgmann committed Jul 16, 2018
1 parent d134b8d commit 0bb5cd8c4d566d38d6f056fb13eba3a0a5c4d211
Showing with 803 additions and 0 deletions.
  1. +1 −0 Changelog
  2. +1 −0 MAINTAINERS
  3. +41 −0 doc/filters.texi
  4. +1 −0 libavfilter/Makefile
  5. +1 −0 libavfilter/allfilters.c
  6. +758 −0 libavfilter/vf_colorconstancy.c
@@ -15,6 +15,7 @@ version <next>:
- vc1 decoder is now bit-exact
- ATRAC9 decoder
- lensfun wrapper filter
- colorconstancy filter


version 4.0:
@@ -332,6 +332,7 @@ Filters:
vf_bwdif Thomas Mundt (CC <thomas.mundt@hr.de>)
vf_chromakey.c Timo Rothenpieler
vf_colorchannelmixer.c Paul B Mahol
vf_colorconstancy.c Mina Sami (CC <minas.gorgy@gmail.com>)
vf_colorbalance.c Paul B Mahol
vf_colorkey.c Timo Rothenpieler
vf_colorlevels.c Paul B Mahol
@@ -9940,6 +9940,47 @@ gradfun=radius=8

@end itemize

@section greyedge
A color constancy variation filter which estimates scene illumination via grey edge algorithm
and corrects the scene colors accordingly.

See: @url{https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf}

The filter accepts the following options:

@table @option
@item difford
The order of differentiation to be applied on the scene. Must be chosen in the range
[0,2] and default value is 1.

@item minknorm
The Minkowski parameter to be used for calculating the Minkowski distance. Must
be chosen in the range [0,65535] and default value is 1. Set to 0 for getting
max value instead of calculating Minkowski distance.

@item sigma
The standard deviation of Gaussian blur to be applied on the scene. Must be
chosen in the range [0,1024.0] and default value = 1. Sigma can't be set to 0
if @var{difford} is greater than 0.
@end table

@subsection Examples
@itemize

@item
Grey Edge:
@example
greyedge=difford=1:minknorm=5:sigma=2
@end example

@item
Max Edge:
@example
greyedge=difford=1:minknorm=0:sigma=2
@end example

@end itemize

@anchor{haldclut}
@section haldclut

@@ -228,6 +228,7 @@ OBJS-$(CONFIG_FSPP_FILTER) += vf_fspp.o
OBJS-$(CONFIG_GBLUR_FILTER) += vf_gblur.o
OBJS-$(CONFIG_GEQ_FILTER) += vf_geq.o
OBJS-$(CONFIG_GRADFUN_FILTER) += vf_gradfun.o
OBJS-$(CONFIG_GREYEDGE_FILTER) += vf_colorconstancy.o
OBJS-$(CONFIG_HALDCLUT_FILTER) += vf_lut3d.o framesync.o
OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o
OBJS-$(CONFIG_HISTEQ_FILTER) += vf_histeq.o
@@ -217,6 +217,7 @@ extern AVFilter ff_vf_fspp;
extern AVFilter ff_vf_gblur;
extern AVFilter ff_vf_geq;
extern AVFilter ff_vf_gradfun;
extern AVFilter ff_vf_greyedge;
extern AVFilter ff_vf_haldclut;
extern AVFilter ff_vf_hflip;
extern AVFilter ff_vf_histeq;
Oops, something went wrong.

0 comments on commit 0bb5cd8

Please sign in to comment.
You can’t perform that action at this time.