Table of Contents

Class CVHandDetectBlock

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

OpenCV hand detection block for identifying and tracking human hands in video streams. This block uses computer vision algorithms to detect hand positions, gestures, and movements in real-time video. Supports gesture recognition, hand tracking for interactive applications, sign language processing, and touchless user interfaces. Uses machine learning models trained on hand features to provide accurate detection across various lighting conditions and hand poses. Essential for gesture-controlled systems, accessibility applications, and human-computer interaction. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class CVHandDetectBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

CVHandDetectBlock(CVHandDetectSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenCV.CVHandDetectBlock class with the specified hand detection settings.

public CVHandDetectBlock(CVHandDetectSettings settings)

Parameters

settings CVHandDetectSettings

The hand detection 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

MediaBlockPad

Inputs

Gets all input pads for this hand detection 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 hand detection block.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the hand detection configuration settings. Defines detection algorithms, sensitivity parameters, and tracking options.

public CVHandDetectSettings Settings { get; set; }

Property Value

CVHandDetectSettings

Type

Gets the media block type identifier.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Constructs and initializes the OpenCV hand detection element within the pipeline. This method creates the hand detection filter with the specified algorithm settings, establishes input and output pads, and prepares the block for gesture recognition processing.

public override bool Build()

Returns

bool

true if the hand detection element was successfully built and configured; false if initialization failed.

CleanUp()

Releases all resources and performs cleanup operations for this OpenCV hand detection block. This method disposes of the hand detection element, unsubscribes from events, 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 hand detection element.

public BaseElement GetCore()

Returns

BaseElement

The BaseElement wrapper instance that encapsulates the hand detection functionality.

GetElement()

Gets the underlying GStreamer element that performs the hand detection operation.

public Element GetElement()

Returns

Element

The GStreamer Element instance representing the OpenCV hand detection 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 hand detection algorithm support.

public static bool IsAvailable()

Returns

bool

true if OpenCV hand detection functionality is available; otherwise, false.

ProcessBusMessage(Structure)

Processes GStreamer bus messages for hand detection events and notifications. This method handles internal communication and triggers hand detection events.

public void ProcessBusMessage(Structure data)

Parameters

data Structure

The GStreamer message data containing detection information.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Associates this OpenCV hand detection 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.

HandDetected

Event raised when hands are detected in the video stream. Provides hand coordinates, gesture information, and detection metadata.

public event EventHandler<CVHandDetectedEventArgs> HandDetected

Event Type

EventHandler<CVHandDetectedEventArgs>

See Also