How to count the number of pipes in an image?
8 views (last 30 days)
Show older comments
Hi! I need to inventory the number of pipes in a storage. I'm new using Matlab and I need to know if it's possible to count them using an image. Here's an example of the image.
Can someone help me with the code?
Thank you in advance
0 Comments
Accepted Answer
Image Analyst
on 23 Jun 2014
Try imfindcircles(). Here's a demo: http://www.mathworks.com/matlabcentral/fileexchange/34365-findcirclesgui
2 Comments
Anand
on 23 Jun 2014
This does a reasonable job. There are a few missed circles, but you can play around with the EdgeThreshold or any of the other parameters to get a better result.
[centers,radii] = imfindcircles(im,[25 ...
35],'objectpolarity','dark','sensitivity',0.97);
imshow(im);viscircles(centers,radii,'EdgeColor','b');
More Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!