freqs ¶
Classes:
-
MeanMode
–Enum of different mean for combining clips.
MeanMode ¶
Bases: CustomEnum
Enum of different mean for combining clips.
Methods:
-
__call__
–Applies the selected mean to one or more video clips.
Attributes:
-
ARITHMETIC
–Arithmetic mean.
-
CONTRAHARMONIC
–Contraharmonic mean, implemented as a Lehmer mean withs p=2
-
GEOMETRIC
–Geometric mean, implemented as a Lehmer mean with p=0.5.
-
HARMONIC
–Harmonic mean, implemented as a Lehmer mean with p=0.
-
LEHMER
–Lehmer mean, configurable with parameter
p
. -
MAXIMUM
–Maximum value across all clips
-
MEDIAN
–Median value across all clips
-
MINIMUM
–Minimum value across all clips
CONTRAHARMONIC class-attribute
instance-attribute
¶
CONTRAHARMONIC = 2
Contraharmonic mean, implemented as a Lehmer mean withs p=2
GEOMETRIC class-attribute
instance-attribute
¶
GEOMETRIC = 0.5
Geometric mean, implemented as a Lehmer mean with p=0.5.
HARMONIC class-attribute
instance-attribute
¶
HARMONIC = 0
Harmonic mean, implemented as a Lehmer mean with p=0.
LEHMER class-attribute
instance-attribute
¶
LEHMER = 3
Lehmer mean, configurable with parameter p
.
Note: An odd number for p
is preferred as it will avoid negative inputs.
__call__ ¶
__call__(
*_clips: VideoNodeIterableT[VideoNode],
p: float = 3,
planes: Planes = None,
func: FuncExcept | None = None
) -> ConstantFormatVideoNode
__call__(
*_clips: VideoNodeIterableT[VideoNode],
planes: Planes = None,
func: FuncExcept | None = None
) -> ConstantFormatVideoNode
__call__(
*_clips: VideoNodeIterableT[VideoNode],
planes: Planes = None,
func: FuncExcept | None = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Applies the selected mean to one or more video clips.
Parameters:
-
*_clips
¶VideoNodeIterableT[VideoNode]
, default:()
) –Input clips to combine.
-
planes
¶Planes
, default:None
) –Which planes to process.
func: An optional function to use for error handling. **kwargs: Additional keyword arguments for certain modes.
- p (float): Exponent for `LEHMER` mode. Defaults to 3.
Returns:
-
ConstantFormatVideoNode
–A new clip containing the combined frames.
Source code in vsrgtools/freqs.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|