Table of Contents

Class DNNFaceDetector

Namespace
VisioForge.Core.CV
Assembly
VisioForge.Core.CV.dll

Implements a Deep Neural Network (DNN) based face detector using OpenCvSharp's DNN module.

public class DNNFaceDetector : IDisposable, IFaceDetector, IVideoProcessor

Inheritance

Implements

IFaceDetector
IVideoProcessor

Inherited Members

Remarks

This detector uses a pre-trained Caffe model (SSD architecture) to detect faces with high accuracy. It requires the 'deploy.prototxt' and 'res10_300x300_ssd_iter_140000_fp16.caffemodel' resources. It supports GPU acceleration if configured and available (VFCUDA).

Constructors

DNNFaceDetector(DNNFaceDetectorSettings)

Initializes a new instance of the VisioForge.Core.CV.DNNFaceDetector class.

public DNNFaceDetector(DNNFaceDetectorSettings settings = null)

Parameters

settings DNNFaceDetectorSettings

The settings to configure the detector. If null, default settings are used.

Properties

Settings

Gets or sets the configuration settings for the DNN face detector.

public DNNFaceDetectorSettings Settings { get; set; }

Property Value

DNNFaceDetectorSettings

Methods

Clear()

Clears.

public void Clear()

Dispose()

Dispose.

public void Dispose()

Dispose(bool)

Dispose.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Disposing parameter.

~DNNFaceDetector()

Finalizes an instance of the VisioForge.Core.CV.DNNFaceDetector class.

protected ~DNNFaceDetector()

GetSupportedFrameFormats()

Gets the supported frame format.

public VideoFormatX[] GetSupportedFrameFormats()

Returns

VideoFormatX[]

VideoFormatX.

ProcessFrame(VideoFrame)

Processes the frame. Frame may be skipped according to the settings.

public void ProcessFrame(VideoFrame frame)

Parameters

frame VideoFrame

The frame.

ProcessFrame(VideoFrameX)

Processes the frame. Frame may be skipped according to the settings.

public void ProcessFrame(VideoFrameX frame)

Parameters

frame VideoFrameX

The frame.

SetContext(BaseContext)

Sets the context.

public void SetContext(BaseContext context)

Parameters

context BaseContext

The context.

FacesDetected

Event raised when one or more faces are detected in a frame.

public event EventHandler<CVFaceDetectedEventArgs> FacesDetected

Event Type

EventHandler<CVFaceDetectedEventArgs>