imfindcircles - convert centers to pixels on image
2 views (last 30 days)
Show older comments
Roberto Diego Ortuso
on 26 Feb 2020
Answered: Keerthana Chiruvolu
on 3 Mar 2020
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.
0 Comments
Accepted Answer
Keerthana Chiruvolu
on 3 Mar 2020
Hi,
Refer to the following link for a demo: https://www.mathworks.com/help/images/ref/imfindcircles.html?#btdxntz-4
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 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!