motion ¶
Classes:
-
MotionVectors–Class for storing and managing motion vectors for a video clip.
MotionVectors ¶
MotionVectors(
*args: Mapping[int, VideoNode] | Iterable[tuple[int, VideoNode]],
blksize: int | tuple[int, int] | None = None,
overlap: int | tuple[int, int] | None = None,
pad: int | tuple[int, int] | None = None,
pel: int | None = None,
prefix: str = "MVTools",
**kwargs: VideoNode,
)
Bases: VSObject, dict[int, VideoNode]
Class for storing and managing motion vectors for a video clip.
Contains both backward and forward motion vectors.
Methods:
-
clear–Clear all stored motion vectors.
-
get_vectors–Get the backward and forward vectors.
Attributes:
-
blksize(tuple[int, int] | None) – -
overlap(tuple[int, int] | None) – -
pad(tuple[int, int] | None) – -
pel– -
prefix–
Source code in vsdenoise/mvtools/motion.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
clear ¶
clear() -> None
Clear all stored motion vectors.
Source code in vsdenoise/mvtools/motion.py
63 64 65 66 67 68 69 70 71 72 73 | |
get_vectors ¶
get_vectors(
tr: int | None = None, delta: int | Sequence[int] | None = None
) -> tuple[list[VideoNode], list[VideoNode]]
Get the backward and forward vectors.
Parameters:
-
(tr¶int | None, default:None) –The number of frames to get the vectors for.
-
(delta¶int | Sequence[int] | None, default:None) –Specific delta(s) of motion vectors to use.
Returns:
-
list[VideoNode]–A tuple containing two lists of motion vectors.
-
list[VideoNode]–The first list contains backward vectors and the second contains forward vectors.
Source code in vsdenoise/mvtools/motion.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |