Pore size distribution chart
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ravin Rayeok
am 24 Feb. 2020
Kommentiert: Ravin Rayeok
am 25 Feb. 2020
Hello,
I need some assistance here...
I would love to know how do you create a distribution chart based on size and number (amount) of the pores.
Thank you!

2 Kommentare
Akzeptierte Antwort
darova
am 25 Feb. 2020
Bearbeitet: darova
am 25 Feb. 2020
Use regionprops
I = imread('image.jpeg');
I1 = im2bw(I); % binarize image
cc = bwconncomp(I1); % or 'bwlabel' to separate each region
stats = regionprops(cc, 'Area'); % calculate area of each separate region
area = cat(1,stats.Area);
area(area>500) = []; % filter bigger blobs/regions
hist(area,20) % histogram of 20 groups
xlabel('size')
ylabel('number')
result

7 Kommentare
darova
am 25 Feb. 2020
Sorry, forgot this line
area = cat(1,stats.Area);
I correct the code. Look
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

