Skip to content

Commit

Permalink
Fix ArgExtrema adding noise pixels along edges
Browse files Browse the repository at this point in the history
  • Loading branch information
slackydev authored Aug 10, 2024
1 parent 724f87e commit 3e3ecc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/simba.vartype_floatmatrix.pas
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ function TSingleMatrixHelper.ArgExtrema(Count: Int32; HiLo: Boolean = True; XYIn
while (X < W) do
begin
while (X < W) and (Self[Y,X] >= Self[Y,X-1]) do Inc(X);
Buffer.Add(X-1,Y);
if (X < W) then Buffer.Add(X-1,Y);
while (X < W) and (Self[Y,X] <= Self[Y,X-1]) do Inc(X);
end;
end;
Expand All @@ -693,7 +693,7 @@ function TSingleMatrixHelper.ArgExtrema(Count: Int32; HiLo: Boolean = True; XYIn
while (Y < H) do
begin
while (Y < H) and (Self[Y,X] >= Self[Y-1,X]) do Inc(Y);
Buffer.Add(X,Y-1);
if (Y < H) then Buffer.Add(X,Y-1);
while (Y < H) and (Self[Y,X] <= Self[Y-1,X]) do Inc(Y);
end;
end;
Expand Down

0 comments on commit 3e3ecc4

Please sign in to comment.