Skip to content

Commit 7a1a689

Browse files
committed
update chapter about granulometry
1 parent 3d6714d commit 7a1a689

File tree

9 files changed

+490
-107
lines changed

9 files changed

+490
-107
lines changed
37 KB
Loading
18.5 KB
Binary file not shown.
13.4 KB
Binary file not shown.
11.8 KB
Binary file not shown.
33.5 KB
Loading
30.6 KB
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
% Demo script for granulometry applied on grayscale image of coins.
2+
%
3+
% output = granulo_coins(input)
4+
%
5+
% Example
6+
% granulo_coins
7+
%
8+
% See also
9+
%
10+
11+
% ------
12+
% Author: David Legland
13+
14+
% INRAE - BIA Research Unit - BIBS Platform (Nantes)
15+
% Created: 2023-01-17, using Matlab 9.13.0.2049777 (R2022b)
16+
% Copyright 2023 INRAE.
17+
18+
%% Sample image
19+
20+
% read image
21+
img = imread('coins.png');
22+
imwrite(img, 'coins.png');
23+
24+
% compute several steps (before, between and after the two peaks)
25+
radiusList = [15 27 35];
26+
for iPlot = 1:3
27+
se = strel('disk', radiusList(iPlot), 0);
28+
imgOp = imopen(img, se);
29+
30+
imwrite(imgOp, sprintf('coins_OpDisk%02d.tif', radiusList(iPlot)));
31+
end
32+
33+
34+
%% compute granulo.
35+
36+
% granulometry analysis setup
37+
xi = 1:60;
38+
vol0 = sum(img(:));
39+
[gr, diams, vol] = imGranulo(img, 'opening', 'disk', xi);
40+
41+
% display granulo
42+
figure; plot(diams, gr, 'color', 'b', 'linewidth', 2);
43+
xlim([0 100]);
44+
xlabel('Diameter of structuring element (pixels)');
45+
ylabel('Variation of gray levels (%)');
46+
title('Gray level granulometry by opening', 'Interpreter', 'none');
47+
print(gcf, 'coins_grOpDk30.png', '-dpng');
48+
49+
% display volume curve
50+
figure; plot([0 diams], vol, 'color', 'b', 'linewidth', 2);
51+
xlim([0 100]);
52+
xlabel('Diameter of structuring element (pixels)');
53+
ylabel('Sum of gray levels');
54+
title('Gray level granulometry by opening', 'Interpreter', 'none');
55+
print(gcf, 'coins_grOpDk40_sumOfGrays.png', '-dpng');
56+

doc/userManual/matImage-manual.bib

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,4 +631,30 @@ @Article{Hu1962
631631
timestamp = {2021.07.09},
632632
}
633633

634+
@Article{Melelli2020,
635+
author = {Alessia Melelli and Frédéric Jamme and David Legland and Johnny Beaugrand and Alain Bourmaud},
636+
journal = {Industrial Crops and Products},
637+
title = {Microfibril angle of elementary flax fibres investigated with polarised second harmonic generation microscopy},
638+
year = {2020},
639+
issn = {0926-6690},
640+
pages = {112847},
641+
volume = {156},
642+
doi = {https://doi.org/10.1016/j.indcrop.2020.112847},
643+
file = {:Melelli_2020_IndCropProd.pdf:PDF},
644+
groups = {dlegland, Fibres},
645+
keywords = {SHG, Microfibril angle, Elementary fibres, Flax fibres, Image analysis},
646+
timestamp = {2020.08.12},
647+
url = {http://www.sciencedirect.com/science/article/pii/S0926669020307640},
648+
}
649+
650+
@Article{Legland_2020_PlantMethods,
651+
author = {Legland, David and Guillon, Fabienne and Devaux, Marie-Fran\c{c}oise},
652+
journal = {Plant Methods},
653+
title = {Parametric mapping of cellular morphology in plant tissue sections by gray level granulometry},
654+
year = {2020},
655+
number = {63},
656+
volume = {16},
657+
doi = {https://doi.org/10.1186/s13007-020-00603-7},
658+
}
659+
634660
@Comment{jabref-meta: databaseType:bibtex;}

0 commit comments

Comments
 (0)