The framework provide by this class will allow complex video
processing systems to be constructed from simple tasks. Often video
processing loops can be complicated because data needs to persist across
many frame and many operations or tasks need to be completed to solve a
video analysis problem. This class allows for many small and simple
tasks to be managed in a way that can produce a complex and powerful
system. #
Tasks request only the data they need, which keeps the complexity of
tasks as simple as possible. This also reduces the coupling between
tasks and eliminates complex video processing loops. The video task
manager handles much of the complexity of the video processing system
like data buffering, and insures that each task gets its required data.
#
This class manages tasks that are run on video frames. The video task
manager maintains a list of data objects and task objects. Each task is
a listener for data objects. When the data objects are avalible required
to execute a task the tasks execute method will be called and the
required data items will be passed as arguments. #
New frames are added using the addFrame method. When a frame is added
it creates a data item that includes a frame_id, a data type of
"FRAME", and a pv.Image that contains the frame data. Tasks
can register to receive that frame data or any data products of other
tasks and when that data becomes available the task will be executed.
|
|
|
addTaskFactory(self,
task_factory,
*args,
**kwargs)
This function add a task factory function to the video task manager. |
source code
|
|
|
addFrame(self,
frame,
ilog=None)
Adds a new frame to the task manager and then start processing. |
source code
|
|
|
|
|
addDataItem(self,
data_item)
Process any new data items and associate them with tasks. |
source code
|
|
|
_createTasksForFrame(self,
frame_id)
This calls the task factories to create tasks for the current frame. |
source code
|
|
|
_runTasks(self,
flush=False)
Run any tasks that have all data available. |
source code
|
|
|
|
|
|
|
|
|
showFrames(self,
ilog=None)
Show any frames with no remaining tasks. |
source code
|
|
|
recordingFile(self,
filename)
Set up an output file for recording. |
source code
|
|
|
playbackFile(self,
filename,
cache=False)
Set up an input file for playback. |
source code
|
|
|
recordingFilter(self,
data_types)
Only recorded data_types in the list. |
source code
|
|
|
taskFilter(self,
task_types)
Only generate tasks in the list. |
source code
|
|
|
playbackFilter(self,
data_types)
Only playback data_types in the list. |
source code
|
|
|
asGraph(self,
as_image=False)
This uses runtime analysis to create a dataflow graph for this VTM. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|