WholePercentages
This commit is contained in:
@ -174,7 +174,7 @@ public class F_PhotoPrism
|
||||
string file;
|
||||
string text;
|
||||
double percent;
|
||||
int? normalizedRectangle;
|
||||
int? wholePercentages;
|
||||
List<string> subjects = new();
|
||||
PersonContainer[]? personContainers;
|
||||
StringBuilder stringBuilder = new();
|
||||
@ -182,21 +182,21 @@ public class F_PhotoPrism
|
||||
System.Drawing.Rectangle? prismRectangle;
|
||||
System.Drawing.Rectangle intersectRectangle;
|
||||
float rectangleIntersectMinimum = rectangleIntersectMinimums.Min();
|
||||
Dictionary<int, PersonContainer[]>? normalizedRectangleToPersonContainers;
|
||||
Dictionary<int, PersonContainer[]>? wholePercentagesToPersonContainers;
|
||||
(MappingFromPhotoPrism MappingFromPhotoPrism, Shared.Models.Marker Marker, double Percent)[] sortedCollection;
|
||||
List<(MappingFromPhotoPrism MappingFromPhotoPrism, Shared.Models.Marker Marker, double Percent)> collection = new();
|
||||
foreach (Face face in distinctFilteredFaces)
|
||||
{
|
||||
collection.Clear();
|
||||
normalizedRectangle = face.Mapping?.MappingFromLocation?.NormalizedRectangle;
|
||||
if (normalizedRectangle is null)
|
||||
wholePercentages = face.Mapping?.MappingFromLocation?.WholePercentages;
|
||||
if (wholePercentages is null)
|
||||
continue;
|
||||
if (face.FaceEncoding is null || face.Location is null || face.OutputResolution is null || face.Mapping is null)
|
||||
continue;
|
||||
if (face.Mapping.MappingFromPhotoPrismCollection is null)
|
||||
continue;
|
||||
(_, normalizedRectangleToPersonContainers) = mapLogic.GetNormalizedRectangleToPersonContainers(face.Mapping.MappingFromItem.Id);
|
||||
if (normalizedRectangleToPersonContainers is null || !normalizedRectangleToPersonContainers.TryGetValue(normalizedRectangle.Value, out personContainers))
|
||||
(_, wholePercentagesToPersonContainers) = mapLogic.GetWholePercentagesToPersonContainers(face.Mapping.MappingFromItem.Id);
|
||||
if (wholePercentagesToPersonContainers is null || !wholePercentagesToPersonContainers.TryGetValue(wholePercentages.Value, out personContainers))
|
||||
continue;
|
||||
dlibRectangle = new(face.Location.Left, face.Location.Top, face.Location.Right - face.Location.Left, face.Location.Bottom - face.Location.Top);
|
||||
foreach (MappingFromPhotoPrism mappingFromPhotoPrism in face.Mapping.MappingFromPhotoPrismCollection)
|
||||
|
Reference in New Issue
Block a user