Document the input image type

This commit is contained in:
Himanshu Mishra
2016-01-14 13:49:17 +05:30
parent 2487681272
commit f034081650
+5 -1
View File
@@ -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)