What is this code used for?

[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 ExchangeData 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