Table of Contents

Class GLLaplacianVideoEffect

Namespace
VisioForge.Core.Types.X.OpenGL
Assembly
VisioForge.Core.dll

Applies hardware-accelerated Laplacian edge detection filter to video frames using OpenGL/OpenGL ES shaders. This effect detects edges by computing the second derivative of image intensity, emphasizing regions of rapid intensity change.

public class GLLaplacianVideoEffect : GLBaseVideoEffect

Inheritance

Inherited Members

Remarks

SDK Availability: Available in: VideoCaptureCoreX, MediaPlayerCoreX, Media Blocks SDK (Cross-platform)

Platform Support: Windows, Linux, macOS, Android, iOS (OpenGL ES)

OpenGL Acceleration: This effect is fully GPU-accelerated using OpenGL 3.0+ on desktop platforms and OpenGL ES 2.0+ on mobile devices. The Laplacian operator is implemented as a fragment shader that applies a 3x3 convolution kernel to detect edges based on second-order derivatives. All processing occurs on the GPU with zero CPU involvement, enabling real-time edge detection at high frame rates.

Effect Description: The Laplacian is a second-order derivative operator that measures the rate of change of the gradient in an image. Unlike the Sobel operator which computes first-order derivatives in specific directions, the Laplacian is isotropic and detects edges regardless of direction. It highlights areas of rapid intensity change, making it particularly sensitive to fine details and noise. The output emphasizes edges and texture details, producing bright edges on a dark background (or vice versa with invert enabled). The Laplacian is more sensitive to fine details compared to Sobel but also more sensitive to noise.

Use Cases:

  • Fine detail enhancement in video processing and computer vision applications
  • Texture analysis and feature detection requiring high sensitivity
  • Image sharpening and edge enhancement for visual quality improvement
  • Defect detection in industrial inspection systems requiring fine detail sensitivity
  • Medical imaging applications for subtle feature enhancement
  • Artistic video effects creating detailed sketch-like or engraving visuals

Performance Characteristics: This effect has minimal performance impact as it runs entirely on the GPU. Typical overhead is less than 1ms per frame on modern hardware. The Laplacian operator requires only a single 3x3 convolution kernel, making it computationally efficient. Performance scales linearly with resolution but remains real-time capable even at 4K resolutions on mid-range GPUs. The effect does not require CPU-GPU data transfer, making it suitable for high-throughput video processing. On mobile devices with OpenGL ES, performance remains excellent for resolutions up to 1080p.

Constructors

GLLaplacianVideoEffect()

Initializes a new instance of the VisioForge.Core.Types.X.OpenGL.GLLaplacianVideoEffect class.

public GLLaplacianVideoEffect()

Properties

Invert

Gets or sets a value indicating whether to invert colors to get dark edges on bright background.

public bool Invert { get; set; }

Property Value

bool

Remarks

When set to false, the effect produces the standard Laplacian output with bright edges on a dark background, which is useful for edge emphasis and computer vision applications. When set to true, the colors are inverted, creating dark edges on a bright background, which can be more suitable for artistic effects or engraving-style visualizations. This inversion is performed in the GPU shader with no additional performance cost.

See Also