Implementation of image processing pipelines¶
Image processing and tracking pipelines are defined by subclassing the
The pipelines are defined as trees of nodes, starting from the camera image
with each node parametrized using lightparam.
The image processing nodes are subclasses of
ImageToImageNode whereas the terminal
Attributes of pipelines are:
a tree of processing nodes, along
(optional) a subclass of the camera window which displays the tracking overlay
(optional) an extra plotting window class
the nodes can be set as attributes of the class,
with names that are arbitrary, except for how they are used
by the display and plotting classes (see the
stytra.experiments.fish_pipelines for examples)
Nodes must have:
A _process method which contains optional parameters as keyword arguments, annotated with Params for everything that can be changed from the user interface.
The _process function has to output a
NodeOutput named tuple (from
stytra.tracking.pipelines) which contains a list of diagnostic messages (can be empty), and either an image if the node is a
ImageToImageNode or a NamedTuple if the node is a
Optionally, if the processing function is stateful (depends on previous inputs), you can define a reset function which resets the state.