LinesLumaDiff

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(LinesLumaDiff v1.0.0)
 
(Update to the latest version)
Line 2: Line 2:
 
{{Filter3
 
{{Filter3
 
|1={{Author/Asd-g}}
 
|1={{Author/Asd-g}}
|2=v1.0.0
+
|2=v2.0.0
|3=[https://github.com/Asd-g/AviSynth-LinesLumaDiff/releases/ LinesLumaDiff-1.0.0.7z]
+
|3=[https://github.com/Asd-g/AviSynth-LinesLumaDiff/releases/ LinesLumaDiff]
 
|4=Debug filter
 
|4=Debug filter
 
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
Line 13: Line 13:
 
<br>
 
<br>
 
== Requirements ==
 
== Requirements ==
* [x86] [[AviSynth+]]
+
* [x86/x64]: '''[[AviSynth+|AviSynth 3.6]] or greater is required in order to use this filter.'''
* [x64] [[AviSynth+]]
+
 
* Supported color formats: all [[planar]] YUV formats
 
* Supported color formats: all [[planar]] YUV formats
 
<br>
 
<br>
  
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef|LinesLumaDiff (clip, int "left", int "top", int "right", int "bottom", float "tl", float "tt", float "tr", float "tb", string frames_file)}}
+
:{{Template:FuncDef|LinesLumaDiff (clip, string "output", int "left", int "top", int "right", int "bottom", float "tl", float "tt", float "tr", float "tb")}}
 
<br>
 
<br>
 
::{{Par2| |clip| }}
 
::{{Par2| |clip| }}
 
::: A clip to process. It must in YUV planar format.
 
::: A clip to process. It must in YUV planar format.
 +
<br>
 +
::{{Par2|output|string|}}
 +
:::The path of the txt file with frames.
 
<br>
 
<br>
 
::{{Par2|left|int|5}}
 
::{{Par2|left|int|5}}
Line 31: Line 33:
 
:::Set one (or more) of the sides to 0 to not process it.
 
:::Set one (or more) of the sides to 0 to not process it.
 
:::Must not be negative.
 
:::Must not be negative.
:::Default: left = top = right = bottom = 5.
 
 
<br>
 
<br>
::{{Par2|tl|float|2.5}}
+
::{{Par2|tl|float|0.14}}
::{{Par2|tt|float|2.5}}
+
::{{Par2|tt|float|0.14}}
::{{Par2|tr|float|2.5}}
+
::{{Par2|tr|float|0.14}}
::{{Par2|tb|float|2.5}}
+
::{{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, the frame number will be written to file.
+
:::If the luma difference between the current and the neighbour line is above the threshold, frame property "_LinesDiff" with the difference is set. Optionally the frame number could be written in file by specifying "output".
:::Must not be negative.
+
:::Must be between 0.0 and 1.0.
:::Default: tl = tt = tr = tb = 2.5.
+
<br>
+
::{{Par2|frames_file|string|}}
+
:::Set the path of the file with frame numbers.
+
 
<br>
 
<br>
 +
 
==Examples==
 
==Examples==
[[TODO]]
+
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 "_LinesDiff"
 
<br>
 
<br>
 
<br>
 
<br>
 
== Changelog ==
 
== Changelog ==
 
  Version      Date            Changes<br>
 
  Version      Date            Changes<br>
  v1.0.0      2021/03/30      - Initial release  
+
v2.0.0      2021/08/22      - Set frame property `_LinesDiff`.
 +
                              - Changed parameter name `frames_file` to `output`.<br>
 +
  v1.0.0      2021/03/30      - Initial release
  
 
<br>
 
<br>

Revision as of 23:45, 13 January 2022

Abstract
Author Asd-g
Version v2.0.0
Download LinesLumaDiff
Category Debug filter
License GPLv2
Discussion

Contents

Description

Checks if luma difference between lines are below or above given threshold and writes frame number in text file.

Requirements

  • [x86/x64]: AviSynth 3.6 or greater is required in order to use this filter.
  • Supported color formats: all planar YUV formats


Syntax and Parameters

LinesLumaDiff (clip, string "output", int "left", int "top", int "right", int "bottom", float "tl", float "tt", float "tr", float "tb")


clip   =
A clip to process. It must in YUV planar format.


string  output =
The path of the txt file with frames.


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.


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 "_LinesDiff" 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.


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 "_LinesDiff"



Changelog

Version      Date            Changes
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



External Links

  • GitHub - Source code repository.




Back to External Filters

Personal tools