VsTCanny
From Avisynth wiki
Abstract | |
---|---|
Author | Asd-g |
Version | v1.0.0 |
Download | vsTCanny-1.0.0.7z |
Category | Edge Detection |
License | GPLv2 |
Discussion |
Contents |
Description
Builds an edge map using canny edge detection.
vsTCanny is a port of the VapourSynth plugin TCanny.
Requirements
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- Supported color formats: Y8, YV12, YV16, YV24, YV411
- AviSynth+: all planar formats (8/10/12/14/16/32-bit, Y, YUV(A), and RGB(A) with or without alpha) are supported.
Syntax and Parameters
- vsTCanny (clip, float "sigmaY", float "sigmaU", float "sigmaV", float sigma_vY", float "sigma_vU", float "sigma_vV", float "t_h", float "t_l", int "mode", int "op", float "gmmax", int "y", int "u", int "v", int "opt")
- clip =
- A clip to process. All planar formats are supported.
- clip =
- float sigmaY = 1.5
- float sigmaU =
- float sigmaV =
- Standard deviation of horizontal gaussian blur.
- Must be greater than 0.0.
- Default: sigmaY = 1.5; sigmaU = sigmaV = 0.75 for half resolution chroma and sigmaU = sigmaV = 1.5 for full resolution chroma.
- float sigmaY = 1.5
- float sigma_vY = 1.5
- float sigma_vU =
- float sigma_vV =
- Standard deviation of vertical gaussian blur.
- Must be greater than 0.0.
- Default: sigma_vY = 1.5; sigma_vU = sigma_vV = 0.75 for half resolution chroma and sigma_vU = sigma_vV = 1.5 for full resolution chroma.
- float sigma_vY = 1.5
- float t_h = 8.0
- High gradient magnitude threshold for hysteresis.
- float t_h = 8.0
- float t_l = 1.0
- Low gradient magnitude threshold for hysteresis.
- float t_l = 1.0
- int mode = 0
- Sets the output format:
- int mode = 0
- -1 : Gaussian blur only.
- 0 : Thresholded edge map (2^bitdepth-1 for edge, 0 for non-edge).
- 1: Gradient magnitude map.
- int op = 1
- Sets the operator for edge detection:
- int op = 1
- 0: The operator used in tritical's original filter.
- 1: The operator proposed by P. Zhou et al.
- 2: The Sobel operator.
- 3: The Scharr operator.
- float gmmax = 50.0
- Used for scaling gradient magnitude into [0, 2^bitdepth-1] for mode=1.
- Musbe greater than or equal to 1.0.
- float gmmax = 50.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 the clip is RGB.
- Planes to process.
- int y = 3
- int opt = -1
- Sets which cpu optimizations to use.
- -1 : Auto-detect.
- 0 : Use C++ code.
- 1 : Use SSE2 code.
- 2 : Use AVX2 code.
- Sets which cpu optimizations to use.
- int opt = -1
Examples
vsTCanny with default settings (for YUV420):
AviSource("blah.avi") TCannyMod(sigmaY=1.50, sigmaU=0.75, sigmaV=0.75, sigma_vY=1.50, sigma_vU=0.75, sigma_vV=0.75, \ t_h=8.0, t_l=1.0, mode=0, op=1, gmmax=50.0, Y=3, U=3, V=3, opt=-1)
vsTCanny with default settings (for YUV444):
AviSource("blah.avi") TCannyMod(sigmaY=1.50, sigmaU=1.50, sigmaV=1.50, sigma_vY=1.50, sigma_vU=1.50, sigma_vV=1.50, \ t_h=8.0, t_l=1.0, mode=0, op=1, gmmax=50.0, Y=3, U=3, V=3, opt=-1)
Changelog
Version Date Changes
v1.0.0 2020/09/15 - Initial release; port of the VapourSynth plugin
External Links
GitHub - Source code repository.
Back to External Filters ←