imfindcircles - convert centers to pixels on image

3 ビュー (過去 30 日間)
Roberto Diego Ortuso
Roberto Diego Ortuso 2020 年 2 月 26 日
回答済み: Keerthana Chiruvolu 2020 年 3 月 3 日
Hello reader,
Unfortunately I am unable to extract the centers of my circles using imfindcircles.
Let me elaborate: I have a binary image, I use imfindcircles to detect the circular feature within it. And up to this point everithing is fine.
However, I would like to extract the circles drawn and make a binary image out of the full areas of the circles.
So one way which came to mind is draw white circles on a 0 value backgrown image, the size of my original image. but I am unable to do so as I do not understand in what value the "center" array (generated by imfindcircles) is expressed. By getting the position of my current figure (get(gcf)) none of the make sense as I initially thought that the centers were expressed relative to this.
Could you help me to extract the center pixel related to the one which was calculated by using imfindcircles?
Please find attached here a visual example of what I mean.
Thank you, even only for having taken the time to read.

採用された回答

Keerthana Chiruvolu
Keerthana Chiruvolu 2020 年 3 月 3 日
Hi,
Kindly have a look at the Tips section of the documentation (imfindcirlces) for more insights.
Alternately, you may use the regionprops() function to specify the property you want to extract from the image. Centroid property returns the center of the circle.

その他の回答 (0 件)

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by