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, IVideoProcessorInheritance
Implements
-
IFaceDetectorIVideoProcessor
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
settingsDNNFaceDetectorSettings-
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
Methods
Clear()
Clears.
public void Clear()Dispose()
Dispose.
public void Dispose()Dispose(bool)
Dispose.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
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
frameVideoFrame-
The frame.
ProcessFrame(VideoFrameX)
Processes the frame. Frame may be skipped according to the settings.
public void ProcessFrame(VideoFrameX frame)Parameters
frameVideoFrameX-
The frame.
SetContext(BaseContext)
Sets the context.
public void SetContext(BaseContext context)Parameters
contextBaseContext-
The context.
FacesDetected
Event raised when one or more faces are detected in a frame.
public event EventHandler<CVFaceDetectedEventArgs> FacesDetectedEvent Type
- EventHandler<CVFaceDetectedEventArgs>