Class CVTrackerBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenCV
- Assembly
- VisioForge.Core.dll
OpenCV object tracking block for continuous monitoring of moving objects in video streams. This block implements advanced tracking algorithms including KCF (Kernelized Correlation Filters), CSRT (Channel and Spatial Reliability Tracker), Median Flow, and MIL (Multiple Instance Learning) trackers. Provides robust object tracking capabilities for surveillance, sports analysis, autonomous vehicles, and interactive applications. Supports initialization from bounding boxes, adaptive model updates, and tracking confidence reporting. Essential for maintaining object identity across frames despite occlusions, scale changes, and appearance variations. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class CVTrackerBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
CVTrackerBlock(CVTrackerSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenCV.CVTrackerBlock class with the specified tracking settings.
public CVTrackerBlock(CVTrackerSettings settings)Parameters
settingsCVTrackerSettings-
The tracking configuration settings containing algorithm parameters.
Properties
Input
Gets the input pad for connecting video sources to be processed.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads for this tracking block.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output pad for connecting to downstream processing blocks.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads for this tracking block.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the tracking configuration settings. Defines tracking algorithms, initialization parameters, and tracking behavior options.
public CVTrackerSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Constructs and initializes the OpenCV tracking element within the pipeline. This method creates the tracking filter with the specified algorithm settings, establishes input and output pads, and prepares the block for object tracking.
public override bool Build()Returns
- bool
-
trueif the tracking element was successfully built and configured;falseif initialization failed.
CleanUp()
Releases all resources and performs cleanup operations for this OpenCV tracking block. This method disposes of the tracking element and resets the build state.
public void CleanUp()Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the core BaseElement wrapper that provides additional functionality around the OpenCV tracking element.
public BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper instance that encapsulates the tracking functionality.
GetElement()
Gets the underlying GStreamer element that performs the tracking operation.
public Element GetElement()Returns
- Element
-
The GStreamer Element instance representing the OpenCV tracking filter.
IsAvailable()
Determines whether this media block is available. Correct NuGet SDK redist should be included into your project. Checks for OpenCV library availability and object tracking algorithm support.
public static bool IsAvailable()Returns
- bool
-
trueif OpenCV tracking functionality is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Associates this OpenCV tracking block with a pipeline and initializes its internal context. This method is called internally when the block is added to a pipeline.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline instance that will manage this block.