필터 지우기
필터 지우기

Unable to detect Iris boundary using imfind circles

조회 수: 2 (최근 30일)
Karthik Krishnan
Karthik Krishnan 2021년 7월 21일
댓글: Matt J 2021년 7월 25일
Canny_img = edge(newI,'canny');
image(Canny_img)
title('Edge detected')
figure,
imshow(Canny_img)
title('Circle Detected Image')
[centers, radii] = imfindcircles(Canny_img,[20 150],'Sensitivity',0.8);
disp(centers)
disp(radii)
centersStrong = centers(:,:);
radiiStrong = radii(:);
%metricStrong5 = metric(1:2);
viscircles(centersStrong, radiiStrong,'EdgeColor','b');
this is my code it detects the inner circle not the outer one. pls help
  댓글 수: 2
Jonas
Jonas 2021년 7월 21일
편집: Jonas 2021년 7월 21일
did you try to use a bigger lower radius bound in imfindcircles? if the lower bound is big enough you will not get the small circle.
it would also help if you provide the original image or the binary image without the circle

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2021년 7월 21일
편집: Matt J 2021년 7월 21일
Increasing the lower radius bound as suggested by @Jonas as well as increasing the sensitivity setting seems to help:
A=any( imbinarize(imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/690953/image.png')) ,3);
[centers, radii] = imfindcircles(A,[50 150],'Sensitivity',0.96);
imshow(A);
viscircles(centers, radii,'EdgeColor','b');
  댓글 수: 3
Karthik Krishnan
Karthik Krishnan 2021년 7월 25일
why u used imbinarize? @Matt J
Matt J
Matt J 2021년 7월 25일
Because your posted image looks binary. It might indeed be better to try to detect the circles in the original color image.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by