How can calculate the average diamter of below image using matlab?

2 ビュー (過去 30 日間)
Amir Torabi
Amir Torabi 2020 年 1 月 21 日
編集済み: Image Analyst 2021 年 5 月 4 日
Hello,
I'd like to calculate the average diamtere of below microstructure using matlab.
Is it possible to calculate it or not?
The actual size of below image is 256um*256um.
ss.jpg

回答 (2 件)

Jeff E
Jeff E 2020 年 1 月 21 日
I'd start by looking at the regionprops function. Particularly, the "EquivDiameter", "MaxFeretProperties", and "MinFeretProperties" properties. Anything other measurement of diameter of an irregular object will likely be much more difficult to implement, unless you can find something on the Mathworks FileExchange.

Image Analyst
Image Analyst 2020 年 1 月 22 日
編集済み: Image Analyst 2021 年 5 月 4 日
Get a binary image by thresholding the gray scale image. Then clean up a bit and call regionprops(). Assuming the cell walls are darker than the cells:
% Binarize the image by intensity thresholding.
binaryImage = grayImage > 128; % Or whatever. Adjust number as needed or use imbinarize().
% Fill holes, in case there are any.
binaryImage = imfill(binaryImage, 'holes');
% Only keep blobs bigger than 100 pixels in area.
binaryImage = bwareaopen(binaryImage, 100);
% Remove blobs touching border since you can't get reliable diameter if the whole blob is not there.
binaryImage = imclearborder(binaryImage);
% Measure equivalent circular diameters - diameter as if the blob were a perfect circle.
props = regionprops(binaryImage, 'EquivDiameter') % This is a structure.
% Extract Area fields into a double vector.
allDiameters = [props.EquivDiameter]
% Get the average
meanECD = mean(allDiameters)
  4 件のコメント
Cristian Mennella
Cristian Mennella 2021 年 5 月 3 日
編集済み: Cristian Mennella 2021 年 5 月 3 日
Sorry, instead of props.Area is props.EquivDiameter?or no?
AllDiameters=[props.EquivDiameter]
Image Analyst
Image Analyst 2021 年 5 月 4 日
Yes, you're right. My mistake. I'll correct it.

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

カテゴリ

Help Center および File ExchangeGet Started with Image Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by