Table of Contents

Class CVTextOverlayBlock

Namespace
VisioForge.Core.MediaBlocks.OpenCV
Assembly
VisioForge.Core.dll

OpenCV text overlay block for advanced text rendering and annotation in video streams. This block provides sophisticated text overlay capabilities using OpenCV's text rendering functions, supporting various fonts, styles, colors, and positioning options. Offers anti-aliasing, outline effects, shadow rendering, and Unicode text support. Essential for video annotation, subtitles, watermarking, and information display applications. Provides real-time text updates, dynamic positioning, and professional-quality typography. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class CVTextOverlayBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

CVTextOverlayBlock(CVTextOverlaySettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenCV.CVTextOverlayBlock class with the specified text overlay settings.

public CVTextOverlayBlock(CVTextOverlaySettings settings)

Parameters

settings CVTextOverlaySettings

The text overlay configuration settings containing rendering parameters.

Properties

Input

Gets the input pad for connecting video sources to be processed.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads for this text overlay block.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the output pad for connecting to downstream processing blocks.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads for this text overlay block.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the text overlay configuration settings. Defines text content, font properties, positioning, and visual styling options.

public CVTextOverlaySettings Settings { get; set; }

Property Value

CVTextOverlaySettings

Type

Gets the media block type identifier.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Constructs and initializes the OpenCV text overlay element within the pipeline. This method creates the text overlay filter with the specified typography settings, establishes input and output pads, and prepares the block for text rendering.

public override bool Build()

Returns

bool

true if the text overlay element was successfully built and configured; false if initialization failed.

CleanUp()

Releases all resources and performs cleanup operations for this OpenCV text overlay block. This method disposes of the text overlay element and resets the build state.

public void CleanUp()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

GetCore()

Gets the core BaseElement wrapper that provides additional functionality around the OpenCV text overlay element.

public BaseElement GetCore()

Returns

BaseElement

The BaseElement wrapper instance that encapsulates the text overlay functionality.

GetElement()

Gets the underlying GStreamer element that performs the text overlay operation.

public Element GetElement()

Returns

Element

The GStreamer Element instance representing the OpenCV text overlay 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 text rendering support.

public static bool IsAvailable()

Returns

bool

true if OpenCV text overlay functionality is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Associates this OpenCV text overlay 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

pipeline MediaBlocksPipeline

The MediaBlocksPipeline instance that will manage this block.

See Also