Minor fixes

This commit is contained in:
François Boulogne
2016-06-18 23:39:09 +02:00
parent 2137aed5ec
commit d870bcc5df
3 changed files with 2 additions and 20 deletions
@@ -49,9 +49,6 @@ plt.show()
# the best algorithm for you data without a deep understanding of their
# mechanisms.
import matplotlib.pyplot as plt
from skimage import data
from skimage.filters import thresholding
img = data.page()
@@ -61,7 +58,3 @@ img = data.page()
fig, ax = thresholding.try_all_threshold(img, radius=20,
figsize=(10, 8), verbose=False)
plt.show()
@@ -51,7 +51,6 @@ plt.show()
# and naive threshold value, which is sometimes used as a guess value.
from skimage.filters.thresholding import threshold_mean
from skimage import data
image = data.camera()
@@ -83,9 +82,6 @@ plt.show()
# histogram, there can be multiple pixel values with the minimum histogram
# count, so you can pick the 'min', 'mid', or 'max' of these values.
import matplotlib.pyplot as plt
from skimage import data
from skimage.filters.thresholding import threshold_minimum
@@ -182,9 +178,6 @@ plt.show()
# each pixel (i.e. local neighborhoods). Each threshold value is the weighted mean
# of the local neighborhood minus an offset value.
import matplotlib.pyplot as plt
from skimage import data
from skimage.filters import threshold_otsu, threshold_adaptive
@@ -223,14 +216,10 @@ plt.show()
# The example compares the local threshold with the global threshold.
#
from skimage import data
from skimage.morphology import disk
from skimage.filters import threshold_otsu, rank
from skimage.util import img_as_ubyte
import matplotlib
import matplotlib.pyplot as plt
img = img_as_ubyte(data.page())
+2 -2
View File
@@ -43,7 +43,7 @@ def _try_all(image, methods=None, figsize=None, num_cols=2, verbose=True):
"""
from matplotlib import pyplot as plt
num_rows = math.ceil((len(methods) + 1) / 2.)
num_rows = math.ceil((len(methods) + 1.) / num_cols)
num_rows = int(num_rows) # Python 2.7 support
fig, ax = plt.subplots(num_rows, num_cols, figsize=figsize,
sharex=True, sharey=True,
@@ -75,7 +75,7 @@ def try_all_threshold(image, radius=None, figsize=(8, 5), verbose=True):
----------
image : (N, M) ndarray
Input image.
radius : int, optinal
radius : int, optional
Lengthscale used for local methods.
If None, local methods are ignored.
figsize : tuple, optional