Finding/calculating area after edge detection

7 ビュー (過去 30 日間)
Hudson Hornet
Hudson Hornet 2018 年 9 月 13 日
コメント済み: Hudson Hornet 2018 年 10 月 8 日
Hi, I am a new MATLAB user. I am working on this image . The objectives are: a) to separate/detect the droplets and ligaments, b) find out dimensions (centre, area, diameter for drops, length for ligaments) of drops and ligaments. To simplify, I am currently working on the drops only. I am done with the detection of drops.
I = imread('test_17.tif');
figure, imshow(I)
bw1 = im2bw(I, graythresh(I));
figure, imshow(bw1)
D = -bwdist(~bw1);
figure, imshow(D,[])
Ld = watershed(D);
figure, imshow(label2rgb(Ld))
bw4 = bw1;
bw4(Ld == 0) = 0;
figure, imshow(bw4)
mask = imextendedmin(D,2);
figure, imshowpair(bw1,mask,'blend')
D2 = imimposemin(D,mask);
Ld2 = watershed(D2);
bw5 = bw1;
bw5(Ld2 == 0) = 0;
figure, imshow(bw5)
bw6 = edge(bw5,'log'); %detect edges with Laplacian of Gaussian
figure, imshow(bw6)
bw7 = imfill(bw6,'holes');
figure, imshow(bw7)
Now, I am stuck with finding out the centres, areas and diameters of the all the drops. Also, any other suggestion to improve the code is welcome.
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 9 月 13 日
Can you attach the resultant image? Area: Just count the number of segmented pixels wrt image size?
Hudson Hornet
Hudson Hornet 2018 年 9 月 13 日

サインインしてコメントする。

採用された回答

AMAR P
AMAR P 2018 年 9 月 25 日
編集済み: AMAR P 2018 年 9 月 25 日
Hi, Use below function, available in Image Processing Toolbox
regionprops()
to find the objects and their properties in the image.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by