Class CascadeFaceDetectorBlock
- 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, IMediaBlockInternalsInheritance
-
MediaBlock
Implements
-
IMediaBlockIMediaBlockInternals
Inherited Members
-
MediaBlock._isBuiltMediaBlock._pipelineMediaBlock._pipelineCtxMediaBlock.GetPipelineContext()MediaBlock.SetPipelineContext(BlockPipelineContext)MediaBlock.SetPipeline(MediaBlocksPipeline)MediaBlock.ContextMediaBlock.NameMediaBlock.IsBuiltMediaBlock.OwnerMediaBlock.TypeMediaBlock.IDMediaBlock.InputMediaBlock.InputsMediaBlock.OutputMediaBlock.OutputsMediaBlock.HasInputsMediaBlock.HasOutputsMediaBlock.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
settingsCascadeFaceDetectorSettings-
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
-
trueif 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
disposingbool-
trueto release both managed and unmanaged resources;falseto 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
pipelineMediaBlocksPipeline-
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> OnFaceDetectedEvent Type
- EventHandler<CVFaceDetectedEventArgs>
See Also
-
MediaBlockIMediaBlockInternals