Detects multiple disks (coins) in an image using Hough Transform

版本 1.5.0.0 (3.2 KB) 作者: Randy Tang
HOUGHCIRCLES detects multiple disks (coins) in an image using Hough Transform.
7.6K 次下载
更新时间 2009/1/7

查看许可证

HOUGHCIRCLES detects multiple disks (coins) in an image using Hough Transform. The image contains separating, touching, or overlapping disks whose centers may be in or out of the image.

Syntax
houghcircles(im, minR, maxR);
houghcircles(im, minR, maxR, thresh);
houghcircles(im, minR, maxR, thresh, delta);
circles = houghcircles(im, minR, maxR);
circles = houghcircles(im, minR, maxR, thresh);
circles = houghcircles(im, minR, maxR, thresh, delta);

Inputs:
- im: input image
- minR: minimal radius in pixels
- maxR: maximal radius in pixels
- thresh (optional): the minimal ratio of the number of detected edge pixels to 0.9 times the calculated circle perimeter (0<thresh<=1, default: 0.33)
- delta (optional): the maximal difference between two circles for them to be considered as the same one (default: 12); e.g., c1=(x1 y1 r1), c2=(x2 y2 r2), delta = |x1-x2|+|y1-y2|+|r1-r2|

Output
- circles: n-by-4 array of n circles; each circle is represented by (x y r t), where (x y), r, and t are the center coordinate, radius, and ratio of the detected portion to the circle perimeter, respectively. If the output argument is not specified, the original image will be displayed with the detected circles superimposed on it.

引用格式

Randy Tang (2024). Detects multiple disks (coins) in an image using Hough Transform (https://www.mathworks.com/matlabcentral/fileexchange/22543-detects-multiple-disks-coins-in-an-image-using-hough-transform), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007b
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

启发作品: TACTICS Toolbox

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.5.0.0

Minor modifications according to Sven's suggestions. Thanks a lot, Sven.

1.3.0.0

Major modifications of the program.

1.2.0.0

Description of the format of function invocation is corrected.

1.1.0.0

Description about the format of function invocation is corrected.

1.0.0.0