Table of Contents

Class CascadeFaceDetectorBlock

Namespace
VisioForge.Core.MediaBlocks.VideoProcessing
Assembly
VisioForge.Core.CV.dll

A media block that integrates the Cascade Face Detector into a video processing pipeline.

public class CascadeFaceDetectorBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

MediaBlock

Implements

IMediaBlock
IMediaBlockInternals

Inherited Members

MediaBlock._isBuilt
MediaBlock._pipeline
MediaBlock._pipelineCtx
MediaBlock.GetPipelineContext()
MediaBlock.SetPipelineContext(BlockPipelineContext)
MediaBlock.SetPipeline(MediaBlocksPipeline)
MediaBlock.Context
MediaBlock.Name
MediaBlock.IsBuilt
MediaBlock.Owner
MediaBlock.Type
MediaBlock.ID
MediaBlock.Input
MediaBlock.Inputs
MediaBlock.Output
MediaBlock.Outputs
MediaBlock.HasInputs
MediaBlock.HasOutputs
MediaBlock.Build()
MediaBlock.CreateElements()
MediaBlock.AddElementsToPipeline()
MediaBlock.RemoveElementsFromPipeline()
MediaBlock.DeepCopy(string)
MediaBlock.Reset()
MediaBlock.ToYAMLBlock()
MediaBlock.ClearPads()
MediaBlock.Dispose(bool)
MediaBlock.Dispose()

Remarks

This block intercepts video frames, processes them using the VisioForge.Core.CV.CascadeFaceDetector, and then passes them downstream. It can raise events when faces are detected.

Constructors

CascadeFaceDetectorBlock(CascadeFaceDetectorSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoProcessing.CascadeFaceDetectorBlock class.

public CascadeFaceDetectorBlock(CascadeFaceDetectorSettings settings = null)

Parameters

settings CascadeFaceDetectorSettings

The configuration settings for the face detector. If null, default settings are used.

Properties

Input

Gets the primary input pad.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads associated with this block.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads associated with this block.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Type

Gets the media block type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Validates parameters and initializes the GStreamer element for this block.

public override bool Build()

Returns

bool

true if the build was successful; otherwise, false.

CleanUp()

Releases resources and cleans up the underlying GStreamer element.

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()

Retrieves the underlying GStreamer BaseElement used by this block.

public BaseElement GetCore()

Returns

BaseElement

The VisioForge.Core.GStreamer.Base.BaseElement implementation.

GetElement()

Retrieves the underlying GStreamer Element.

public Element GetElement()

Returns

Element

The raw GStreamer Gst.Element.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this block.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The media blocks pipeline that this block belongs to.

OnFaceDetected

Event raised when a face is detected in the processed video stream.

public event EventHandler<CVFaceDetectedEventArgs> OnFaceDetected

Event Type

EventHandler<CVFaceDetectedEventArgs>

See Also

MediaBlock
IMediaBlockInternals