LinesLumaDiff
From Avisynth wiki
(Difference between revisions)
(Update to the latest version) |
m (Update the version) |
||
Line 2: | Line 2: | ||
{{Filter3 | {{Filter3 | ||
|1={{Author/Asd-g}} | |1={{Author/Asd-g}} | ||
− | |2=v2. | + | |2=v2.1.0 |
|3=[https://github.com/Asd-g/AviSynth-LinesLumaDiff/releases/ LinesLumaDiff] | |3=[https://github.com/Asd-g/AviSynth-LinesLumaDiff/releases/ LinesLumaDiff] | ||
|4=Debug filter | |4=Debug filter | ||
Line 18: | Line 18: | ||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
− | :{{Template:FuncDef|LinesLumaDiff (clip, string "output", int "left", int "top", int "right", int "bottom", float "tl", float "tt", float "tr", float "tb")}} | + | :{{Template:FuncDef|LinesLumaDiff (clip, string "output", int "left", int "top", int "right", int "bottom", float "tl", float "tt", float "tr", float "tb", bool "flush")}} |
<br> | <br> | ||
::{{Par2| |clip| }} | ::{{Par2| |clip| }} | ||
Line 39: | Line 39: | ||
::{{Par2|tb|float|0.14}} | ::{{Par2|tb|float|0.14}} | ||
:::Threshold for each side. | :::Threshold for each side. | ||
− | :::If the luma difference between the current and the neighbour line is above the threshold, frame property " | + | :::If the luma difference between the current and the neighbour line is above the threshold, frame property "LinesDiffLeft", "LinesDiffTop", "LinesDiffRight" or "LinesDiffBottom" with the difference is set. Optionally the frame number could be written in file by specifying "output". |
:::Must be between 0.0 and 1.0. | :::Must be between 0.0 and 1.0. | ||
+ | <br> | ||
+ | ::{{Par2|flush|bool|false}} | ||
+ | :::True: The frame number is saved right after the difference is above the threshold. | ||
+ | :::False: All frames with difference above the threshold are saved at once after the end of video. | ||
<br> | <br> | ||
Line 47: | Line 51: | ||
[[AviSource]]("Blah.avi") | [[AviSource]]("Blah.avi") | ||
LinesLumaDiff(left=0, top=1, right=0, bottom=0) | LinesLumaDiff(left=0, top=1, right=0, bottom=0) | ||
− | propShow() # if the difference is above the threshold there will be frame property " | + | propShow() # if the difference is above the threshold there will be frame property "LinesDiffLeft"/"LinesDiffTop"/"LinesDiffRight"/"LinesDiffBottom" |
<br> | <br> | ||
<br> | <br> | ||
== Changelog == | == Changelog == | ||
Version Date Changes<br> | Version Date Changes<br> | ||
+ | v2.1.0 2022/03/09 - Added parameter flush. | ||
+ | - Changed the name of the frame property showing the difference.<br> | ||
v2.0.0 2021/08/22 - Set frame property `_LinesDiff`. | v2.0.0 2021/08/22 - Set frame property `_LinesDiff`. | ||
- Changed parameter name `frames_file` to `output`.<br> | - Changed parameter name `frames_file` to `output`.<br> |
Latest revision as of 02:56, 10 March 2022
Abstract | |
---|---|
Author | Asd-g |
Version | v2.1.0 |
Download | LinesLumaDiff |
Category | Debug filter |
License | GPLv2 |
Discussion |
Contents |
[edit] Description
Checks if luma difference between lines are below or above given threshold and writes frame number in text file.
[edit] Requirements
- [x86/x64]: AviSynth 3.6 or greater is required in order to use this filter.
- Supported color formats: all planar YUV formats
[edit] Syntax and Parameters
- LinesLumaDiff (clip, string "output", int "left", int "top", int "right", int "bottom", float "tl", float "tt", float "tr", float "tb", bool "flush")
- clip =
- A clip to process. It must in YUV planar format.
- clip =
- string output =
- The path of the txt file with frames.
- string output =
- int left = 5
- int top = 5
- int right = 5
- int bottom = 5
- How many lines on each side will be checked.
- Set one (or more) of the sides to 0 to not process it.
- Must not be negative.
- int left = 5
- float tl = 0.14
- float tt = 0.14
- float tr = 0.14
- float tb = 0.14
- Threshold for each side.
- If the luma difference between the current and the neighbour line is above the threshold, frame property "LinesDiffLeft", "LinesDiffTop", "LinesDiffRight" or "LinesDiffBottom" with the difference is set. Optionally the frame number could be written in file by specifying "output".
- Must be between 0.0 and 1.0.
- float tl = 0.14
- bool flush = false
- True: The frame number is saved right after the difference is above the threshold.
- False: All frames with difference above the threshold are saved at once after the end of video.
- bool flush = false
[edit] Examples
Check the difference between the first and second row:
AviSource("Blah.avi") LinesLumaDiff(left=0, top=1, right=0, bottom=0) propShow() # if the difference is above the threshold there will be frame property "LinesDiffLeft"/"LinesDiffTop"/"LinesDiffRight"/"LinesDiffBottom"
[edit] Changelog
Version Date Changes
v2.1.0 2022/03/09 - Added parameter flush. - Changed the name of the frame property showing the difference.
v2.0.0 2021/08/22 - Set frame property `_LinesDiff`. - Changed parameter name `frames_file` to `output`.
v1.0.0 2021/03/30 - Initial release
[edit] External Links
- GitHub - Source code repository.
Back to External Filters ←