[labeledImage, numberOfObjcts]=bwlabel(......); What is this code used for?

답변 (1개)

Steven Lord
Steven Lord 2021년 4월 23일

0 개 추천

We can't say what it's used for in your application because you haven't told us anything about the context in which it is called. But if you want to know what the bwlabel function does in general, if you have Image Processing Toolbox installed I recommend reading the documentation page for the function.
doc bwlabel
If you don't have Image Processing Toolbox, go to the Support section of this site and search for bwlabel to find the documentation page for the function in the most recent release of Image Processing Toolbox.

댓글 수: 1

ABDULLAH ENESQ YAKUT
ABDULLAH ENESQ YAKUT 2021년 4월 23일
편집: ABDULLAH ENESQ YAKUT 2021년 4월 23일
Hello Steven ,
resim = imread("Morfoloji2.PNG");
gri=rgb2gray(resim);
resim_bin=imbinarize(gri);
resim_imcp=imcomplement(resim_bin);
resim_imfill=imfill(resim_imcp,'holes');
[centers, radii, metric]=imfindcircles(resim_imfill,[6,50],'Sensitivity',0.60);
resim_imr=imerode(resim_imfill,strel('disk',1));
imshow(resim_imr);
[labeledImage, numberOfObjcts]=bwlabel(resim_imr);
Alcev=regionprops(labeledImage,'Perimeter','Area');
round=[Alcev.Perimeter].^2 ./(4*pi*[Alcev.Area]);
elips=0;
dortgen=0;
ucgen=0;
for x=1:numberOfObjcts
if round(x)<1.15;
elips=elips+1;
elseif round(x)<1.53;
dortgen=dortgen+1;
else ucgen=ucgen+1;
end
end
elips=elips-length(centers);
disp("Daire Sayısı:"+length(centers));
disp("Elips Sayısı:"+elips);
disp("Dörtgen Sayısı:"+dortgen);
disp("Üçgen Sayısı:"+ucgen);
disp("Toplam Obje Sayısı Sayısı:"+numberOfObjcts);
This is my project .In this project I am trying to find the number of objects by manipulating the image but
[labeledImage, numberOfObjcts]=bwlabel(resim_imr);
I could not figure out what this code is for.
thanks in advance.

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

카테고리

도움말 센터File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

질문:

2021년 4월 23일

편집:

2021년 4월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by