API Reference

Various masking tools for Vapoursynth

Edge Masks

Edge and ridge detection submodule

class vsmask.edge.EdgeDetect

Bases: ABC

Abstract edge detection interface.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.MatrixEdgeDetect

Bases: EdgeDetect, ABC

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SingleMatrix

Bases: MatrixEdgeDetect, ABC

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.EuclidianDistance

Bases: MatrixEdgeDetect, ABC

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.Max

Bases: MatrixEdgeDetect, ABC

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.RidgeDetect

Bases: MatrixEdgeDetect

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.Matrix1D

Bases: EdgeDetect, ABC

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.TEdge

Bases: EuclidianDistance, Matrix1D

(TEdgeMasktype=2) Avisynth plugin.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.TEdgeTedgemask

Bases: Matrix1D, EdgeDetect

(tedgemask.TEdgeMask(threshold=0.0, type=2)) Vapoursynth plugin.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolay

Bases: EuclidianDistance, Matrix1D

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad5

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 5

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad7

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad9

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad11

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad13

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad15

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad17

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad19

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad21

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad23

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quad25

Bases: SavitzkyGolay

Savitzky-Golay first quadratic derivative operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic5

Bases: SavitzkyGolay

Savitzky-Golay first cubic/quartic operator of size 5

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic7

Bases: SavitzkyGolay

Savitzky-Golay first cubic/quartic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic9

Bases: SavitzkyGolay

Savitzky-Golay first cubic/quartic operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic11

Bases: SavitzkyGolay

Savitzky-Golay first cubic/quartic operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic13

Bases: SavitzkyGolayNormalise

Savitzky-Golay first cubic/quartic operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic15

Bases: SavitzkyGolayNormalise

Savitzky-Golay first cubic/quartic operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic17

Bases: SavitzkyGolay

Savitzky-Golay first cubic/quartic operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic19

Bases: SavitzkyGolayNormalise

Savitzky-Golay first cubic/quartic operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic21

Bases: SavitzkyGolayNormalise

Savitzky-Golay first cubic/quartic operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic23

Bases: SavitzkyGolayNormalise

Savitzky-Golay first cubic/quartic operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Cubic25

Bases: SavitzkyGolayNormalise

Savitzky-Golay first cubic/quartic operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint7

Bases: SavitzkyGolay

Savitzky-Golay first quintic/sextic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint9

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint11

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint13

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint15

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint17

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint19

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint21

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint23

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv1Quint25

Bases: SavitzkyGolayNormalise

Savitzky-Golay first quintic/sextic derivative operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad5

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 5

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad7

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad9

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad11

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad13

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad15

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad17

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad19

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad21

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad23

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quad25

Bases: SavitzkyGolay

Savitzky-Golay second quadratic/cubic derivative operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart7

Bases: SavitzkyGolay

Savitzky-Golay second quartic/quintic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart9

Bases: SavitzkyGolay

Savitzky-Golay second quartic/quintic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart11

Bases: SavitzkyGolay

Savitzky-Golay second quartic/quintic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart13

Bases: SavitzkyGolayNormalise

Savitzky-Golay second quartic/quintic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart15

Bases: SavitzkyGolayNormalise

Savitzky-Golay second quartic/quintic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart17

Bases: SavitzkyGolayNormalise

Savitzky-Golay second quartic/quintic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart19

Bases: SavitzkyGolayNormalise

Savitzky-Golay second quartic/quintic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart21

Bases: SavitzkyGolayNormalise

Savitzky-Golay second quartic/quintic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart23

Bases: SavitzkyGolayNormalise

Savitzky-Golay second quartic/quintic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv2Quart25

Bases: SavitzkyGolayNormalise

Savitzky-Golay second quartic/quintic derivativeoperator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub5

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 5

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub7

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub9

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub11

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub13

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub15

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub17

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub19

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub21

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub23

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Cub25

Bases: SavitzkyGolay

Savitzky-Golay third cubic/quartic derivative operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint7

Bases: SavitzkyGolay

Savitzky-Golay third quintic/sexic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint9

Bases: SavitzkyGolay

Savitzky-Golay third quintic/sexic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint11

Bases: SavitzkyGolay

Savitzky-Golay third quintic/sexic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint13

Bases: SavitzkyGolayNormalise

Savitzky-Golay third quintic/sexic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint15

Bases: SavitzkyGolayNormalise

Savitzky-Golay third quintic/sexic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint17

Bases: SavitzkyGolayNormalise

Savitzky-Golay third quintic/sexic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint19

Bases: SavitzkyGolayNormalise

Savitzky-Golay third quintic/sexic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint21

Bases: SavitzkyGolayNormalise

Savitzky-Golay third quintic/sexic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint23

Bases: SavitzkyGolayNormalise

Savitzky-Golay third quintic/sexic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv3Quint25

Bases: SavitzkyGolayNormalise

Savitzky-Golay third quintic/sexic derivative operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart7

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart9

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart11

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart13

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart15

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart17

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart19

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart21

Bases: SavitzkyGolay

Savitzky-Golay fourth quartic/quintic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart23

Bases: SavitzkyGolayNormalise

Savitzky-Golay fourth quartic/quintic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv4Quart25

Bases: SavitzkyGolayNormalise

Savitzky-Golay fourth quartic/quintic derivative operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint7

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 7

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint9

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 9

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint11

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 11

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint13

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 13

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint15

Bases: SavitzkyGolayNormalise

Savitzky-Golay fifth quintic/sexic derivative operator of size 15

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint17

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 17

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint19

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 19

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint21

Bases: SavitzkyGolayNormalise

Savitzky-Golay fifth quintic/sexic derivative operator of size 21

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint23

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 23

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SavitzkyGolayDeriv5Quint25

Bases: SavitzkyGolay

Savitzky-Golay fifth quintic/sexic derivative operator of size 25

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Matrix2x2

Bases: EdgeDetect, ABC

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Roberts

Bases: RidgeDetect, EuclidianDistance, Matrix2x2

Lawrence Roberts operator. 2x2 matrices computed in 3x3 matrices.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.Matrix3x3

Bases: EdgeDetect, ABC

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Laplacian1

Bases: SingleMatrix, Matrix3x3

Pierre-Simon de Laplace operator 1st implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Laplacian2

Bases: SingleMatrix, Matrix3x3

Pierre-Simon de Laplace operator 2nd implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Laplacian3

Bases: SingleMatrix, Matrix3x3

Pierre-Simon de Laplace operator 3rd implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Laplacian4

Bases: SingleMatrix, Matrix3x3

Pierre-Simon de Laplace operator 4th implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Kayyali

Bases: SingleMatrix, Matrix3x3

Kayyali operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Tritical

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

Operator used in Tritical’s original TCanny filter. Plain and simple orthogonal first order derivative.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.TriticalTCanny

Bases: Matrix3x3, EdgeDetect

Operator used in Tritical’s original TCanny filter. Plain and simple orthogonal first order derivative.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Cross

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

“HotDoG” Operator from AVS ExTools by Dogway. Plain and simple cross first order derivative.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.Prewitt

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

Judith M. S. Prewitt operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.PrewittStd

Bases: Matrix3x3, EdgeDetect

Judith M. S. Prewitt Vapoursynth plugin operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.PrewittTCanny

Bases: Matrix3x3, EdgeDetect

Judith M. S. Prewitt TCanny plugin operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Sobel

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

Sobel–Feldman operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.SobelStd

Bases: Matrix3x3, EdgeDetect

Sobel–Feldman Vapoursynth plugin operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.SobelTCanny

Bases: Matrix3x3, EdgeDetect

Sobel–Feldman Vapoursynth plugin operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.ASobel

Bases: Matrix3x3, EdgeDetect

Modified Sobel–Feldman operator from AWarpSharp.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Scharr

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

Original H. Scharr optimised operator which attempts to achieve the perfect rotational symmetry with coefficients 3 and 10.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.RScharr

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

Refined H. Scharr operator to more accurately calculate 1st derivatives for a 3x3 kernel with coeffs 47 and 162.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.ScharrTCanny

Bases: Matrix3x3, EdgeDetect

  1. Scharr optimised TCanny Vapoursynth plugin operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Kroon

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

Dirk-Jan Kroon operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.KroonTCanny

Bases: Matrix3x3, EdgeDetect

Dirk-Jan Kroon TCanny Vapoursynth plugin operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.FreyChenG41

Bases: RidgeDetect, EuclidianDistance, Matrix3x3

“Chen Frei” operator. 3x3 matrices from G41Fun.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.FreyChen

Bases: MatrixEdgeDetect

Chen Frei operator. 3x3 matrices properly implemented.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Robinson3

Bases: Max, Matrix3x3

Robinson compass operator level 3.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Robinson5

Bases: Max, Matrix3x3

Robinson compass operator level 5.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.TheToof

Bases: Max, Matrix3x3

TheToof compass operator from SharpAAMCmod.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Kirsch

Bases: Max, Matrix3x3

Russell Kirsch compass operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.KirschTCanny

Bases: Matrix3x3, EdgeDetect

Russell Kirsch compass TCanny Vapoursynth plugin operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.MinMax(rady=2, radc=0)

Bases: EdgeDetect

Min/max mask with separate luma/chroma radii.

Parameters
  • rady (int) – Luma radius

  • radc (int) – Chroma radius

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Matrix5x5

Bases: EdgeDetect, ABC

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.ExLaplacian1

Bases: SingleMatrix, Matrix5x5

Extended Pierre-Simon de Laplace operator, 1st implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.ExLaplacian2

Bases: SingleMatrix, Matrix5x5

Extended Pierre-Simon de Laplace operator, 2nd implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.ExLaplacian3

Bases: SingleMatrix, Matrix5x5

Extended Pierre-Simon de Laplace operator, 3rd implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.ExLaplacian4

Bases: SingleMatrix, Matrix5x5

Extended Pierre-Simon de Laplace operator, 4th implementation.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.LoG

Bases: SingleMatrix, Matrix5x5

Laplacian of Gaussian operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.ExPrewitt

Bases: RidgeDetect, EuclidianDistance, Matrix5x5

Extended Judith M. S. Prewitt operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.ExSobel

Bases: RidgeDetect, EuclidianDistance, Matrix5x5

Extended Sobel–Feldman operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.FDoG

Bases: RidgeDetect, EuclidianDistance, Matrix5x5

Flow-based Difference of Gaussian

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.FDoGTCanny

Bases: Matrix5x5, EdgeDetect

Flow-based Difference of Gaussian TCanny Vapoursynth plugin.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.DoG

Bases: EuclidianDistance, Matrix5x5

Zero-cross (of the 2nd derivative) of a Difference of Gaussians

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

class vsmask.edge.Farid

Bases: RidgeDetect, EuclidianDistance, Matrix5x5

Farid & Simoncelli operator.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

class vsmask.edge.ExKirsch

Bases: Max

Extended Russell Kirsch compass operator. 5x5 matrices.

edgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes edge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode

Returns

Mask clip

ridgemask(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Makes ridge mask based on convolution kernel. The resulting mask can be thresholded with lthr, hthr and multiplied with multi.

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – Low threshold. Anything below lthr will be set to 0

  • hthr (Optional[float]) – High threshold. Anything above hthr will be set to the range max

  • multi (float) – Multiply all pixels by this before thresholding

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

vs.VideoNode | NoReturn

Returns

Mask clip

vsmask.edge.get_all_edge_detects(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Returns all the EdgeDetect subclasses

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – See EdgeDetect.get_mask()

  • hthr (Optional[float]) – See EdgeDetect.get_mask()

  • multi (float) – See EdgeDetect.get_mask()

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

List[vs.VideoNode]

Returns

A list edge masks

vsmask.edge.get_all_ridge_detect(clip, lthr=0.0, hthr=None, multi=1.0, clamp=False)

Returns all the RidgeDetect subclasses

Parameters
  • clip (vs.VideoNode) – Source clip

  • lthr (float) – See EdgeDetect.get_mask()

  • hthr (Optional[float]) – See EdgeDetect.get_mask()

  • multi (float) – See EdgeDetect.get_mask()

  • clamp (bool | Tuple[float, float] | List[Tuple[float, float]]) – Clamp to TV or full range if True or specified range (low, high)

Return type

List[vs.VideoNode]

Returns

A list edge masks

Utility functions

vsmask.util.max_expr(n)

Dynamic variable max string to be integrated in std.Expr.

Parameters

n (int) – Number of elements.

Return type

str

Returns

Expression

class vsmask.util.XxpandMode(value)

Expand/inpand mode

RECTANGLE = <object object>

Rectangular shape

ELLIPSE = <object object>

Elliptical shape

LOSANGE = <object object>

Diamond shape

vsmask.util.morpho_transfo(clip, func, sw, sh=None, mode=XxpandMode.RECTANGLE, thr=None, planes=None)

Calls a morphological function in order to grow or shrink a clip from the desired width and height.

Parameters
  • clip (vs.VideoNode) – Source clip.

  • func (MorphoFunc) – Morphological function.

  • sw (int) – Growing/shrinking shape width.

  • sh (Optional[int]) – Growing/shrinking shape height. If not specified, default to sw.

  • mode (XxpandMode) – Shape form. Ellipses are combinations of rectangles and losanges and look more like octogons. Losanges are truncated (not scaled) when sw and sh are not equal.

  • thr (Optional[int]) – Allows to limit how much pixels are changed. Output pixels will not become less than input - threshold. The default is no limit.

  • planes (int | Sequence[int] | None) – Specifies which planes will be processed. Any unprocessed planes will be simply copied.

Return type

vs.VideoNode

Returns

Transformed clip

vsmask.util.expand(clip, sw, sh=None, mode=XxpandMode.RECTANGLE, thr=None, planes=None)

Calls std.Maximum in order to grow each pixel with the largest value in its 3x3 neighbourhood from the desired width and height.

Parameters
  • clip (vs.VideoNode) – Source clip.

  • sw (int) – Growing shape width.

  • sh (Optional[int]) – Growing shape height. If not specified, default to sw.

  • mode (XxpandMode) – Shape form. Ellipses are combinations of rectangles and losanges and look more like octogons. Losanges are truncated (not scaled) when sw and sh are not equal.

  • thr (Optional[int]) – Allows to limit how much pixels are changed. Output pixels will not become less than input - threshold. The default is no limit.

  • planes (int | Sequence[int] | None) – Specifies which planes will be processed. Any unprocessed planes will be simply copied.

Return type

vs.VideoNode

Returns

Transformed clip

vsmask.util.inpand(clip, sw, sh=None, mode=XxpandMode.RECTANGLE, thr=None, planes=None)

Calls std.Minimum in order to shrink each pixel with the smallest value in its 3x3 neighbourhood from the desired width and height.

Parameters
  • clip (vs.VideoNode) – Source clip.

  • sw (int) – Shrinking shape width.

  • sh (Optional[int]) – Shrinking shape height. If not specified, default to sw.

  • mode (XxpandMode) – Shape form. Ellipses are combinations of rectangles and losanges and look more like octogons. Losanges are truncated (not scaled) when sw and sh are not equal.

  • thr (Optional[int]) – Allows to limit how much pixels are changed. Output pixels will not become less than input - threshold. The default is no limit.

  • planes (int | Sequence[int] | None) – Specifies which planes will be processed. Any unprocessed planes will be simply copied.

Return type

vs.VideoNode

Returns

Transformed clip

vsmask.util.max_planes(*clips, resizer=core.resize.Bilinear)

Set max value of all the planes of all the clips

Output clip format is a GRAY clip with the same bitdepth as the first clip

Parameters
  • clips (VideoNode) – Source clips.

  • resizer (ZResizer) – Resizer used for converting the clips to the same width, height and to 444.

Return type

VideoNode

Returns

Maxed clip

vsmask.util.region_mask(clip, left=0, right=0, top=0, bottom=0)

Alias for region_rel_mask()

Region relatively the clip with the desired numbers of pixels

Parameters
  • clip (VideoNode) – Source clip

  • left (int) – Left side

  • right (int) – Right side

  • top (int) – Top side

  • bottom (int) – Bottom side

Return type

VideoNode

Returns

Regionned mask

vsmask.util.region_rel_mask(clip, left=0, right=0, top=0, bottom=0)

Region relatively the clip with the desired numbers of pixels

Parameters
  • clip (VideoNode) – Source clip

  • left (int) – Left side

  • right (int) – Right side

  • top (int) – Top side

  • bottom (int) – Bottom side

Return type

VideoNode

Returns

Regionned mask

vsmask.util.region_abs_mask(clip, width, height, left=0, top=0)

Region the clip with absolute desired dimensions

Parameters
  • clip (VideoNode) – Source clip

  • width (int) – Width of the box

  • height (int) – Height of the box

  • left (int) – Shift from the left, AKA x parameter

  • top (int) – Shift from the top, AKA y parameter

Return type

VideoNode

Returns

Regionned mask