How to calculate the radial void fraction of non spherical particles from in an image

1 回表示 (過去 30 日間)
AASHNA SUNEJA
AASHNA SUNEJA 2021 年 11 月 30 日
回答済み: yanqi liu 2021 年 12 月 1 日
How to calculate the radial void fraction of non spherical particles from in an image? I am attaching one such image from which I want to estimate the radial void fraction

回答 (1 件)

yanqi liu
yanqi liu 2021 年 12 月 1 日
yes,sir,may be consider
clc; clear all; close all;
img = imread('https://ww2.mathworks.cn/matlabcentral/answers/uploaded_files/818369/Non%20spherical%20particle.PNG');
im = rgb2gray(img);
bw = im2bw(im);
bw = ~bw;
bw = imopen(bw, strel('disk', 2));
bw = imclose(bw, strel('disk', 19));
be = imbinarize(im,'adaptive','ForegroundPolarity','dark','Sensitivity',0.65);
be(~bw) = 0;
be2 = imerode(be, strel('disk', 2));
be(be2) = 0;
figure; imshow(img); hold on;
h = imshow(label2rgb(bwlabel(be), 'hsv'));
set(h, 'AlphaData', 0.7);
stats = regionprops(be, 'MajorAxisLength');
rate=mean(cat(1,stats.MajorAxisLength))
rate = 26.8974

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by