Package pyvision :: Package surveillance :: Module VideoStreamProcessor :: Class FrameNumberVSP
[hide private]
[frames] | no frames]

Class FrameNumberVSP

source code

AbstractVSP --+
              |
             FrameNumberVSP

A simple VSP object simply displays the input video frame with some simple annotation to show the frame number in upper left corner. NOTE: The vid.play(...) method will automatically add a frame number annotation to the source image, which can be problematic for downstream processing. Instead, call vid.play(...,annotate=False) to suppress the frame number display, and then use this FrameNumberVSP as a final step to put the frame number on the video after any processing has occurred.

Instance Methods [hide private]
 
__init__(self, display_pad=4, window=None, nextModule=None)
Constructor
source code
 
_onNewFrame(self, img, fn, **kwargs)
Override this abstract method with the processing your object performs on a per-frame basis.
source code

Inherited from AbstractVSP: __call__

Method Details [hide private]

__init__(self, display_pad=4, window=None, nextModule=None)
(Constructor)

source code 

Constructor

Parameters:
  • display_pad - Pads the frame number with leading zeros in order to have at least this many digits.
Overrides: AbstractVSP.__init__

_onNewFrame(self, img, fn, **kwargs)

source code 

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)