diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-02-06 17:11:07 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-01-30 18:44:08 +0100 |
commit | acf1dd5b74ab33a75e5d31ca6281d4cdc2ce2dec (patch) | |
tree | 61b9936d3ee631ee0a255a843480a42193aeba1d /doc | |
parent | ebb83e2dc0b437081dc6496a724803bf5f04a8ea (diff) | |
download | ffmpeg-streaming-acf1dd5b74ab33a75e5d31ca6281d4cdc2ce2dec.zip ffmpeg-streaming-acf1dd5b74ab33a75e5d31ca6281d4cdc2ce2dec.tar.gz |
avfilter: add threshold filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/filters.texi | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index 21a5bf5..6e01df9 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -13192,6 +13192,63 @@ PAL output (25i): 16p: 33333334 @end example +@section threshold + +Apply threshold effect to video stream. + +This filter needs four video streams to perform thresholding. +First stream is stream we are filtering. +Second stream is holding threshold values, third stream is holding min values, +and last, fourth stream is holding max values. + +The filter accepts the following option: + +@table @option +@item planes +Set which planes will be processed, unprocessed planes will be copied. +By default value 0xf, all planes will be processed. +@end table + +For example if first stream pixel's component value is less then threshold value +of pixel component from 2nd threshold stream, third stream value will picked, +otherwise fourth stream pixel component value will be picked. + +Using color source filter one can perform various types of thresholding: + +@subsection Examples + +@itemize +@item +Binary threshold, using gray color as threshold: +@example +ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=black -f lavfi -i color=white -lavfi threshold output.avi +@end example + +@item +Inverted binary threshold, using gray color as threshold: +@example +ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -f lavfi -i color=black -lavfi threshold output.avi +@end example + +@item +Truncate binary threshold, using gray color as threshold: +@example +ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi +@end example + +@item +Threshold to zero, using gray color as threshold: +@example +ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi +@end example + +@item +Inverted threshold to zero, using gray color as threshold: +@example +ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi +@end example +@end itemize + @section thumbnail Select the most representative frame in a given sequence of consecutive frames. |