Removed old GetRectangle

RectangleIntersectMinimums
AddUserSecrets
This commit is contained in:
2023-06-19 21:33:04 -07:00
parent 2ff966d6b0
commit 8863fd763f
20 changed files with 328 additions and 498 deletions

View File

@ -17,12 +17,13 @@ public partial class E_Distance
private readonly bool _DistanceRenameToMatch;
private readonly float[] _RangeFaceConfidence;
private readonly bool _DistanceMoveUnableToMatch;
private readonly float _RectangleIntersectMinimum;
private readonly List<string> _AllMappedFaceFiles;
private readonly List<string> _AllMappedFaceFileNames;
private readonly double _RangeDistanceToleranceAverage;
private readonly List<string> _DuplicateMappedFaceFiles;
public E_Distance(bool distanceMoveUnableToMatch, bool distanceRenameToMatch, int faceConfidencePercent, float[] rangeDistanceTolerance, float[] rangeFaceConfidence)
public E_Distance(bool distanceMoveUnableToMatch, bool distanceRenameToMatch, int faceConfidencePercent, float[] rangeDistanceTolerance, float[] rangeFaceConfidence, float[] rectangleIntersectMinimum)
{
_Debug = new();
_Moved = new();
@ -35,6 +36,7 @@ public partial class E_Distance
_DistanceRenameToMatch = distanceRenameToMatch;
_FaceConfidencePercent = faceConfidencePercent;
_DistanceMoveUnableToMatch = distanceMoveUnableToMatch;
_RectangleIntersectMinimum = rectangleIntersectMinimum.Max();
_RangeDistanceToleranceAverage = rangeDistanceTolerance.Average();
}
@ -242,7 +244,7 @@ public partial class E_Distance
throw new NotSupportedException();
if (filteredFaces.Any())
{
intersectFaces = Shared.Models.Stateless.Methods.ILocation.FilterByIntersect(filteredFaces, locationContainer.NormalizedRectangle);
intersectFaces = Shared.Models.Stateless.Methods.ILocation.FilterByIntersect(filteredFaces, locationContainer.NormalizedRectangle, _RectangleIntersectMinimum);
if (intersectFaces.Any())
checkFaces.AddRange(GetClosestFaceByDistanceIgnoringTolerance(mappingFromItem, intersectFaces, modelsFaceEncoding));
}