How to count the number of pipes in an image?

7 views (last 30 days)
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

Accepted Answer

Image Analyst
Image Analyst on 23 Jun 2014
  2 Comments
Anand
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');
Fernando
Fernando on 2 Jul 2014
Thank you very much, that was exactly what I was looking for.

Sign in to comment.

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!