From 956da414fc5d6d6dd3001b5e43f1b8070328427b Mon Sep 17 00:00:00 2001 From: routersys Date: Sun, 19 Jul 2026 09:06:05 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8F=E3=83=BC=E3=83=8D=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E5=86=8D=E8=A8=88=E7=AE=97=E6=B8=AC=E5=AE=9A=E3=81=B8=E5=AE=8C?= =?UTF-8?q?=E4=BA=86=E5=BE=85=E3=81=A1=E6=9C=80=E5=B0=8F=E5=80=A4=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E3=82=92=E5=B0=8E=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MultiscaleRetinex.Harness/Program.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/MultiscaleRetinex.Harness/Program.cs b/MultiscaleRetinex.Harness/Program.cs index 7299984..ab13d87 100644 --- a/MultiscaleRetinex.Harness/Program.cs +++ b/MultiscaleRetinex.Harness/Program.cs @@ -64,10 +64,18 @@ foreach (var quality in new[] { MultiscaleRetinexQuality.Balanced, MultiscaleRet var parameters = new MultiscaleRetinexPipeline.Parameters(MultiscaleRetinexQuality.High, MultiscaleRetinexMode.ColorConstancy, 0.03f, 0.49f, 0.3f, 0f, 1f); pipeline.Simulate(sourceTexture, width, height, in parameters); - var stopwatch = Stopwatch.StartNew(); - pipeline.Simulate(sourceTexture, width, height, parameters with { GlobalScale = 0.5f }); - stopwatch.Stop(); - Console.WriteLine($"structure recompute: {stopwatch.Elapsed.TotalMilliseconds:F2} ms"); + var stopwatch = new Stopwatch(); + var best = double.MaxValue; + for (var iteration = 0; iteration < 12; iteration++) + { + var alternated = parameters with { GlobalScale = iteration % 2 == 0 ? 0.5f : 0.51f }; + stopwatch.Restart(); + pipeline.Simulate(sourceTexture, width, height, in alternated); + pipeline.WaitForCompletion(); + stopwatch.Stop(); + best = Math.Min(best, stopwatch.Elapsed.TotalMilliseconds); + } + Console.WriteLine($"structure recompute: {best:F2} ms"); stopwatch.Restart(); const int hitFrames = 200;