Class CVLaplaceBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenCV
- Assembly
- VisioForge.Core.dll
OpenCV Laplacian edge detection block for advanced image analysis and feature extraction. This block applies the Laplacian operator to detect edges and rapid intensity changes in video frames. The Laplacian is a second-order derivative operator that's particularly effective at finding edge discontinuities and fine details. Often used in image sharpening, blob detection, and computer vision applications where edge definition is critical. Provides configurable kernel sizes and normalization options for different image types and analysis requirements. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class CVLaplaceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
CVLaplaceBlock(CVLaplaceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenCV.CVLaplaceBlock class with the specified Laplacian edge detection settings.
public CVLaplaceBlock(CVLaplaceSettings settings)Parameters
settingsCVLaplaceSettings-
The Laplacian 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 Laplacian 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 Laplacian block.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the Laplacian configuration settings. Defines kernel parameters, normalization options, and edge detection sensitivity.
public CVLaplaceSettings 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 Laplacian element within the pipeline. This method creates the Laplacian filter with the specified edge detection settings, establishes input and output pads, and prepares the block for image analysis.
public override bool Build()Returns
- bool
-
trueif the Laplacian element was successfully built and configured;falseif initialization failed.
CleanUp()
Releases all resources and performs cleanup operations for this OpenCV Laplacian block. This method disposes of the Laplacian 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 Laplacian element.
public BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper instance that encapsulates the Laplacian functionality.
GetElement()
Gets the underlying GStreamer element that performs the Laplacian operation.
public Element GetElement()Returns
- Element
-
The GStreamer Element instance representing the OpenCV Laplacian 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 Laplacian operator support.
public static bool IsAvailable()Returns
- bool
-
trueif OpenCV Laplacian functionality is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Associates this OpenCV Laplacian 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.