From 7b4fea2db4c318e20a182b535eb5383964f8ed40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Scho=CC=88nberger?= Date: Mon, 30 Apr 2012 16:33:58 +0200 Subject: [PATCH] fixed bug when sigma is set manually --- skimage/filter/thresholding.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skimage/filter/thresholding.py b/skimage/filter/thresholding.py index efef9a45..51907347 100644 --- a/skimage/filter/thresholding.py +++ b/skimage/filter/thresholding.py @@ -71,6 +71,8 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0, if param is None: # automatically determine sigma which covers > 99% of distribution sigma = (block_size - 1) / 6.0 + else: + sigma = param scipy.ndimage.gaussian_filter(image, sigma, output=thresh_image, mode=mode) elif method == 'mean':