From f034081650c10f0ddc822ee784bc98c66aedf87a Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Thu, 14 Jan 2016 13:49:17 +0530 Subject: [PATCH] Document the input image type --- skimage/filters/thresholding.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skimage/filters/thresholding.py b/skimage/filters/thresholding.py index 272641ae..de33593e 100644 --- a/skimage/filters/thresholding.py +++ b/skimage/filters/thresholding.py @@ -97,7 +97,7 @@ def threshold_otsu(image, nbins=256): Parameters ---------- image : array - Input image. + Grayscale input image. nbins : int, optional Number of bins used to calculate histogram. This value is ignored for integer arrays. @@ -118,6 +118,10 @@ def threshold_otsu(image, nbins=256): >>> image = camera() >>> thresh = threshold_otsu(image) >>> binary = image <= thresh + + Notes + ----- + The input image must be Grayscale. """ hist, bin_centers = histogram(image.ravel(), nbins) hist = hist.astype(float)