Class FaceDetector
- Namespace
- VisioForge.Core.CVD
- Assembly
- VisioForge.Core.CVD.dll
Face detector.
public class FaceDetector : IDisposable, IFaceDetector, IVideoProcessorInheritance
Implements
-
IFaceDetectorIVideoProcessor
Inherited Members
Constructors
FaceDetector()
Initializes a new instance of the VisioForge.Core.CVD.FaceDetector class with default settings.
public FaceDetector()FaceDetector(FaceDetectorSettings)
Initializes a new instance of the VisioForge.Core.CVD.FaceDetector class with specified settings.
public FaceDetector(FaceDetectorSettings settings)Parameters
settingsFaceDetectorSettings-
The configuration settings.
Properties
Settings
Gets or sets the configuration settings for face detection.
public FaceDetectorSettings Settings { get; set; }Property Value
Methods
Clear()
Clears the internal state and resets the detector.
public void Clear()Dispose()
Disposes of the resources used by this instance.
public void Dispose()Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
~FaceDetector()
Finalizes an instance of the VisioForge.Core.CVD.FaceDetector class.
protected ~FaceDetector()GetSupportedFrameFormats()
Gets the supported frame format.
public VideoFormatX[] GetSupportedFrameFormats()Returns
- VideoFormatX[]
-
VideoFormatX.
Exceptions
Init()
Initializes the face detector instance.
public void Init()Process(VideoFrameX, TimeSpan)
Processes the video frame and returns detected faces.
public CVFace[] Process(VideoFrameX frame, TimeSpan timestamp)Parameters
frameVideoFrameX-
The video frame to process.
timestampTimeSpan-
The timestamp of the frame.
Returns
- CVFace[]
-
The VisioForge.Core.Types.VideoProcessing.CVFace.
Process(VideoFrameX)
Processes the video frame using its internal timestamp.
public CVFace[] Process(VideoFrameX frame)Parameters
frameVideoFrameX-
The video frame to process.
Returns
- CVFace[]
-
An array of VisioForge.Core.Types.VideoProcessing.CVFace objects representing the detected faces.
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 specified video frame for face detection.
public void ProcessFrame(VideoFrameX frame)Parameters
frameVideoFrameX-
The video frame to process.
SetContext(BaseContext)
Sets the context.
public void SetContext(BaseContext context)Parameters
contextBaseContext-
The context.
Exceptions
FacesDetected
Occurs when faces are detected in a frame.
public event EventHandler<CVFaceDetectedEventArgs> FacesDetectedEvent Type
- EventHandler<CVFaceDetectedEventArgs>