Professional Documents
Culture Documents
Exercise Using Programming Routines
Exercise Using Programming Routines
PP323-GA120
Student: Maria Liceth Cabrera Ruiz. RA:227876
Exercise using programming routines (Matlab)
1. Porosity calculation
2. Porosity, grains, and Cement, volume calculation
3. Representative volume of porosity
4. Heterogeneity in the distribution of pores or grain
SIMPLES ROUTINE IN MATLAB
POROSITY CALCULATION
1) Import data (lamina.png)
2) >> imshow(lamina)
3) >>lamina_cinza=rgb2gray(lamina)
4) >>imshow(lamina_cinza)
5) >> imhist(lamina_cinza)
Thanks to the routine used in Matlab and the visual interpretation, an image
porosity value of 0.38 was obtained.
POROSITY, GRAINS, AND CEMENT, VOLUME CALCULATION
11) >>BWs=im2bw(lamina,maps,0.63)
12) >> imshow(BWs)
13) >>nWhitecrop1=sum(crop1(:))
14) >>nBlackcrop1=numel(crop1)-nWhitecrop1
15) >>Porocrop1=nBlackcrop1/(nBlackcrop1+nWhitecrop1)
16) nWhitecrop2=sum(crop2(:))
17) nBlackcrop2=numel(crop2)-nWhitecrop2
18) Porocrop2=nBlackcrop2/(nBlackcrop2+nWhitecrop2)
19) nWhitecrop3=sum(crop3(:))
20) nBlackcrop3=numel(crop3)-nWhitecrop3
21) Porocrop3=nBlackcrop3/(nBlackcrop3+nWhitecrop3)
22) nWhitecrop4=sum(crop4(:))
23) nBlackcrop4=numel(crop4)-nWhitecrop4
24) Porocrop4=nBlackcrop4/(nBlackcrop4+nWhitecrop4)
25) nWhite=sum(Pores(:))
26) nBlack=numel(Pores)-nWhite
27) Poro=nBlack/(nBlack+nWhite)
29) >> annotation('textbox',[.2 .85 .1 .1], 'String', [ 'Average grain radius = '
num2str(Average_grain_radius_micron) ' micron'])
Distribution of Grain
REFERENCES
Rabbani, A., Ayatollahi, S. (2015). Comparing three image processing algorithms
to estimate the grain-size distribution of porous rocks from binary 2d images and
sensitivity analysis of the grain overlapping degree. Special Topics & Reviews in
Porous Media: An International Journal 6 (1), 71-89.