-
Notifications
You must be signed in to change notification settings - Fork 8
/
main_0.m
46 lines (28 loc) · 1.11 KB
/
main_0.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
clear;
close all;
clc;
%-- Load images ----------------------------------------------------------%
[Imgs, imgs, pixsizes] = tools.load_imgs; % load a single image
fname = {Imgs.fname};
%-------------------------------------------------------------------------%
%-- Run thresholding for all of the images -------------------------------%
opts.bool_kmeans = 1;
opts.bool_otsu = 0;
imgs_binary = agg.seg(imgs, pixsizes, opts);
Aggs = agg.analyze_binary(imgs_binary, ...
pixsizes, imgs, fname); % determine aggregate properties
%-------------------------------------------------------------------------%
%-- Compute the primary particle size ------------------------------------%
Aggs_pcm = pp.pcm(Aggs); % apply PCM
Aggs_edm = pp.edm_sbs(Aggs_pcm); % apply EDM-SBS (overwrites Aggs.dp)
tools.write_excel(Aggs_edm, 'temp\Aggs.xlsx'); % write data to Excel file
%-------------------------------------------------------------------------%
figure(1);
tools.imshow_agg(Aggs_edm);
figure(4);
loglog([Aggs_pcm.dp], [Aggs_edm.dp], '.');
hold on;
loglog(xlim,xlim);
hold off;
xlabel('PCM, dp [nm]');
ylabel('EDM-SBS, dp [nm]');