Unable to detect Iris boundary using imfind circles
2 次查看(过去 30 天)
显示 更早的评论
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![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/690953/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/690953/image.png)
2 个评论
采纳的回答
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 个评论
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!