25 lines
1.1 KiB
C#
25 lines
1.1 KiB
C#
using System.Drawing;
|
|
|
|
namespace View_by_Distance.Shared.Models.Stateless;
|
|
|
|
public interface ILocation
|
|
{
|
|
|
|
RectangleF? TestStatic_GetPercentagesRectangle(DistanceSettings distanceSettings, int wholePercentages) =>
|
|
GetPercentagesRectangle(distanceSettings, wholePercentages);
|
|
static RectangleF? GetPercentagesRectangle(DistanceSettings distanceSettings, int wholePercentages) =>
|
|
Location.GetPercentagesRectangle(distanceSettings, wholePercentages);
|
|
|
|
Models.Location TestStatic_GetTrimBound(double detectionConfidence, Rectangle rectangle, int width, int height, int facesCount) =>
|
|
TrimBound(detectionConfidence, rectangle, width, height, facesCount);
|
|
static Models.Location TrimBound(double detectionConfidence, Rectangle rectangle, int width, int height, int facesCount) =>
|
|
Models.Location.Get(Math.Min(rectangle.Bottom, height),
|
|
detectionConfidence,
|
|
height,
|
|
Math.Max(rectangle.Left, 0),
|
|
Math.Min(rectangle.Right, width),
|
|
Math.Max(rectangle.Top, 0),
|
|
width,
|
|
facesCount);
|
|
|
|
} |