mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-12 12:30:16 +08:00
replace hough() by hough_line() in doc
This commit is contained in:
@@ -59,7 +59,7 @@ References
|
||||
|
||||
'''
|
||||
|
||||
from skimage.transform import hough, hough_peaks, probabilistic_hough
|
||||
from skimage.transform import hough_line, hough_peaks, probabilistic_hough
|
||||
from skimage.filter import canny
|
||||
from skimage import data
|
||||
|
||||
@@ -77,7 +77,7 @@ idx = np.arange(25, 75)
|
||||
image[idx[::-1], idx] = 255
|
||||
image[idx, idx] = 255
|
||||
|
||||
h, theta, d = hough(image)
|
||||
h, theta, d = hough_line(image)
|
||||
|
||||
plt.figure(figsize=(8, 4))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from skimage.transform import hough
|
||||
from skimage.transform import hough_line
|
||||
|
||||
img = np.zeros((100, 150), dtype=bool)
|
||||
img[30, :] = 1
|
||||
@@ -11,7 +11,7 @@ for i in range(90):
|
||||
img[i, i] = 1
|
||||
img += np.random.random(img.shape) > 0.95
|
||||
|
||||
out, angles, d = hough(img)
|
||||
out, angles, d = hough_line(img)
|
||||
|
||||
plt.subplot(1, 2, 1)
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ def hough_line(img, theta=None):
|
||||
|
||||
Apply the Hough transform:
|
||||
|
||||
>>> out, angles, d = hough(img)
|
||||
>>> out, angles, d = hough_line(img)
|
||||
|
||||
.. plot:: hough_tf.py
|
||||
|
||||
@@ -187,12 +187,12 @@ def hough_peaks(hspace, angles, dists, min_distance=10, min_angle=10,
|
||||
Parameters
|
||||
----------
|
||||
hspace : (N, M) array
|
||||
Hough space returned by the `hough` function.
|
||||
Hough space returned by the `hough_line` function.
|
||||
angles : (M,) array
|
||||
Angles returned by the `hough` function. Assumed to be continuous
|
||||
Angles returned by the `hough_line` function. Assumed to be continuous
|
||||
(`angles[-1] - angles[0] == PI`).
|
||||
dists : (N, ) array
|
||||
Distances returned by the `hough` function.
|
||||
Distances returned by the `hough_line` function.
|
||||
min_distance : int
|
||||
Minimum distance separating lines (maximum filter size for first
|
||||
dimension of hough space).
|
||||
@@ -213,14 +213,14 @@ def hough_peaks(hspace, angles, dists, min_distance=10, min_angle=10,
|
||||
Examples
|
||||
--------
|
||||
>>> import numpy as np
|
||||
>>> from skimage.transform import hough, hough_peaks
|
||||
>>> from skimage.transform import hough_line, hough_peaks
|
||||
>>> from skimage.draw import line
|
||||
>>> img = np.zeros((15, 15), dtype=np.bool_)
|
||||
>>> rr, cc = line(0, 0, 14, 14)
|
||||
>>> img[rr, cc] = 1
|
||||
>>> rr, cc = line(0, 14, 14, 0)
|
||||
>>> img[cc, rr] = 1
|
||||
>>> hspace, angles, dists = hough(img)
|
||||
>>> hspace, angles, dists = hough_line(img)
|
||||
>>> hspace, angles, dists = hough_peaks(hspace, angles, dists)
|
||||
>>> angles
|
||||
array([ 0.74590887, -0.79856126])
|
||||
|
||||
Reference in New Issue
Block a user