mapped-ids-then-whole-percentages-to-location-container save-extracted-face save-extracted-java-script-object-notation
20 lines
849 B
C#
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);
|
|
|
|
} |