Commit 0bb5cd8c authored by Mina's avatar Mina Committed by Thilo Borgmann

avfilter: Add colorconstancy filter

Signed-off-by: 's avatarMina <minasamy_@hotmail.com>
parent d134b8d8
...@@ -15,6 +15,7 @@ version <next>: ...@@ -15,6 +15,7 @@ version <next>:
- vc1 decoder is now bit-exact - vc1 decoder is now bit-exact
- ATRAC9 decoder - ATRAC9 decoder
- lensfun wrapper filter - lensfun wrapper filter
- colorconstancy filter
version 4.0: version 4.0:
......
...@@ -332,6 +332,7 @@ Filters: ...@@ -332,6 +332,7 @@ Filters:
vf_bwdif Thomas Mundt (CC <thomas.mundt@hr.de>) vf_bwdif Thomas Mundt (CC <thomas.mundt@hr.de>)
vf_chromakey.c Timo Rothenpieler vf_chromakey.c Timo Rothenpieler
vf_colorchannelmixer.c Paul B Mahol vf_colorchannelmixer.c Paul B Mahol
vf_colorconstancy.c Mina Sami (CC <minas.gorgy@gmail.com>)
vf_colorbalance.c Paul B Mahol vf_colorbalance.c Paul B Mahol
vf_colorkey.c Timo Rothenpieler vf_colorkey.c Timo Rothenpieler
vf_colorlevels.c Paul B Mahol vf_colorlevels.c Paul B Mahol
......
...@@ -9940,6 +9940,47 @@ gradfun=radius=8 ...@@ -9940,6 +9940,47 @@ gradfun=radius=8
@end itemize @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} @anchor{haldclut}
@section haldclut @section haldclut
......
...@@ -228,6 +228,7 @@ OBJS-$(CONFIG_FSPP_FILTER) += vf_fspp.o ...@@ -228,6 +228,7 @@ OBJS-$(CONFIG_FSPP_FILTER) += vf_fspp.o
OBJS-$(CONFIG_GBLUR_FILTER) += vf_gblur.o OBJS-$(CONFIG_GBLUR_FILTER) += vf_gblur.o
OBJS-$(CONFIG_GEQ_FILTER) += vf_geq.o OBJS-$(CONFIG_GEQ_FILTER) += vf_geq.o
OBJS-$(CONFIG_GRADFUN_FILTER) += vf_gradfun.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_HALDCLUT_FILTER) += vf_lut3d.o framesync.o
OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o
OBJS-$(CONFIG_HISTEQ_FILTER) += vf_histeq.o OBJS-$(CONFIG_HISTEQ_FILTER) += vf_histeq.o
......
...@@ -217,6 +217,7 @@ extern AVFilter ff_vf_fspp; ...@@ -217,6 +217,7 @@ extern AVFilter ff_vf_fspp;
extern AVFilter ff_vf_gblur; extern AVFilter ff_vf_gblur;
extern AVFilter ff_vf_geq; extern AVFilter ff_vf_geq;
extern AVFilter ff_vf_gradfun; extern AVFilter ff_vf_gradfun;
extern AVFilter ff_vf_greyedge;
extern AVFilter ff_vf_haldclut; extern AVFilter ff_vf_haldclut;
extern AVFilter ff_vf_hflip; extern AVFilter ff_vf_hflip;
extern AVFilter ff_vf_histeq; extern AVFilter ff_vf_histeq;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment