![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218257/image.png)
remove the edges present outside the circle
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i am able to detect the circle in an eye image but along with circle i am also getting other extra edges . how do i remove that?please help i have uploaded both original image
and processed image ![100.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218253/100.png)
![008_1_1.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218252/008_1_1.jpeg)
![100.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218253/100.png)
gray=imread('008_1_1.jpg');
%gray=rgb2gray(gray);
t4=imresize(gray,[512,512],'bilinear');
%imshow(t4);
%set(gcf,'Units','Normalized','OuterPosition',[0 0 1 1]);
binary=imbinarize(t4,.4);
%imshow(binary);
%binary=imcrop(binary);
g=fspecial('gaussian',[512 512],15);
ig=imfilter(binary,g,'same');
bw2=edge(ig,'canny',0.53,10);
%k=get(handles.id1,'String');
filen=['100.png'];
%basefile=sprintf('%d.png',k);
fullfilenam=fullfile('C:\Users\AKSHATHA\Documents\MATLAB\database\eyeimages',filen);
imwrite(bw2,fullfilenam);
0 Kommentare
Antworten (1)
KALYAN ACHARJYA
am 6 Mai 2019
Bearbeitet: KALYAN ACHARJYA
am 6 Mai 2019
Here assuming that the circle size is maximum in all cases, if not result will different
result=bwareafilt(binary_image,1);
imshow(result);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218257/image.png)
Hope it Helps!
Siehe auch
Kategorien
Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!