Professional Documents
Culture Documents
1988 Erosion
1988 Erosion
J. R. PARKER
The University of Calgary, Department of Computer Science, Calgary, Alta., Canada T2N IN4
Received June 23, 1987
Revision accepted August 20, 1987
Studies of thin sections of reservoir rock have been conducted for some time with the goal of understanding flow behavior
and estimating physical properties. These sections are essentially two dimensional, but it has always been assumed that the
results obtained can be extrapolated to the third dimension. Computer image-processing techniques are often used in this sort
of analysis because of the large amounts of data contained in a single digitized section image. One of the methods used to
Can. J. Earth Sci. Downloaded from www.nrcresearchpress.com by Mount Royal University on 07/13/15
process these images is erosion-dilation, wherein layers of each pore are stripped off (erosion) and then replaced (dilation).
This results in a smoothing of the pore perimeters and can be used to estimate pore radii, volume, and roughness. Because of
the size of each image, erosion-dilation of images of the pore complex of reservoir rocks is a time-consuming process. A new
method called global erosion is much faster, with no increase in memory requirement or decrease in accuracy. This should
permit the processing of larger images or a greater number of small images than does the standard method.
Les ttudes de lames minces des roches rkservoirs ont kt6 pratiquCes depuis un certain temps avec l'ojectif de mieux
comprendre le comportement de 1'Ccoulement et d'kvaluer les propriCtCs physiques. L'observation est limitCe a deux
dimensions dans les lames minces, mais on a toujours prCsumC que les ksultats obtenus pouvaient Ctre extrapolCs dans la
troiskme dimension. Les techniques de traitement d'images par ordinateur sont frkquemrnent utilsCe dans ce type d'analyse a
cause du t&s grand nombre de donnCes que foumit une seule image numCrique d'une lame mince. Une des mCthodes utilisCes
pour traiter ces images est celle d'Crosion-dilatation, dans laquelle les couches de chaque pore sont enlevCes (Crosion) et
ensuite remplacCes (dilatation). I1 en rCsulte un adoucissement des pCrimktres des pores, et en plus le rayon, le volume et la
mgositC des pores peuvent Ctre CvaluCs. La technique de l'trosion et dilatation des images appliqute un complexe de pores de
roches kservoirs est un processus qui requiert beaucoup de temps a cause de la dimension de chacune des images. Une
nouvelle mkthode appelCe Crosion globale est beaucoup plus rapide sans toutefois exiger plus de mCmoire ou de pkcision. Elle
For personal use only.
devrait permettre le traitement de plus grandes images ou d'un plus grand nombre de petites images que le fait la mtthode
habituelle.
[Traduit par la revue]
FIG. 1. Sample results from standard erosion-dilation. (a) Portion of a pore-complex image. (b) Erosion of a by two pixels. (c)Erosion of a
by four pixels. (d) Dilation of b by two pixels. (e) Dilation of c by two pixels. (f) Dilation of c by four pixels.
Computing erosion and dilation belonging to a pore is replaced by a new value representing the
Figure l a shows a small portion of a pore-complex image to distance of that pixel from the boundary of the pore. Thus,
be eroded. Assume that all pixels in the image have a value of pixels on the pore boundary would be given a value of 1, since
0 or 255, where a 255 value represents a pixel that belongs to a they are one pixel away from the boundary. Pixels that are two
pore and a 0 value represents rock. For ease of viewing, pixel pixels away from the boundary would be given the value 2 ,
values of 255 have been represented as " 1 " in Figs. 1 , 2 b , and and so on. The result has the appearance of a contour map,
2c. The standard in-place erosion method can be described as where the contours represent the distance from the edge of
follows: the pore.
( 1 ) Scan the image for a pixel with the value of 255. The resulting image contains enough information to perform
For personal use only.
( 2 ) If one of the eight immediate neighbors of this pixel has a an erosion by any number of pixels in just one pass through the
value of 0, then mark this pixel. This is done by changing its image; in other words, all possible erosions have been encoded
value to, say, 128. into a single image. This globally eroded image can be pro-
(3) Continue from step 1 until all pixels have been examined. duced in just two passes through the original image. The
(4) Scan the image again, this time looking for any pixel that method is the following:
has been marked. ( 1 ) Starting at the upper left of the image, scan along succes-
(5) Change the value of this marked pixel to 0, thereby sive rows, from left to right, until a pixel with a value of 255 is
removing it. found. This becomes the current pixel.
(6) Repeat from step 4 until all marked pixels have been (2) Look at all eight possible neighbors of the current pixel,
set to 0. and let V be the minimum value found in these pixels.
Figures 16 and l c represent erosions of Fig. l a by two pixels (3) Set the value of the current pixel to V + 1.
and four pixels, respectively, using this method. The value of (4) Continue from step 1 until all the pixels have been
255 permits the erosion of regions smaller than 5 12 pixels by examined.
512 pixels and allows the pixel values to be stored in a single (5) Now starting at the lower right of the image, scan along
memory byte. The standard method used for computing in- successive rows from right to left moving up the image, look-
place dilations is similar, and with the same assumptions for ing for a pixel whose value is nonzero. This becomes the cur-
pixel values as before, can be described as follows: rent pixel.
( 1 ) Scan the image for a pixel with the value of 0. ( 6 ) Look at all eight neighbors of the current pixel, and let V
(2) If one of the eight immediate neighbors of this pixel has a be the minimum value found in these pixels.
value of 255, then mark this pixel. (7) If V has a value less than that of the current pixel, set the
( 3 ) Continue from step 1 until all pixels have been examined. value of the current pixel to V + 1.
( 4 ) Scan the image again, this time looking for any pixel that (8) Repeat from step 5 until all pixels have been examined.
has been marked. Steps 1 -4 represent the first phase of the global erosion, and
(5) Change the value of this marked pixel to 255, thereby steps 5 - 8 represent the second phase. After the first phase is
adding a new pixel. complete the pixel values represent the minimum distance,
( 6 ) Repeat from step 4 until all marked pixels have been set expressed as numbers of pixels, to the nearest upper, upper-
to 255. left, left, and upper-right boundaries. The second phase must
Figures Id and l e show the result of dilating Figs. l b and be performed by scanning in the opposite direction in order to
l c , respectively, by two pixels. Figure If shows the result of collect the distances in the other four directions in one pass.
dilating Fig. l c by four pixels. The desired effect of removing The resulting image has all possible erosions encoded with
small irregularities has been achieved at some expense of com- the pixel values. Figure 2a shows the result of globally eroding
puter time. the pore image of Fig. l a . It would normally not be necessary
to actually perform an erosion by removing pixels, since the
image will be immediately dilated again. If the actual eroded
A faster erosion- dilation method image is desired, a simple thresholding operation will do the
The fast erosion method is based on the construction of a dis- job. To remove k layers of pixels from a globally eroded
tance map of the pore image, where the value of each pixel image, simply set all the pixels that have a value of less than or
1130 CAN. J. EARTH SCI. VOL. 25, 1988
(a1 (b) (c
000000000000000000000000000m 00000000000000000000000000000000 00000000000000000000000000000000
00000000000000001000000000000000 00000000000000000000000000000000 00000000000000000000000000000000
00000000000OOO011100000000000000 00000000000000000000000000000000 00000000000000000000000000000000
00000000000000112110000OOOOO0000 00000000000000111110000000000000 00000000000000000000000000000000
00000000000001122211000000000000 00000000000001111111000000000000 00000000000000000000000000000000
0000000000011122322111000000OOOO 00000000000111111111110000000000 00000000000111111111110000000000
00000000011122233322211100000000 00000000011111111111111100000000 00000000011111111111111100000000
00000001112223334333222111000000 00000001111111111111111111000000 00000000011111111111111110000000
00000001222333444443332221000000 00000001111111111111111111000000 00000000011111111111111110000000
00000001233344455544433321000000 00000001111111111111111111000000 00000000011111111111111110000000
00000001234445556555444321000000 00000001111111111111111111000000 00000000011111111111111110000000
00000011233445566665544321000000 00000001111111111111111111000000 00000000011111111111111110000000
Can. J. Earth Sci. Downloaded from www.nrcresearchpress.com by Mount Royal University on 07/13/15
FIG. 3. Test images used for execution timings. (a) Sample 1 . (b) Sample 2.
equal to k to 0 and set all other pixels to 255. and four pixels, respectively. Notice that there is no difference
The process of global dilation must be applied only to an between these dilated images and those of Figs. Id and If.
image that has been globally eroded. The result is an image If further dilations are needed, the original globally eroded
that has been eroded and then dilated by k pixels. The method image may be saved and dilated by a different number of
is the following: pixels, or the globally dilated image can be unmarked and
(1) Scan the image for a pixel with a value greater than 0 that redilated. Depending upon the method chosen for marking
is also unmarked. Let this pixel be the current pixel. pixels, the globally dilated image may need to be thresholded
(2) If the value of the current pixel is less than k + 1 , set the before it is displayed.
current pixel to zero; if the value of the current pixel is greater
+
than k 1, mark the current pixel. In either case, skip to step
Results
4. If the current pixel has a value equal to k + 1 , go to step 3.
(3) The current pixel must have a value of k + 1. Mark the All the computer programs for performing erosions and dila-
current pixel, and also mark all pixels with k pixels of the cur- tions were written in the C language on a VAX 111780 running
rent pixel. UNIX. Conversion to FORTRAN or another language would
(4) Repeat from step 1 until all pixels have been examined. provide no difficulty. The code for performing global erosions
The marked pixels in the image that results belong to the and dilations was actually a little shorter than the code for the
dilated pore; all other pixels are background. Figures 2b and 2c traditional method: 70 as opposed to 76 lines. Both methods
show the result of globally dilating the image of Fig. 2a by two can be coded and debugged in just a few hours.
NOTES 1131
Both methods were applied to the micropore images seen in to implement than is the standard technique but yields a signifi-
Fig. 3 , which are both of size 443 pixels by 440 pixels. A cant saving of computer time during execution. This should
modified version of the standard method in which eroded permit the processing of larger images than was previously
images are saved for later erosion steps was timed and is possible. This method will also allow the processing of a larger
referred to as the standard II method. All erosions and dilations number of images or the use of smaller computers.
from 1 to 12 pixels were requested. The computer time needed It turns out that any normally eroded image can be globally
for each method is given in the following table: dilated using a method very similar to the one described here.
The time performance is still not as good as for global ero-
CPU time (s) sion-dilation but is better than for standard 11.