houghCircle

Contents

Syntax

Description

[y0detect,x0detect,accumulator] = houghcircle(Imbinary,r,thresh,region)

Function uses Standard Hough Transform to detect circles in a binary image.

According to the Hough Transform for circles, each pixel in image space corresponds to a circle in Hough space and vise versa.

Upper left corner of image is the origin of coordinate system.

Example

im=imread('coins.png');
subplot(221); imshow(im);
imBw=edge(double(im));
subplot(222); imshow(imBw);
rad=24;
[y0, x0, accumulator]=houghCircle(imBw, rad, rad*pi);
line(x0(:), y0(:), 'marker', 'x', 'LineWidth', 2, 'Color', 'yellow');
subplot(223); imagesc(accumulator); axis image
subplot(224); mesh(accumulator);
colormap default

Top page   Next: hmmEval.m   Prev:imFeaLbp.m