Class GLLaplacianBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenGL
- Assembly
- VisioForge.Core.dll
OpenGL-accelerated Laplacian edge detection filter block for advanced image processing and edge enhancement. Implements the Laplacian operator, a second-order derivative filter that detects edges and fine details by highlighting areas of rapid intensity change, commonly used for sharpening and feature detection in computer vision applications. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class GLLaplacianBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
GLLaplacianBlock(GLLaplacianVideoEffect)
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenGL.GLLaplacianBlock class with the specified Laplacian filter settings. Creates the necessary input and output pads for video processing with edge detection and enhancement.
public GLLaplacianBlock(GLLaplacianVideoEffect settings)Parameters
settingsGLLaplacianVideoEffect-
The Laplacian effect settings that define the edge detection parameters.
Properties
Input
Gets the primary input pad for receiving video frames to be edge-detected.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (single input for video processing).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad for providing Laplacian-processed video frames.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (single output for processed video).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the Laplacian filter settings that control the edge detection parameters and intensity.
public GLLaplacianVideoEffect Settings { get; set; }Property Value
Type
Gets the media block type identifier for OpenGL Laplacian operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the OpenGL Laplacian edge detection block within the pipeline context. Creates the GStreamer Laplacian filter, applies the edge detection settings, and establishes the necessary pad connections for processing video frames with second-order derivative edge enhancement.
public override bool Build()Returns
- bool
-
trueif the Laplacian edge detection block was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the OpenGL Laplacian edge detection, including GStreamer elements and GPU shader programs.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the OpenGL Laplacian edge detection block. Properly disposes of GStreamer elements and GPU image processing shader 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 GStreamer element wrapper for advanced configuration and monitoring.
public BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper providing access to the underlying GStreamer Laplacian filter.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The native Gst.Element representing the Laplacian edge detection filter.
IsAvailable()
Determines whether OpenGL Laplacian edge detection functionality is available on the current system. Requires OpenGL support and appropriate GStreamer OpenGL image processing plugins to be installed.
public static bool IsAvailable()Returns
- bool
-
trueif Laplacian edge detection operations are supported; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this OpenGL Laplacian edge detection block, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this Laplacian edge detection block.