From 11c729d370951cd7cfbae47a6456c6dd908f25c6 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Mon, 9 Jan 2012 14:08:32 -0500 Subject: [PATCH] Apply edge clamping a little more forcefully --- cuburn/code/filtering.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuburn/code/filtering.py b/cuburn/code/filtering.py index 6c0ab72..b6fcd05 100644 --- a/cuburn/code/filtering.py +++ b/cuburn/code/filtering.py @@ -174,8 +174,8 @@ void density_est(float4 *pixbuf, float4 *outbuf, // If the gradient scale is smaller than the minimum scale, we're // probably on a strong edge; blur slightly. - if (diag_mag > den * 2.0f) { - scale = max(-9.0f, scale); + if (diag_mag > den * edge_clamp) { + scale = -2.0f; // Uncomment to see which pixels are being clamped // de_g[si] = 1.0f; }