Change to the Normalized Pixel Percentage Formula
This commit is contained in:
@ -3,15 +3,15 @@ namespace View_by_Distance.Shared.Models.Stateless.Methods;
|
||||
public interface ILocation
|
||||
{ // ...
|
||||
|
||||
string TestStatic_GetRightPadded(int locationDigits, string value) =>
|
||||
GetRightPadded(locationDigits, value);
|
||||
static string GetRightPadded(int locationDigits, string value) =>
|
||||
value.Length == locationDigits ? value : value.Length > locationDigits ? value[..locationDigits] : value.PadRight(locationDigits, '0');
|
||||
string TestStatic_GetLeftPadded(int locationDigits, string value) =>
|
||||
GetLeftPadded(locationDigits, value);
|
||||
static string GetLeftPadded(int locationDigits, string value) =>
|
||||
value.Length == locationDigits ? value : value.Length > locationDigits ? value[..locationDigits] : value.PadLeft(locationDigits, '0');
|
||||
|
||||
string TestStatic_GetRightPadded(int locationDigits, int value) =>
|
||||
GetRightPadded(locationDigits, value);
|
||||
static string GetRightPadded(int locationDigits, int value) =>
|
||||
GetRightPadded(locationDigits, value.ToString());
|
||||
string TestStatic_GetLeftPadded(int locationDigits, int value) =>
|
||||
GetLeftPadded(locationDigits, value);
|
||||
static string GetLeftPadded(int locationDigits, int value) =>
|
||||
GetLeftPadded(locationDigits, value.ToString());
|
||||
|
||||
Models.Location? TestStatic_GetLocation(Models.Location? location, int locationDigits, int locationFactor, int height, int width, int zCount) =>
|
||||
GetLocation(location, locationDigits, locationFactor, height, width, zCount);
|
||||
@ -19,7 +19,7 @@ public interface ILocation
|
||||
location is null ? null : new(location.Confidence, height, location, locationDigits, locationFactor, width, zCount);
|
||||
|
||||
Models.Location? TestStatic_GetLocation(int factor, Models.Location? location, int locationDigits, int locationFactor, int height, int width, int zCount) =>
|
||||
GetLocation(location, locationDigits, locationFactor, height, width, zCount);
|
||||
GetLocation(factor, location, locationDigits, locationFactor, height, width, zCount);
|
||||
static Models.Location? GetLocation(int factor, Models.Location? location, int locationDigits, int locationFactor, int height, int width, int zCount) =>
|
||||
location is null ? null : new(location.Confidence, factor, height, location, locationDigits, locationFactor, width, zCount);
|
||||
|
||||
@ -28,10 +28,15 @@ public interface ILocation
|
||||
static int?[] GetInts(List<Models.Location> locations) =>
|
||||
(from l in locations where l.NormalizedPixelPercentage is not null select l.NormalizedPixelPercentage).ToArray();
|
||||
|
||||
int TestStatic_GetNormalizedPixelPercentage(int bottom, int height, int left, int locationDigits, int locationFactor, int right, int top, int width, int zCount) =>
|
||||
GetNormalizedPixelPercentage(bottom, height, left, locationDigits, locationFactor, right, top, width, zCount);
|
||||
static int GetNormalizedPixelPercentage(int bottom, int height, int left, int locationDigits, int locationFactor, int right, int top, int width, int zCount) =>
|
||||
Location.GetNormalizedPixelPercentage(bottom, height, left, locationDigits, locationFactor, right, top, width, zCount);
|
||||
int TestStatic_GetNormalizedPixelPercentage(Models.Location location, int locationDigits, int locationFactor, OutputResolution outputResolution) =>
|
||||
GetNormalizedPixelPercentage(location, locationDigits, locationFactor, outputResolution);
|
||||
static int GetNormalizedPixelPercentage(Models.Location location, int locationDigits, int locationFactor, OutputResolution outputResolution) =>
|
||||
Location.GetNormalizedPixelPercentage(location.Bottom, outputResolution.Height, location.Left, locationDigits, locationFactor, location.Right, location.Top, outputResolution.Width, zCount: 1);
|
||||
|
||||
int TestStatic_GetNormalizedPixelPercentage(int bottom, int height, int left, int locationDigits, int locationFactor, int right, int top, int width) =>
|
||||
GetNormalizedPixelPercentage(bottom, height, left, locationDigits, locationFactor, right, top, width);
|
||||
static int GetNormalizedPixelPercentage(int bottom, int height, int left, int locationDigits, int locationFactor, int right, int top, int width) =>
|
||||
Location.GetNormalizedPixelPercentage(bottom, height, left, locationDigits, locationFactor, right, top, width, zCount: 1);
|
||||
|
||||
Models.Location TestStatic_GetTrimBound(double detectionConfidence, System.Drawing.Rectangle rectangle, int width, int height, int facesCount) =>
|
||||
TrimBound(detectionConfidence, rectangle, width, height, facesCount);
|
||||
|
Reference in New Issue
Block a user