Class Location
- Namespace
- FaceRecognitionDotNet
- Assembly
- VisioForge.Core.FaceAI.dll
Describes the left, top, right and bottom location of a face. This class cannot be inherited.
[Serializable]
public sealed class Location : IEquatable<Location>Inheritance
Implements
Inherited Members
Constructors
Location()
Initializes a new instance of the FaceRecognitionDotNet.Location class.
public Location()Location(int, int, int, int)
Initializes a new instance of the FaceRecognitionDotNet.Location structure with the specified left, top, right and bottom.
public Location(int left, int top, int right, int bottom)Parameters
leftint-
The x-axis value of the left side of the rectangle of face.
topint-
The y-axis value of the top of the rectangle of face.
rightint-
The x-axis value of the right side of the rectangle of face.
bottomint-
The y-axis value of the bottom of the rectangle of face.
Location(int, int, int, int, double)
Initializes a new instance of the FaceRecognitionDotNet.Location structure with the specified left, top, right, bottom and confidence.
public Location(int left, int top, int right, int bottom, double confidence)Parameters
leftint-
The x-axis value of the left side of the rectangle of face.
topint-
The y-axis value of the top of the rectangle of face.
rightint-
The x-axis value of the right side of the rectangle of face.
bottomint-
The y-axis value of the bottom of the rectangle of face.
confidencedouble-
The confidence of detected face.
Properties
Bottom
Gets the y-axis value of the bottom of the rectangle of face.
public int Bottom { get; set; }Property Value
Confidence
Gets the confidence of detected face.
public double Confidence { get; set; }Property Value
Left
Gets the x-axis value of the left side of the rectangle of face.
public int Left { get; set; }Property Value
Right
Gets the x-axis value of the right side of the rectangle of face.
public int Right { get; set; }Property Value
Top
Gets the y-axis value of the top of the rectangle of face.
public int Top { get; set; }Property Value
Methods
Equals(Location)
Compares two FaceRecognitionDotNet.Location class for equality.
public bool Equals(Location other)Parameters
otherLocation-
The face location to compare to this instance.
Returns
- bool
-
if both FaceRecognitionDotNet.Location class contain the same FaceRecognitionDotNet.Location.Left, FaceRecognitionDotNet.Location.Top, FaceRecognitionDotNet.Location.Right and FaceRecognitionDotNet.Location.Bottom values; otherwise,true
.false
Equals(object)
Determines whether the specified Object is a FaceRecognitionDotNet.Location and whether it contains the same face location as this FaceRecognitionDotNet.Location.
public override bool Equals(object obj)Parameters
Returns
- bool
-
iftrueobjis a FaceRecognitionDotNet.Location and contains the same FaceRecognitionDotNet.Location.Left, FaceRecognitionDotNet.Location.Top, FaceRecognitionDotNet.Location.Right and FaceRecognitionDotNet.Location.Bottom values as this FaceRecognitionDotNet.Location; otherwise,
.false
GetHashCode()
Returns the hash code for this FaceRecognitionDotNet.Location.
public override int GetHashCode()Returns
- int
-
The hash code for this FaceRecognitionDotNet.Location class.
Operators
operator ==(Location, Location)
Compares two FaceRecognitionDotNet.Location class for equality.
public static bool operator ==(Location location1, Location location2)Parameters
location1Location-
The first FaceRecognitionDotNet.Location class to compare.
location2Location-
The second FaceRecognitionDotNet.Location class to compare.
Returns
- bool
-
if both the FaceRecognitionDotNet.Location.Left, FaceRecognitionDotNet.Location.Top, FaceRecognitionDotNet.Location.Right and FaceRecognitionDotNet.Location.Bottom face location oftruelocation1andlocation2are equal; otherwise,
.false
operator !=(Location, Location)
Compares two FaceRecognitionDotNet.Location class for inequality.
public static bool operator !=(Location location1, Location location2)Parameters
location1Location-
The first FaceRecognitionDotNet.Location class to compare.
location2Location-
The second FaceRecognitionDotNet.Location class to compare.
Returns
- bool
-
iftruelocation1andlocation2have different FaceRecognitionDotNet.Location.Left, FaceRecognitionDotNet.Location.Top, FaceRecognitionDotNet.Location.Right or FaceRecognitionDotNet.Location.Bottom coordinates;
iffalselocation1andlocation2have the same FaceRecognitionDotNet.Location.Left, FaceRecognitionDotNet.Location.Top, FaceRecognitionDotNet.Location.Right and FaceRecognitionDotNet.Location.Bottom face location.