]> git.sesse.net Git - ffmpeg/commit
avfilter/vf_edgedetect: properly implement double_threshold()
authorValery Kot <valery.kot@gmail.com>
Mon, 22 Jun 2020 15:29:21 +0000 (17:29 +0200)
committerAndriy Gelman <andriy.gelman@gmail.com>
Tue, 7 Jul 2020 03:20:53 +0000 (23:20 -0400)
commit855d51bf481dddf425f9a82e4d1aa2cdc93c22f8
tree6a5829f3fdce2cbc3e043a6e5655564f5e1005bf
parent235a5734e084f2746b4c133bf33cb4579a6ca17f
avfilter/vf_edgedetect: properly implement double_threshold()

Important part of this algorithm is the double threshold step: pixels
above "high" threshold being kept, pixels below "low" threshold dropped,
pixels in between (weak edges) are kept if they are neighboring "high"
pixels.

The weak edge check uses a neighboring context and should not be applied
on the plane's border. The condition was incorrect and has been fixed in
the commit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
libavfilter/vf_edgedetect.c
tests/ref/fate/filter-edgedetect
tests/ref/fate/filter-edgedetect-colormix