diff --git a/TODO.txt b/TODO.txt index e2fc4218..f17b088f 100644 --- a/TODO.txt +++ b/TODO.txt @@ -3,6 +3,7 @@ Remember to list any API changes below in `doc/source/api_changes.txt`. Version 0.13 ------------ * Remove deprecated `None` defaults for `skimage.exposure.rescale_intensity` +* Remove deprecated `skimage.filter.canny` import in __init__.py that is now in `skimage.feature.canny` Version 0.12 ------------ diff --git a/doc/examples/applications/plot_coins_segmentation.py b/doc/examples/applications/plot_coins_segmentation.py index 49ff399f..50eec0bb 100644 --- a/doc/examples/applications/plot_coins_segmentation.py +++ b/doc/examples/applications/plot_coins_segmentation.py @@ -57,7 +57,7 @@ segmentation. To do this, we first get the edges of features using the Canny edge-detector. """ -from skimage.filter import canny +from skimage.feature import canny edges = canny(coins/255.) fig, ax = plt.subplots(figsize=(4, 3)) diff --git a/doc/examples/plot_canny.py b/doc/examples/plot_canny.py index f1caf264..82a930e5 100644 --- a/doc/examples/plot_canny.py +++ b/doc/examples/plot_canny.py @@ -19,7 +19,7 @@ import numpy as np import matplotlib.pyplot as plt from scipy import ndimage -from skimage import filter +from skimage import feature # Generate noisy image of a square @@ -31,8 +31,8 @@ im = ndimage.gaussian_filter(im, 4) im += 0.2 * np.random.random(im.shape) # Compute the Canny filter for two values of sigma -edges1 = filter.canny(im) -edges2 = filter.canny(im, sigma=3) +edges1 = feature.canny(im) +edges2 = feature.canny(im, sigma=3) # display results fig, (ax1, ax2, ax3) = plt.subplots(nrows=1, ncols=3, figsize=(8, 3)) diff --git a/doc/examples/plot_circular_elliptical_hough_transform.py b/doc/examples/plot_circular_elliptical_hough_transform.py index fbdd4f2c..9b0be0fb 100755 --- a/doc/examples/plot_circular_elliptical_hough_transform.py +++ b/doc/examples/plot_circular_elliptical_hough_transform.py @@ -37,16 +37,16 @@ Its size is extended by two times the larger radius. import numpy as np import matplotlib.pyplot as plt -from skimage import data, filter, color +from skimage import data, color from skimage.transform import hough_circle -from skimage.feature import peak_local_max +from skimage.feature import peak_local_max, canny from skimage.draw import circle_perimeter from skimage.util import img_as_ubyte # Load picture and detect edges image = img_as_ubyte(data.coins()[0:95, 70:370]) -edges = filter.canny(image, sigma=3, low_threshold=10, high_threshold=50) +edges = canny(image, sigma=3, low_threshold=10, high_threshold=50) fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(5, 2)) @@ -106,14 +106,15 @@ References import matplotlib.pyplot as plt -from skimage import data, filter, color +from skimage import data, color +from skimage.feature import canny from skimage.transform import hough_ellipse from skimage.draw import ellipse_perimeter # Load picture, convert to grayscale and detect edges image_rgb = data.coffee()[0:220, 160:420] image_gray = color.rgb2gray(image_rgb) -edges = filter.canny(image_gray, sigma=2.0, +edges = canny(image_gray, sigma=2.0, low_threshold=0.55, high_threshold=0.8) # Perform a Hough Transform diff --git a/doc/examples/plot_line_hough_transform.py b/doc/examples/plot_line_hough_transform.py index bdb05661..4293c409 100644 --- a/doc/examples/plot_line_hough_transform.py +++ b/doc/examples/plot_line_hough_transform.py @@ -58,7 +58,7 @@ References from skimage.transform import (hough_line, hough_line_peaks, probabilistic_hough_line) -from skimage.filter import canny +from skimage.feature import canny from skimage import data import numpy as np diff --git a/doc/source/user_guide/tutorial_segmentation.txt b/doc/source/user_guide/tutorial_segmentation.txt index cff7c651..d183102f 100644 --- a/doc/source/user_guide/tutorial_segmentation.txt +++ b/doc/source/user_guide/tutorial_segmentation.txt @@ -38,11 +38,11 @@ Edge-based segmentation Let us first try to detect edges that enclose the coins. For edge detection, we use the `Canny detector -`_ of ``skimage.filter.canny`` +`_ of ``skimage.feature.canny`` :: - >>> from skimage.filter import canny + >>> from skimage.feature import canny >>> edges = canny(coins/255.) As the background is very smooth, almost all edges are found at the