필터 지우기
필터 지우기

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