VsTEdgeMask
From Avisynth wiki
(Difference between revisions)
(vsTEdgeMask v1.0.0) |
(vsTEdgeMask 1.0.1) |
||
Line 2: | Line 2: | ||
{{Filter3 | {{Filter3 | ||
|1={{Author/Asd-g}} | |1={{Author/Asd-g}} | ||
− | |2=v1.0. | + | |2=v1.0.1 |
− | |3=[https://github.com/Asd-g/AviSynth-vsTEdgeMask/releases/ vsTEdgeMask-1.0. | + | |3=[https://github.com/Asd-g/AviSynth-vsTEdgeMask/releases/ vsTEdgeMask-1.0.1.7z] |
|4=Edge Detection | |4=Edge Detection | ||
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | |5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | ||
Line 73: | Line 73: | ||
:::*0: Use C++ code. | :::*0: Use C++ code. | ||
:::*1: Use SSE2 code. | :::*1: Use SSE2 code. | ||
+ | :::*2: Use AVX2 code. | ||
+ | :::*3: Use AVX512 code. | ||
:::Default: -1. | :::Default: -1. | ||
<br> | <br> | ||
Line 83: | Line 85: | ||
== Changelog == | == Changelog == | ||
Version Date Changes<br> | Version Date Changes<br> | ||
+ | v1.0.1 2022/05/26 - Added AVX2 and AVX512 code. | ||
v1.0.0 2021/03/11 - Initial release; port of the VapourSynth plugin | v1.0.0 2021/03/11 - Initial release; port of the VapourSynth plugin | ||
Latest revision as of 18:34, 17 May 2023
Abstract | |
---|---|
Author | Asd-g |
Version | v1.0.1 |
Download | vsTEdgeMask-1.0.1.7z |
Category | Edge Detection |
License | GPLv2 |
Discussion |
Contents |
[edit] Description
vsTEdgeMask builds an edge map using canny edge detection.
This is a port of the VapourSynth plugin TEdgeMask, which in turn is a port of both TEdgeMask/TEMmod AviSynth plugins.
[edit] Requirements
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- Supported color formats: Y8, YV12, YV16. YV24
- AviSynth+: all planar formats (8/10/12/14/16-bit, Y/YUV/RGB without an alpha channel) are supported.
[edit] Syntax and Parameters
- vsTEdgeMask (clip, float "threshY", float "threshU", float "threshV", int "type", int "link", float "scale", int "y", int "u", int "v", int "opt")
- clip =
- A clip to process. It must have planar format, 8..16 bit integer sample type, and subsampling ratios of at most 2.
- clip =
- float threshY = 8.0
- float threshU = 8.0
- float threshV = 8.0
- Sets the magnitude thresholds.
- If over this value then a sample will be considered an edge, and the output pixel will be set to the maximum value allowed by the format. Otherwise the output pixel will be set to 0.
- Set this to 0 to output a magnitude mask instead of a binary mask.
- Default: threshY = threshU = threshV = 8.0
- float threshY = 8.0
- int type = 2
- Sets the type of first order partial derivative approximation that is used.
- 1: 2 pixel.
- 2: 4 pixel.
- 3: Same as type = 1.
- 4: Same as type = 2.
- 5: 6 pixel (Sobel operator).
- Default: 2
- Sets the type of first order partial derivative approximation that is used.
- int type = 2
- int link =
- Specifies whether luma to chroma linking, no linking, or linking of every plane to every other plane is used.
- 0: No linking. The three edge masks are completely independent.
- 1: Luma to chroma linking. If a luma pixel is considered an edge, the corresponding chroma pixel is also marked as an edge.
- 2: Every plane to every other plane. If a pixel is considered an edge in any plane, the corresponding pixels in all the other planes are also marked as edges.
- This parameter has no effect when clip has only one plane, when any plane's threshold is 0, or when some planes are not processed.
- This parameter can only be 0 or 2 when clip is RGB.
- Default: 2 when clip is RGB, otherwise 1.
- Specifies whether luma to chroma linking, no linking, or linking of every plane to every other plane is used.
- int link =
- float scale = 1.0
- If the output is a magnitude mask (threshold is 0), it is scaled by this value.
- Note that in TEMmod this parameter had three different, undocumented default values for the different mask types, which made it difficult to use the parameter without reading the source code.
- Default: 1.0
- float scale = 1.0
- int Y = 3
- int U = 3
- int V = 3
- Planes to process.
- 1: Return garbage.
- 2: Copy plane.
- 3: Process plane. Always process planes when clip is RGB.
- Default: y = u = v = 3.
- int Y = 3
- int opt = false
- Sets which cpu optimizations to use.
- -1: Auto-detect.
- 0: Use C++ code.
- 1: Use SSE2 code.
- 2: Use AVX2 code.
- 3: Use AVX512 code.
- Default: -1.
- Sets which cpu optimizations to use.
- int opt = false
[edit] Examples
vsTEdgeMask with default settings:
AviSource("blah.avi") # YUV input vsTEdgeMask (threshY=8.0, threshU=8.0, threshV=8.0, type=2, link=1, scale=1.0, Y=1, U=1, V=1, opt=-1)
[edit] Changelog
Version Date Changes
v1.0.1 2022/05/26 - Added AVX2 and AVX512 code. v1.0.0 2021/03/11 - Initial release; port of the VapourSynth plugin
[edit] Archived Downloads
See GitHub releases page.
[edit] External Links
Back to External Filters ←