Class Location
Describes the left, top, right and bottom location of a face. This class cannot be inherited.
Inheritance
Implements
Inherited Members
Namespace: FaceRecognitionDotNet
Assembly: FaceRecognitionDotNet.dll
Syntax
public sealed class Location : IEquatable<Location>
Constructors
| Improve this Doc View SourceLocation(Int32, Int32, Int32, Int32)
Initializes a new instance of the Location structure with the specified left, top, right and bottom.
Declaration
public Location(int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | The x-axis value of the left side of the rectangle of face. |
System.Int32 | top | The y-axis value of the top of the rectangle of face. |
System.Int32 | right | The x-axis value of the right side of the rectangle of face. |
System.Int32 | bottom | The y-axis value of the bottom of the rectangle of face. |
Location(Int32, Int32, Int32, Int32, Double)
Initializes a new instance of the Location structure with the specified left, top, right, bottom and confidence.
Declaration
public Location(int left, int top, int right, int bottom, double confidence)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | The x-axis value of the left side of the rectangle of face. |
System.Int32 | top | The y-axis value of the top of the rectangle of face. |
System.Int32 | right | The x-axis value of the right side of the rectangle of face. |
System.Int32 | bottom | The y-axis value of the bottom of the rectangle of face. |
System.Double | confidence | The confidence of detected face. |
Properties
| Improve this Doc View SourceBottom
Gets the y-axis value of the bottom of the rectangle of face.
Declaration
public int Bottom { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Confidence
Gets the confidence of detected face.
Declaration
public double Confidence { get; }
Property Value
Type | Description |
---|---|
System.Double |
Left
Gets the x-axis value of the left side of the rectangle of face.
Declaration
public int Left { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Right
Gets the x-axis value of the right side of the rectangle of face.
Declaration
public int Right { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Top
Gets the y-axis value of the top of the rectangle of face.
Declaration
public int Top { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceEquals(Location)
Compares two Location class for equality.
Declaration
public bool Equals(Location other)
Parameters
Type | Name | Description |
---|---|---|
Location | other | The face location to compare to this instance. |
Returns
Type | Description |
---|---|
System.Boolean | if both Location class contain the same Left, Top, Right and Bottom values; otherwise, .
|
Equals(Object)
Determines whether the specified System.Object is a Location and whether it contains the same face location as this Location.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | if obj is a Location and contains the same Left, Top, Right and Bottom values as this Location; otherwise, .
|
Overrides
GetHashCode()
Returns the hash code for this Location.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this Location class. |
Overrides
Operators
| Improve this Doc View SourceEquality(Location, Location)
Compares two Location class for equality.
Declaration
public static bool operator ==(Location location1, Location location2)
Parameters
Type | Name | Description |
---|---|---|
Location | location1 | The first Location class to compare. |
Location | location2 | The second Location class to compare. |
Returns
Type | Description |
---|---|
System.Boolean | if both the Left, Top, Right and Bottom face location of location1 and location2 are equal; otherwise, .
|
Inequality(Location, Location)
Compares two Location class for inequality.
Declaration
public static bool operator !=(Location location1, Location location2)
Parameters
Type | Name | Description |
---|---|---|
Location | location1 | The first Location class to compare. |
Location | location2 | The second Location class to compare. |
Returns
Type | Description |
---|---|
System.Boolean | if location1 and location2 have different Left, Top, Right or Bottom coordinates; if location1 and location2 have the same Left, Top, Right and Bottom face location.
|