Detecting and measuring circles
显示 更早的评论
I want to find circles and measure diameter of them. I have a image where the circles have a value of 1 and the background has a value of 0. I would like to do this without any built in functions.
1 个评论
John BG
2016-4-26
show the image, or part of it, so we can write an answer according to the kind of circles you mention in your question.
回答(1 个)
Image Analyst
2016-4-25
0 个投票
Well you'll have to write your own version of either imfindcircles() or bwlabel(), and regionprops(). You might need to threshold your image to binarize it. Then, you can find connected components algorithms on the web to do the labeling of your binary image. To get the diameter, sum of the number of pixels in each blob and use the formula for area. Diameter = sqrt(area*4/pi).
2 个评论
P
2016-4-25
Image Analyst
2016-4-25
I don't even know what that means. Do you mean split apart, like a watershed transform? Or do you mean connected components labeling? (Google those terms.)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!