From 83c7c714a62b02f8b6d40e925798210eb941129b Mon Sep 17 00:00:00 2001 From: Olly Date: Sun, 15 Oct 2023 17:20:09 +0100 Subject: [PATCH] Fix ThresholdSauvola radius param --- Source/image/simba.image.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/image/simba.image.pas b/Source/image/simba.image.pas index 513446254..27930b811 100644 --- a/Source/image/simba.image.pas +++ b/Source/image/simba.image.pas @@ -2362,10 +2362,10 @@ function TSimbaImage.ThresholdSauvola(Radius: Integer; AInvert: Boolean; R: Sing for Y := 0 to H do for X := 0 to W do begin - Left := Max(X-W, 0); - Right := Min(X+W, W); - Top := Max(Y-W, 0); - Bottom := Min(Y+W, H); + Left := Max(X-Radius, 0); + Right := Min(X+Radius, W); + Top := Max(Y-Radius, 0); + Bottom := Min(Y+Radius, H); //Sum := 0; //SumSquares := 0;