Class CVProcess
- Namespace
- VisioForge.Core.CV
- Assembly
- VisioForge.Core.CV.dll
Provides helper methods for processing computer vision frames, including pixelation, blurring, and cache management.
public static class CVProcessInheritance
Inherited Members
Methods
BlurRegion(Mat, Rect)
Applies a Gaussian blur to a specific region within a video frame.
public static void BlurRegion(Mat img, Rect region)Parameters
imgMat-
The video frame (Mat) to process.
regionRect-
The rectangular region of interest to blur.
PixelateRegion(Mat, Rect, int)
Pixelates a specific region within a video frame.
public static void PixelateRegion(Mat frame, Rect region, int pixelSize)Parameters
frameMat-
The video frame (Mat) to process.
regionRect-
The rectangular region of interest to pixelate.
pixelSizeint-
The size of the "pixel" blocks. Larger values result in more abstract pixelation.
Remarks
This method works by downscaling the region of interest and then upscaling it back to the original size using nearest-neighbor interpolation, creating a blocky effect.
ProcessCache(Mat, ref List<Tuple<CVFace, int>>, bool, bool)
Processes the list of cached faces, updates their state, merges overlapping areas, and applies visual effects (blur/pixelate).
public static void ProcessCache(Mat frame, ref List<Tuple<CVFace, int>> facesCacheList, bool blur, bool pixelate)Parameters
frameMat-
The current video frame to draw on or modify.
facesCacheListList<Tuple<CVFace, int>>-
The list of cached faces and their remaining lifetimes.
blurbool-
if set to
true, applies a blur effect to the cached face regions. pixelatebool-
if set to
true, applies a pixelation effect to the cached face regions.