VisioForge (c) 2025

Search Results for

    Class FaceDetector

    Face detector.

    Inheritance
    Object
    FaceDetector
    Implements
    IDisposable
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: VisioForge.Core.CV
    Assembly: VisioForge.Core.CV.dll
    Syntax
    public class FaceDetector : IDisposable

    Constructors

    FaceDetector()

    Initializes a new instance of the FaceDetector class.

    Declaration
    public FaceDetector()

    Properties

    DrawColor

    Gets or sets the draw color.

    Declaration
    public SKColor DrawColor { get; set; }
    Property Value
    Type Description
    SKColor

    DrawEnabled

    Gets or sets a value indicating whether draw enabled.

    Declaration
    public bool DrawEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    DrawShapeType

    Gets or sets the draw shape type.

    Declaration
    public CVShapeType DrawShapeType { get; set; }
    Property Value
    Type Description
    CVShapeType

    FramesToSkip

    Gets or sets the frames to skip. Use this value to improve performance. Default is 5.

    Declaration
    public int FramesToSkip { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    Usually you can analyze 5 frames per second video. For example is you have 30 fps video you can set this value to (30 / 5) - 1 = 5.

    Initialized

    Gets a value indicating whether initialized.

    Declaration
    public bool Initialized { get; }
    Property Value
    Type Description
    Boolean

    MaxFaceSize

    Gets or sets the maximal face size. Objects larger than that are ignored.

    Declaration
    public Size MaxFaceSize { get; set; }
    Property Value
    Type Description
    Size

    MinFaceSize

    Gets or sets the minimal face size. Objects smaller than that are ignored.

    Declaration
    public Size MinFaceSize { get; set; }
    Property Value
    Type Description
    Size

    MinNeighbors

    Gets or sets the minimal neighbors count, specifying how many neighbors each candidate rectangle should have to retain it.

    Declaration
    public int MinNeighbors { get; set; }
    Property Value
    Type Description
    Int32

    ScaleFactor

    Gets or sets the scale factor, specifying how much the image size is reduced at each image scale.

    Declaration
    public float ScaleFactor { get; set; }
    Property Value
    Type Description
    Single

    VideoScale

    Gets or sets the video scale value. 1.0 by default.

    Declaration
    public double VideoScale { get; set; }
    Property Value
    Type Description
    Double

    Methods

    Clear()

    Clears.

    Declaration
    public void Clear()

    Dispose()

    Dispose.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Dispose.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    Disposing parameter.

    Finalize()

    Finalizes an instance of the FaceDetector class.

    Declaration
    protected void Finalize()

    Init(String, String, String, String, Boolean)

    Init.

    Declaration
    public void Init(string faceCascadeFile, string eyeCascadeFile, string noseFileName, string mouthFileName, bool gpu)
    Parameters
    Type Name Description
    String faceCascadeFile

    Face cascade file.

    String eyeCascadeFile

    Eye cascade file.

    String noseFileName

    Nose cascade file.

    String mouthFileName

    Mouth cascade file.

    Boolean gpu

    True to use CUDA.

    Process(RAWImage, TimeSpan)

    Process.

    Declaration
    public CVFace[] Process(RAWImage frame, TimeSpan timestamp)
    Parameters
    Type Name Description
    RAWImage frame

    The frame.

    TimeSpan timestamp

    Timestamp.

    Returns
    Type Description
    CVFace[]

    The CVFace.

    Process(VideoFrame)

    Process.

    Declaration
    public CVFace[] Process(VideoFrame frame)
    Parameters
    Type Name Description
    VideoFrame frame

    The frame.

    Returns
    Type Description
    CVFace[]

    The CVFace.

    UpdateSettings()

    Updates settings.

    Declaration
    public void UpdateSettings()

    Events

    OnFaceDetected

    Face detected event.

    Declaration
    public event EventHandler<CVFaceDetectedEventArgs> OnFaceDetected
    Event Type
    Type Description
    EventHandler<CVFaceDetectedEventArgs>

    Implements

    IDisposable