Class FrameSkipperVSP
source code
AbstractVSP --+
|
FrameSkipperVSP
This is a video stream processor that is used to skip every k frames
in a source video. You might put this vsp as the first step in processing
if you need to adjust a 60fps video, for example, to skip every other
frame so that downstream processing sees 30fps input.
Downstream modules will see a renumbered video stream. For example, if
every-other frame was being skipped, the nextModule would still see its
frame number input as 0,1,2,3,... even though in reality it is receiving
frames 0,2,4,... from the source video.
__init__(self,
skip_param=0,
nextModule=None)
(Constructor)
| source code
|
Constructor
- Parameters:
skip_param - If 0, then no frames are skipped. Otherwise a frame is skipped if
(frame_number + 1) modulo skip_param == 0. For example, with
skip_param of 2, then frames 1,3,5,7,... will be dropped.
- Overrides:
AbstractVSP.__init__
|
Override this abstract method with the processing your object performs
on a per-frame basis. It is recommended that you do not directly call
this method. Rather, the VSP is a callable object, and so the __call__
method takes care of invoking this method as well as calling the next
module, if any.
- Overrides:
AbstractVSP._onNewFrame
- (inherited documentation)
|