Added whitespace to comply with pep8

This commit is contained in:
Julius Bier Kirekgaard
2015-08-28 20:46:14 +01:00
parent 5f5af64551
commit 3c41e75b22
+10 -10
View File
@@ -152,21 +152,21 @@ def hough_circle(image, radius, normalize=True, full_output=False):
Examples Examples
-------- --------
>>> from skimage.transform import hough_circle >>> from skimage.transform import hough_circle
>>> img = np.zeros((100,100),dtype=np.bool_) >>> img = np.zeros((100, 100), dtype=np.bool_)
>>> X,Y = np.meshgrid(np.arange(100),np.arange(100)) >>> X, Y = np.meshgrid(np.arange(100), np.arange(100))
>>> x0,y0,radius = 20,35,23 >>> x0, y0, radius = 20, 35, 23
>>> circle = np.abs((X-x0)**2+(Y-y0)**2-radius**2)<5**2 >>> circle = np.abs((X-x0)**2+(Y-y0)**2-radius**2)<5**2
>>> img[circle] = 1 >>> img[circle] = 1
>>> # Find position of circle from known radius: >>> # Find position of circle from known radius:
>>> res = hough_circle(img,np.array([radius]))[0,:,:] >>> res = hough_circle(img, np.array([radius]))[0, :, :]
>>> y,x = np.unravel_index(np.argmax(res),res.shape) >>> y, x = np.unravel_index(np.argmax(res), res.shape)
>>> x,y >>> x, y
(20, 35) (20, 35)
>>> # Find position and radius by trying a range of radii: >>> # Find position and radius by trying a range of radii:
>>> radii_range = np.arange(5,50) >>> radii_range = np.arange(5, 50)
>>> res = hough_circle(img,radii_range) >>> res = hough_circle(img, radii_range)
>>> ridx,y,x = np.unravel_index(np.argmax(res),res.shape) >>> ridx, y, x = np.unravel_index(np.argmax(res), res.shape)
>>> x,y,radii_range[ridx] >>> x, y, radii_range[ridx]
(20, 35, 23) (20, 35, 23)
""" """