You are on page 1of 11

Reservoir Geological Characterization.

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)

6) >> BW=im2bw(lamina,maps,0.51) (The value of 0.51 based on the author's


interpretation of the pore space)
7) >> imshow(BW)

8) >> nBranco=sum(BW(:)) (cemet+grains)


9) >> nPreto=numel(BW)-nBranco (pores)
10) >>Poro=nPreto/(nBranco+nPreto) (pores/total volume)

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) >> nBrancos=sum(BWs(:))(grain)


14) >> nPretos=numel(BWs)-nBrancos (pores+ cement)
15) >> grain_perc=(nBrancos/(nBrancos+nPretos))*100
16 >> pores_perc=(nPreto/(nPreto+nBranco))*100
17) >> cement_perc=100-(grain_perc+pores_perc)
The results obtained were the following: percentage of cement volume 5.97%, percentage
of grain volume 56.0285%, and finally percentage of pores 38.0015%.
REPRESENTATIVE VOLUME OF POROSITY
1) >> imshow(lamina)
2) >> lamina_cinza=rgb2gray(lamina)
3) >> imshow(lamina_cinza)
4) >> imhist(lamina_cinza)
5) >>Pores=im2bw(lamina,maps,0.51)
6) >>imshow(Pores)
7) >>Icropped = imcrop(Pores)
8) >>crop1=imcrop(Pores,[0 0 147 106])
9) >>crop2=imcrop(Pores,[0 0 294 212])
10) >>crop3=imcrop(Pores,[0 0 441 318])
11) >>crop4=imcrop(Pores,[0 0 588 424])
12) >>imshow(cropn)

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)

28) PoroVolRepr=[Porocrop1 Porocrop2 Porocrop3 Porocrop4 Poro]


29) plot(PoroVolRepr)
30) title ('Gráfic - PoroVolumes')
31) xlabel ('Volumes')
32) ylabel ('PoroVolumes')

Crop Crop1 Crop2 Crop3 Crop4 Poro(total)


Porosity- 0.3463 0.3763 0.3801 0.3778 0.38
fration
HETEROGENEITY IN THE DISTRIBUTION OF GRAIN
1) >> Image_Gray=rgb2gray(lamina)
2) >> G=imbinarize(Image_Gray)
3) >> imshow(G)

4) >> Resolution=5; Bins=20; Conn=8


5) >> [s1,s2]=size(G)
6) >> A=~bwmorph(G,'majority',10)
7) >> Poros=sum(sum(~A))/(s1*s2)
8) >> D=-bwdist(A,'cityblock')
9) >> B=medfilt2(D,[3 3])
10) >> B=watershed(B,Conn)
11) >> Pr=zeros(s1,s2)
12) >> for I=1:s1
for J=1:s2
if A(I,J)==0 && B(I,J)~=0
Pr(I,J)=1
end
end
end

13) >> Pr=bwareaopen(Pr,9,Conn)


14) >> [Pr_L,Pr_n]=bwlabel(Pr,Conn)
15) >> V=zeros(Pr_n,1)
16) >> for I=1:s1
for J=1:s2
if Pr_L(I,J)~=0
V(Pr_L(I,J))=V(Pr_L(I,J))+1
end
end
end
17) >> R=Resolution.*(V./pi).^.5
18) >> Average_grain_radius_micron=mean(R)
19) >> Standard_deviation_of_grain_radius_micron=std(R)
20) >> figure('units','normalized','outerposition',[0 0 1 1])
21) >> subplot(1,2,1)
22) >> RGB=label2rgb(Pr_L,'jet', 'w', 'shuffle')
23) >> imshow(RGB)

24) >> imwrite(RGB,'Output.png')


25) >> subplot(1,2,2)
26) >>Rel_Frequencies=hist(R,[1:round(max(R)/Bins):round(max(R))])./sum(sum(hist(
R,[1:round(max(R)/Bins):round(max(R))])))
27) >> bar([1:round(max(R)/Bins):round(max(R))],Rel_Frequencies)
28) >> xlabel('Equivalent Grain Radius (micron)'); ylabel('Relative Frequency'); axis([1
max(R) 0 max(Rel_Frequencies)]); axis square

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.

You might also like