bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / transform / hough_transform / hough_circle
function
skimage.transform.hough_transform:hough_circle
source: /dev/scikit-image/src/skimage/transform/hough_transform.py :81
Signature
def hough_circle ( image , radius , normalize = True , full_output = False ) Summary
Perform a circular Hough transform.
Parameters
image: ndarray, shape (M, N)Input image with nonzero values representing edges.
radius: scalar or sequence of scalarsRadii at which to compute the Hough transform. Floats are converted to integers.
normalize: bool, optionalNormalize the accumulator with the number of pixels used to draw the radius.
full_output: bool, optionalExtend the output size by twice the largest radius in order to detect centers outside the input picture.
Returns
H: ndarray, shape (radius index, M + 2R, N + 2R)Hough transform accumulator for each radius. R designates the larger radius if full_output is True. Otherwise, R = 0.
Examples
from skimage.transform import hough_circle from skimage.draw import circle_perimeter img = np.zeros((100, 100), dtype=bool) rr, cc = circle_perimeter(25, 35, 23) img[rr, cc] = 1 try_radii = np.arange(5, 50) res = hough_circle(img, try_radii) ridx, r, c = np.unravel_index(np.argmax(res), res.shape)✓
r, c, try_radii[ridx]
✗Aliases
-
skimage.transform.hough_circle