edge ¶
Classes:
-
ASobel
–Modified Sobel-Feldman operator from AWarpSharp.
-
Cross
–"HotDoG" Operator from AVS ExTools by Dogway.
-
EdgeDetect
–Abstract edge detection interface.
-
EuclideanDistance
– -
ExKirsch
–Extended Russell Kirsch compass operator. 5x5 matrices.
-
ExLaplacian1
–Extended Pierre-Simon de Laplace operator, 1st implementation.
-
ExLaplacian2
–Extended Pierre-Simon de Laplace operator, 2nd implementation.
-
ExLaplacian3
–Extended Pierre-Simon de Laplace operator, 3rd implementation.
-
ExLaplacian4
–Extended Pierre-Simon de Laplace operator, 4th implementation.
-
ExPrewitt
–Extended Judith M. S. Prewitt operator.
-
ExSobel
–Extended Sobel-Feldman operator.
-
FDoG
–Flow-based Difference of Gaussian
-
FDoGTCanny
–Flow-based Difference of Gaussian TCanny Vapoursynth plugin.
-
Farid
–Farid & Simoncelli operator.
-
FreyChen
–Chen Frei operator. 3x3 matrices properly implemented.
-
FreyChenG41
–"Chen Frei" operator. 3x3 matrices from G41Fun.
-
Kayyali
–Kayyali operator.
-
Kirsch
–Russell Kirsch compass operator.
-
KirschTCanny
–Russell Kirsch compass TCanny Vapoursynth plugin operator.
-
Kroon
–Dirk-Jan Kroon operator.
-
KroonTCanny
–Dirk-Jan Kroon TCanny Vapoursynth plugin operator.
-
Laplacian1
–Pierre-Simon de Laplace operator 1st implementation.
-
Laplacian2
–Pierre-Simon de Laplace operator 2nd implementation.
-
Laplacian3
–Pierre-Simon de Laplace operator 3rd implementation.
-
Laplacian4
–Pierre-Simon de Laplace operator 4th implementation.
-
LoG
–Laplacian of Gaussian operator.
-
MagDirection
–Direction of magnitude calculation.
-
MagnitudeMatrix
– -
Matrix1D
– -
Matrix3x3
– -
Matrix5x5
– -
MatrixEdgeDetect
– -
Max
– -
MinMax
–Min/max mask with separate luma/chroma radii.
-
Prewitt
–Judith M. S. Prewitt operator.
-
PrewittStd
–Judith M. S. Prewitt Vapoursynth plugin operator.
-
PrewittTCanny
–Judith M. S. Prewitt TCanny plugin operator.
-
RScharr
–Refined H. Scharr operator to more accurately calculate
-
RidgeDetect
– -
Robinson3
–Robinson compass operator level 3.
-
Robinson5
–Robinson compass operator level 5.
-
Scharr
–Original H. Scharr optimised operator which attempts
-
ScharrTCanny
–H. Scharr optimised TCanny Vapoursynth plugin operator.
-
SingleMatrix
– -
Sobel
–Sobel-Feldman operator.
-
SobelStd
–Sobel-Feldman Vapoursynth plugin operator.
-
SobelTCanny
–Sobel-Feldman Vapoursynth plugin operator.
-
TEdge
–(TEdgeMasktype=2) Avisynth plugin.
-
TEdgeTedgemask
–(tedgemask.TEdgeMask(threshold=0.0, type=2)) Vapoursynth plugin.
-
TheToof
–TheToof compass operator from SharpAAMCmod.
-
Tritical
–Operator used in Tritical's original TCanny filter.
-
TriticalTCanny
–Operator used in Tritical's original TCanny filter.
Functions:
-
get_all_edge_detects
–Returns all the EdgeDetect subclasses
-
get_all_ridge_detect
–Returns all the RidgeDetect subclasses
Attributes:
-
EdgeDetectT
(TypeAlias
) – -
RidgeDetectT
(TypeAlias
) –
ASobel ¶
ASobel(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Modified Sobel-Feldman operator from AWarpSharp.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Cross ¶
Cross(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
"HotDoG" Operator from AVS ExTools by Dogway. Plain and simple cross first order derivative.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[1, 0, 0, 0, 0, 0, 0, 0, -1],
[0, 0, -1, 0, 0, 0, 1, 0, 0],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
EdgeDetect ¶
EdgeDetect(**kwargs: Any)
Bases: ABC
Abstract edge detection interface.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
EuclideanDistance ¶
EuclideanDistance(**kwargs: Any)
Bases: MatrixEdgeDetect
, ABC
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
ExKirsch ¶
ExKirsch(mag_directions: MagDirection = ALL, **kwargs: Any)
Bases: MagnitudeMatrix
, Max
Extended Russell Kirsch compass operator. 5x5 matrices.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
mag_directions
– -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
321 322 323 324 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
9,
9,
9,
9,
9,
9,
5,
5,
5,
9,
-7,
-3,
0,
-3,
-7,
-7,
-3,
-3,
-3,
-7,
-7,
-7,
-7,
-7,
-7,
],
[
9,
9,
9,
9,
-7,
9,
5,
5,
-3,
-7,
9,
5,
0,
-3,
-7,
9,
-3,
-3,
-3,
-7,
-7,
-7,
-7,
-7,
-7,
],
[
9,
9,
-7,
-7,
-7,
9,
5,
-3,
-3,
-7,
9,
5,
0,
-3,
-7,
9,
5,
-3,
-3,
-7,
9,
9,
-7,
-7,
-7,
],
[
-7,
-7,
-7,
-7,
-7,
9,
-3,
-3,
-3,
-7,
9,
5,
0,
-3,
-7,
9,
5,
5,
-3,
-7,
9,
9,
9,
9,
-7,
],
[
-7,
-7,
-7,
-7,
-7,
-7,
-3,
-3,
-3,
-7,
-7,
-3,
0,
-3,
-7,
9,
5,
5,
5,
9,
9,
9,
9,
9,
9,
],
[
-7,
-7,
-7,
-7,
-7,
-7,
-3,
-3,
-3,
9,
-7,
-3,
0,
5,
9,
-7,
-3,
5,
5,
9,
-7,
9,
9,
9,
9,
],
[
-7,
-7,
-7,
9,
9,
-7,
-3,
-3,
5,
9,
-7,
-3,
0,
5,
9,
-7,
-3,
-3,
5,
9,
-7,
-7,
-7,
9,
9,
],
[
-7,
9,
9,
9,
9,
-7,
-3,
5,
5,
9,
-7,
-3,
0,
5,
9,
-7,
-3,
-3,
-3,
9,
-7,
-7,
-7,
-7,
-7,
],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
ExLaplacian1 ¶
ExLaplacian1(**kwargs: Any)
Bases: SingleMatrix
, Matrix5x5
Extended Pierre-Simon de Laplace operator, 1st implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
0,
0,
-1,
0,
0,
0,
0,
-1,
0,
0,
-1,
-1,
8,
-1,
-1,
0,
0,
-1,
0,
0,
0,
0,
-1,
0,
0,
]
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
ExLaplacian2 ¶
ExLaplacian2(**kwargs: Any)
Bases: SingleMatrix
, Matrix5x5
Extended Pierre-Simon de Laplace operator, 2nd implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
0,
1,
-1,
1,
0,
1,
1,
-4,
1,
1,
-1,
-4,
8,
-4,
-1,
1,
1,
-4,
1,
1,
0,
1,
-1,
1,
0,
]
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
ExLaplacian3 ¶
ExLaplacian3(**kwargs: Any)
Bases: SingleMatrix
, Matrix5x5
Extended Pierre-Simon de Laplace operator, 3rd implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
-1,
1,
-1,
1,
-1,
1,
2,
-4,
2,
1,
-1,
-4,
8,
-4,
-1,
1,
2,
-4,
2,
1,
-1,
1,
-1,
1,
-1,
]
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
ExLaplacian4 ¶
ExLaplacian4(**kwargs: Any)
Bases: SingleMatrix
, Matrix5x5
Extended Pierre-Simon de Laplace operator, 4th implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
24,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
]
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
ExPrewitt ¶
ExPrewitt(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix5x5
Extended Judith M. S. Prewitt operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
2,
1,
0,
-1,
-2,
2,
1,
0,
-1,
-2,
2,
1,
0,
-1,
-2,
2,
1,
0,
-1,
-2,
2,
1,
0,
-1,
-2,
],
[
2,
2,
2,
2,
2,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
-1,
-1,
-1,
-1,
-1,
-2,
-2,
-2,
-2,
-2,
],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
ExSobel ¶
ExSobel(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix5x5
Extended Sobel-Feldman operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
2,
1,
0,
-1,
-2,
2,
1,
0,
-1,
-2,
4,
2,
0,
-2,
-4,
2,
1,
0,
-1,
-2,
2,
1,
0,
-1,
-2,
],
[
2,
2,
4,
2,
2,
1,
1,
2,
1,
1,
0,
0,
0,
0,
0,
-1,
-1,
-2,
-1,
-1,
-2,
-2,
-4,
-2,
-2,
],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
FDoG ¶
FDoG(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix5x5
Flow-based Difference of Gaussian
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
1,
1,
0,
-1,
-1,
2,
2,
0,
-2,
-2,
3,
3,
0,
-3,
-3,
2,
2,
0,
-2,
-2,
1,
1,
0,
-1,
-1,
],
[
1,
2,
3,
2,
1,
1,
2,
3,
2,
1,
0,
0,
0,
0,
0,
-1,
-2,
-3,
-2,
-1,
-1,
-2,
-3,
-2,
-1,
],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
FDoGTCanny ¶
FDoGTCanny(**kwargs: Any)
Bases: Matrix5x5
, EdgeDetect
Flow-based Difference of Gaussian TCanny Vapoursynth plugin.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Farid ¶
Farid(**kwargs: Any)
Bases: NormalizeProcessor
, RidgeDetect
, EuclideanDistance
, Matrix5x5
Farid & Simoncelli operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
0.004127602875174862,
0.027308149775363867,
0.04673225765917656,
0.027308149775363867,
0.004127602875174862,
0.010419993699470744,
0.06893849946536831,
0.11797400212587895,
0.06893849946536831,
0.010419993699470744,
0.0,
0.0,
0.0,
0.0,
0.0,
-0.010419993699470744,
-0.06893849946536831,
-0.11797400212587895,
-0.06893849946536831,
-0.010419993699470744,
-0.004127602875174862,
-0.027308149775363867,
-0.04673225765917656,
-0.027308149775363867,
-0.004127602875174862,
],
[
0.004127602875174862,
0.010419993699470744,
0.0,
-0.010419993699470744,
-0.004127602875174862,
0.027308149775363867,
0.06893849946536831,
0.0,
-0.06893849946536831,
-0.027308149775363867,
0.04673225765917656,
0.11797400212587895,
0.0,
-0.11797400212587895,
-0.04673225765917656,
0.027308149775363867,
0.06893849946536831,
0.0,
-0.06893849946536831,
-0.027308149775363867,
0.004127602875174862,
0.010419993699470744,
0.0,
-0.010419993699470744,
-0.004127602875174862,
],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
FreyChen ¶
FreyChen(**kwargs: Any)
Bases: NormalizeProcessor
, MatrixEdgeDetect
Chen Frei operator. 3x3 matrices properly implemented.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) – -
sqrt2
–
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
divisors class-attribute
¶
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[1, sqrt2, 1, 0, 0, 0, -1, -sqrt2, -1],
[1, 0, -1, sqrt2, 0, -sqrt2, 1, 0, -1],
[0, -1, sqrt2, 1, 0, -1, -sqrt2, 1, 0],
[sqrt2, -1, 0, -1, 0, 1, 0, 1, -sqrt2],
[0, 1, 0, -1, 0, -1, 0, 1, 0],
[-1, 0, 1, 0, 0, 0, 1, 0, -1],
[1, -2, 1, -2, 4, -2, 1, -2, 1],
[-2, 1, -2, 1, 4, 1, -2, 1, -2],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
FreyChenG41 ¶
FreyChenG41(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
"Chen Frei" operator. 3x3 matrices from G41Fun.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[-7, 0, 7, -10, 0, 10, -7, 0, 7],
[-7, -10, -7, 0, 0, 0, 7, 10, 7],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
Kayyali ¶
Kayyali(**kwargs: Any)
Bases: SingleMatrix
, Matrix3x3
Kayyali operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Kirsch ¶
Kirsch(mag_directions: MagDirection = ALL, **kwargs: Any)
Bases: MagnitudeMatrix
, Max
, Matrix3x3
Russell Kirsch compass operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
mag_directions
– -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
321 322 323 324 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[5, 5, 5, -3, 0, -3, -3, -3, -3],
[5, 5, -3, 5, 0, -3, -3, -3, -3],
[5, -3, -3, 5, 0, -3, 5, -3, -3],
[-3, -3, -3, 5, 0, -3, 5, 5, -3],
[-3, -3, -3, -3, 0, -3, 5, 5, 5],
[-3, -3, -3, -3, 0, 5, -3, 5, 5],
[-3, -3, 5, -3, 0, 5, -3, -3, 5],
[-3, 5, 5, -3, 0, 5, -3, -3, -3],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
KirschTCanny ¶
KirschTCanny(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Russell Kirsch compass TCanny Vapoursynth plugin operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Kroon ¶
Kroon(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
Dirk-Jan Kroon operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[-17, 0, 17, -61, 0, 61, -17, 0, 17],
[-17, -61, -17, 0, 0, 0, 17, 61, 17],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
KroonTCanny ¶
KroonTCanny(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Dirk-Jan Kroon TCanny Vapoursynth plugin operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Laplacian1 ¶
Laplacian1(**kwargs: Any)
Bases: SingleMatrix
, Matrix3x3
Pierre-Simon de Laplace operator 1st implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Laplacian2 ¶
Laplacian2(**kwargs: Any)
Bases: SingleMatrix
, Matrix3x3
Pierre-Simon de Laplace operator 2nd implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Laplacian3 ¶
Laplacian3(**kwargs: Any)
Bases: SingleMatrix
, Matrix3x3
Pierre-Simon de Laplace operator 3rd implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Laplacian4 ¶
Laplacian4(**kwargs: Any)
Bases: SingleMatrix
, Matrix3x3
Pierre-Simon de Laplace operator 4th implementation.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
LoG ¶
LoG(**kwargs: Any)
Bases: SingleMatrix
, Matrix5x5
Laplacian of Gaussian operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[
0,
0,
-1,
0,
0,
0,
-1,
-2,
-1,
0,
-1,
-2,
16,
-2,
-1,
0,
-1,
-2,
-1,
0,
0,
0,
-1,
0,
0,
]
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
MagDirection ¶
Bases: IntFlag
Direction of magnitude calculation.
Methods:
Attributes:
select_matrices ¶
Source code in vsmasktools/edge/_abstract.py
80 81 82 83 84 85 86 |
|
MagnitudeMatrix ¶
MagnitudeMatrix(mag_directions: MagDirection = ALL, **kwargs: Any)
Bases: MatrixEdgeDetect
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
mag_directions
– -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
321 322 323 324 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Matrix1D ¶
Matrix1D(**kwargs: Any)
Bases: EdgeDetect
, ABC
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Matrix3x3 ¶
Matrix3x3(**kwargs: Any)
Bases: EdgeDetect
, ABC
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Matrix5x5 ¶
Matrix5x5(**kwargs: Any)
Bases: EdgeDetect
, ABC
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
MatrixEdgeDetect ¶
MatrixEdgeDetect(**kwargs: Any)
Bases: EdgeDetect
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Max ¶
Max(**kwargs: Any)
Bases: MatrixEdgeDetect
, ABC
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
MinMax ¶
Bases: EdgeDetect
Min/max mask with separate luma/chroma radii.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
Source code in vsmasktools/edge/_3x3.py
392 393 394 395 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Prewitt ¶
Prewitt(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
Judith M. S. Prewitt operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[1, 0, -1, 1, 0, -1, 1, 0, -1],
[1, 1, 1, 0, 0, 0, -1, -1, -1],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
PrewittStd ¶
PrewittStd(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Judith M. S. Prewitt Vapoursynth plugin operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
PrewittTCanny ¶
PrewittTCanny(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Judith M. S. Prewitt TCanny plugin operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
RScharr ¶
RScharr(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
Refined H. Scharr operator to more accurately calculate 1st derivatives for a 3x3 kernel with coeffs 47 and 162.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[-47, 0, 47, -162, 0, 162, -47, 0, 47],
[-47, -162, -47, 0, 0, 0, 47, 162, 47],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
RidgeDetect ¶
RidgeDetect(**kwargs: Any)
Bases: MatrixEdgeDetect
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
Robinson3 ¶
Robinson3(mag_directions: MagDirection = ALL, **kwargs: Any)
Bases: MagnitudeMatrix
, Max
, Matrix3x3
Robinson compass operator level 3.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
mag_directions
– -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
321 322 323 324 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[1, 1, 1, 0, 0, 0, -1, -1, -1],
[1, 1, 0, 1, 0, -1, 0, -1, -1],
[1, 0, -1, 1, 0, -1, 1, 0, -1],
[0, -1, -1, 1, 0, -1, 1, 1, 0],
[],
[],
[],
[],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Robinson5 ¶
Robinson5(mag_directions: MagDirection = ALL, **kwargs: Any)
Bases: MagnitudeMatrix
, Max
, Matrix3x3
Robinson compass operator level 5.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
mag_directions
– -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
321 322 323 324 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[1, 2, 1, 0, 0, 0, -1, -2, -1],
[2, 1, 0, 1, 0, -1, 0, -1, -2],
[1, 0, -1, 2, 0, -2, 1, 0, -1],
[0, -1, -2, 1, 0, -1, 2, 1, 0],
[],
[],
[],
[],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Scharr ¶
Scharr(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
Original H. Scharr optimised operator which attempts to achieve the perfect rotational symmetry with coefficients 3 and 10.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[-3, 0, 3, -10, 0, 10, -3, 0, 3],
[-3, -10, -3, 0, 0, 0, 3, 10, 3],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
ScharrTCanny ¶
ScharrTCanny(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
H. Scharr optimised TCanny Vapoursynth plugin operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
SingleMatrix ¶
SingleMatrix(**kwargs: Any)
Bases: MatrixEdgeDetect
, ABC
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Sobel ¶
Sobel(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
Sobel-Feldman operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[1, 0, -1, 2, 0, -2, 1, 0, -1],
[1, 2, 1, 0, 0, 0, -1, -2, -1],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
SobelStd ¶
SobelStd(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Sobel-Feldman Vapoursynth plugin operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
SobelTCanny ¶
SobelTCanny(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Sobel-Feldman Vapoursynth plugin operator.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
TEdge ¶
TEdge(**kwargs: Any)
Bases: EuclideanDistance
, Matrix1D
(TEdgeMasktype=2) Avisynth plugin.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
TEdgeTedgemask ¶
TEdgeTedgemask(**kwargs: Any)
Bases: Matrix1D
, EdgeDetect
(tedgemask.TEdgeMask(threshold=0.0, type=2)) Vapoursynth plugin.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
TheToof ¶
TheToof(mag_directions: MagDirection = ALL, **kwargs: Any)
Bases: MagnitudeMatrix
, Max
, Matrix3x3
TheToof compass operator from SharpAAMCmod.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
mag_directions
– -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
321 322 323 324 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[5, 10, 5, 0, 0, 0, -5, -10, -5],
[10, 5, 0, 5, 0, -5, 0, -5, -10],
[5, 0, -5, 10, 0, -10, 5, 0, -5],
[0, -5, -10, 5, 0, -5, 10, 5, 0],
[],
[],
[],
[],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
Tritical ¶
Tritical(**kwargs: Any)
Bases: RidgeDetect
, EuclideanDistance
, Matrix3x3
Operator used in Tritical's original TCanny filter. Plain and simple orthogonal first order derivative.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
– -
ridgemask
–Makes ridge mask based on convolution kernel.
Attributes:
-
divisors
(Sequence[float] | None
) – -
kwargs
(KwargsT | None
) – -
matrices
(Sequence[Sequence[float]]
) – -
mode_types
(Sequence[str] | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
matrices class-attribute
¶
matrices: Sequence[Sequence[float]] = [
[0, 0, 0, -1, 0, 1, 0, 0, 0],
[0, 1, 0, 0, 0, 0, 0, -1, 0],
]
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
394 395 396 397 398 399 400 401 |
|
from_param classmethod
¶
from_param(
ridge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
385 386 387 388 389 390 391 392 |
|
ridgemask ¶
ridgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Makes ridge mask based on convolution kernel.
The resulting mask can be thresholded with lthr, hthr and multiplied with multi. Using a 32-bit float clip is recommended.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –clamp: Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
VideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
TriticalTCanny ¶
TriticalTCanny(**kwargs: Any)
Bases: Matrix3x3
, EdgeDetect
Operator used in Tritical's original TCanny filter. Plain and simple orthogonal first order derivative.
Methods:
-
depth_scale
– -
edgemask
–Makes edge mask based on convolution kernel.
-
ensure_obj
– -
from_param
–
Attributes:
-
kwargs
(KwargsT | None
) –
Source code in vsmasktools/edge/_abstract.py
147 148 149 150 |
|
depth_scale classmethod
¶
depth_scale(
clip: VideoNode, bitdepth: VideoFormatT | HoldsVideoFormatT | int
) -> ConstantFormatVideoNode
Source code in vsmasktools/edge/_abstract.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
edgemask ¶
edgemask(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) –Low threshold. Anything below lthr will be set to 0
-
hthr
¶float | None
, default:None
) –High threshold. Anything above hthr will be set to the range max
-
multi
¶float
, default:1.0
) –Multiply all pixels by this before thresholding
-
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
ConstantFormatVideoNode
–Mask clip
Source code in vsmasktools/edge/_abstract.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ensure_obj classmethod
¶
ensure_obj(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> Self
Source code in vsmasktools/edge/_abstract.py
215 216 217 218 219 220 221 222 |
|
from_param classmethod
¶
from_param(
edge_detect: type[Self] | Self | str | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[Self]
Source code in vsmasktools/edge/_abstract.py
206 207 208 209 210 211 212 213 |
|
get_all_edge_detects ¶
get_all_edge_detects(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> list[ConstantFormatVideoNode]
Returns all the EdgeDetect subclasses
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) – -
hthr
¶float | None
, default:None
) – -
multi
¶float
, default:1.0
) – -
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
list[ConstantFormatVideoNode]
–A list of edge masks
Source code in vsmasktools/edge/_abstract.py
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
|
get_all_ridge_detect ¶
get_all_ridge_detect(
clip: VideoNode,
lthr: float = 0.0,
hthr: float | None = None,
multi: float = 1.0,
clamp: bool | tuple[float, float] | list[tuple[float, float]] = False,
planes: PlanesT = None,
**kwargs: Any
) -> list[ConstantFormatVideoNode]
Returns all the RidgeDetect subclasses
Parameters:
-
clip
¶VideoNode
) –Source clip
-
lthr
¶float
, default:0.0
) – -
hthr
¶float | None
, default:None
) – -
multi
¶float
, default:1.0
) – -
clamp
¶bool | tuple[float, float] | list[tuple[float, float]]
, default:False
) –Clamp to legal values if True or specified range
(low, high)
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Returns:
-
list[ConstantFormatVideoNode]
–A list edge masks
Source code in vsmasktools/edge/_abstract.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
|