Files
aa/Shared/Models/Stateless/ILocation.cs
Mike Phares 05fb8685d9 Removed Rectangle from LocationContainer
mapped-ids-then-whole-percentages-to-location-container

save-extracted-face

save-extracted-java-script-object-notation
2025-07-06 10:45:59 -07:00

20 lines
849 B
C#

using System.Drawing;
namespace View_by_Distance.Shared.Models.Stateless;
public interface ILocation
{
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);
}