Entropy of Shortest Distance (ESD) as Pore Detector and Pore-Shape Classifier

The entropy of shortest distance (ESD) between geographic elements (“elliptical intrusions”, “lineaments”, “points”) on a map, or between "vugs", "fractures" and "pores" in the macro- or microscopic images of triple porosity naturally fractured vuggy carbonates provides a powerful new tool for the digital processing, analysis, classification and space/time distribution prognostic of mineral resources as well as the void space in carbonates, and in other rocks. The procedure is applicable at all scales, from outcrop photos, FMI, UBI, USI (geophysical imaging techniques) to micrographs, as we shall illustrate through some examples. Out of the possible applications of the ESD concept, we discuss in details the sliding window entropy filtering for nonlinear pore boundary enhancement, and propose this procedure as unbiased thresholding technique.


Introduction
In the early years of Information Theory, Good ( [1,2], see also [3,4]) introduced the influential "how to keep the forecaster honest" paradigm, that is how to design a payoff system which would force the forecaster to give an unbiased prediction.Much later (in 1972 [5]) it was proved mathematically that the only way to do this is intimately connected with the concept of Shannon entropy.

Motivation
In the parlance of Petroleum Exploration, permeability-one of the most important petrophysical property of reservoir rocks, and the principal target of our recent research-is never "estimated" or "computed" from well logs, well pressure transients, or small cuttings of rock: it is always "predicted".There is, of course, a hidden caveat in the term: any prediction can go wrong.Soothsaying is a dangerous business.In Dante's Inferno the souls of soothsayers who misled their clients have their heads twisted to the rear, so they walk backward.But it is so easy to understand why the diviners had cheated.Who would dare to upset a Caesar who ordered "Go bid the priests to do present sacrifice; And bring me their opinions of success" (Shakespeare: Julius Caesar II, 2,5-italics ours; the last three sentences are paraphrased from the study [6]).

Mathematical Model
Let the probability of the i th possible event be that is, the expected payoff is maximal if the forecaster predicts the events according to their correct probability.In a brilliant paper, Pál Fischer [5] proved that the only function satisfying that is-apart from a constant factor-the expected payoff is the Shannon entropy . Putting aside the "forecaster" analogy, we can say that the only reasonable and unbiased quantitative "value" what we can associate with the information about a probability distribution This consideration had been one of the motivations for our group to introduce, some 10 years ago, the TRISA relative-entropy triangle to analyze and conveniently plot the joint development and mutual dependency of three variables, measured in incommensurable units [7,8].In the present paper we use Shannon entropy in a very different context, as a measure of the structural (configurational) disorder of random geometrical patterns [9].In the statistical physics of point patterns configurational entropy is defined as where W is the number of different configurations, assuming that all configurations are equally probable (Boltzmann's equation, B k is the Boltzmann constant, Figure 1).If  In the geometrical probability theory of irregularly placed points the distances to nearest neighbor, and their probability distribution, have become a standard tool to characterize spatial relationships in populations [12].It was first proved by Hertz ([13], simplified in [12]), that if a large number of points are Poisson-distributed on the plane with density , and for every point its distance to the nearest neighbor is i r then the average value of i r , that is , tends to an expected value E r for   N : Thus, the randomness of a point arrangement can be characterized by the ratio [12]: and Pr means probability of a random event, dist is the Euclidean distance, then: is a meaningful (and, as we discussed above in connection with the forecaster problem, the only objective) measure of the irregularity of a point distribution.
The intimate connection between distance-to-nearest-neighbors and entropy is expressed by a Theorem of ) which states that, under some mild conditions, for N points distributed in the d-dimensional Euclidean space: H , is the entropy of the d-dimensional point distribution, the factor in square brackets is the volume of the d-dimensional unit sphere,  = 0.5772 …. is Euler's constant,  the gamma function.For the 2-dimensional case: By the inequality between the geometric and arithmetic means of positive numbers ( [17]) , which gives an upper bound for the entropy of an arrangement of N points:

Entropy of the Shortest Distance
In Economic Geology, Geochemistry, and Mineral Exploration there are legions of empirical rules, which claim cause-effect relations between observable planar objects (such as faults, lineaments on aerial photographs; halos with increased radon activity, etc.) and the presence of proved mineral occurrences [18][19][20][21].A hypothetical case is shown in Figure 2 where the lineaments (green lines) are apparently related to mineral occurrences (yellow dots).In the spirit of the "entropy of shortest distance" we expect that if the distances of the dots from the nearest lines are very randomly distributed, with large entropy, then there is no valid relation between the two sets of objects.On the other hand, if all distances are small, within the measurement accuracy only a few different values will be observed, and the distribution will have a small entropy.Thus, a low entropy of shortest dot-to-line distances would prove the causal relation between the two sets.The idea can be easily extended to three kinds of randomly distributed objects ("ellipses", "lineaments", "points"), see Figure 3.Of course other, metric approaches are also possible [12,18], based on the actual values of the shortest dot-to-line distances, their distribution, mean, their normality, etc.Still, as discussed previously, by Fischer's [5] Theorem only the entropy can be considered as an objective measure.
The ESD (entropy of shortest distance to neighboring element) idea was studied in depth in the PhD thesis of B. Sterligov [22] then it has been further developed, in collaboration with Professors S. Cherkasov and K. Oleschko to the user friendly PROGNOZ software [23].Quite recently, we realized that making an analogy between the three geographic elements "ellipses", "lineaments", "points" and the macro-and microscopically observable "vugs", "fractures" and "pores" of triple porosity naturally fractured vuggy carbonates, we get a powerful new tool for the digital processing, analysis, and classification of the void space in carbonates, and other reservoir rocks.The procedure is applicable at all scales, from micrographs to outcrop photos, as we shall illustrate by examples.
Out of the many possible ways to apply the ESD concept, we only discuss the sliding window entropy filtering for pore boundary enhancement, in the next Section.A similar technique, based on the ESD of Poisson distributed random points from nearest pores, will be briefly mentioned in the concluding part.Figure 3. Spatial relation between three shapes ("granite outcrops" blue, "mineral occurrences" (red), and "lineaments", black).Scaled down by a factor 5  10 ,the model might represent an outcrop of a vuggy, fractured limestone (see Figure 7), reducing it by 8  10 it will resemble an optical micrograph of a triple porosity carbonate (Figures 8,9).Our entropy technique remains applicable through this enormous range of scales.

Sliding Window Entropy Filtering for Bore Boundary Enhancement
Using the standard notation of geometry [24][25][26] if A and B are sets in the n-dimensional Euclidean space n R of finite measure , then the Minkowski sum of A and B is defined as: In the special case when B is the n-dimensional hypersphere, we call the extended hypersphere of radius r around A. In the 2-dimensional (planar) case, assuming that the set A is convex, and denoting the length of its circumference by c(A), by a Theorem of Tomiczková [26] the area of the extended circle ) ; ( A r S is given by: where in the 2-dimensional case  is area.An example of "extended circle" around a rectangle is shown in  2 , but at the same time it is much less than the size of the pore A. The "pore" in the image is distinguished with a separate color, or a distinct range of values of gray scale.The boundary of the pore is generally diffuse, not clearly defined because of non zero thickness of the thin sections (which commonly measured less than 30 m).Let us consider the sequence of extended circles with increasing radii around A (see Figure 5): The sequence of these sets satisfies (where in the 2-D case the measure μ is area): Taking set-theoretical differences between successive extended spheres around A of respective radii  k and   1 k we get a sequence of rings around the pore A defined as: . By the construction, each ring is one pixel wide.If the moving window W is closer to the pore A than D/2 then: and, consequently, (because the rings are distinct): Suppose the square-shaped window W moves, without rotation, staying parallel to its original position, along a linear path as shown in Figure 5.In the figure, W starts to move from a position where it is fully inside A, A W  , then it passes through intermediate positions when only a part of W is inside the pore:   A W , up to a final position when W is fully outside the pore and it is covered by M successive rings: In any position of the moving window, the altogether 2  w pixels in W define the set of 2 w distances where ij  is the shortest distance (with the precision of pixel-size ) between the pixel where   S # denotes the number of elements of the set S. The Shannon entropy of this distribution is , with the usual convention that for 0  p the product p pln is defined as 0 ln lim 0   p p p .Consider the three possible positions of the window W relative to the pore A.
If W is fully outside A but still inside the extended sphere of radius  K around A, then in a typical case it will have non-empty intersections with w consecutive rings: for some value of k in such a way that each intersection with a ring i  contains about w pixels, and in the set i W   all distances are equal to the same value    i i  .In this case, the typical probability distribution will be: The corresponding Shannon entropy is: Consider now the most interesting case, when part of the window W lies inside pore A, the rest of it is outside in such a way that it has non-empty intersections with the first l rings only: where .w l  In a typical case each intersection with a given ring i  contains about w pixels, and in the set i W   all distances are equal to the same value i  .In this case the probability distribution is: which yields the entropy: Figure 6 shows how the Shannon entropy (Equation ( 17)) increases as the box W gradually moves out from the pore, for the case when W consists of 10 10 pixels.We emphasize that in order to compute the entropy, we do not have to actually construct the rings around the pore, but we do need an algorithm to find the distance of any pixel from the nearest pore.
As seen from the graph (Figure 6), we can use the following algorithm to define the boundary A  of the pore A: Select the size of W less than the half distance between nearest pores.In any position of the moving window W compute the distances    17)) as W gradually moves out from the pore.

PROGNOZ Application to Pore Boundary Detection
The entropy technique has been incorporated in our PROGNOZ software package [23].It has proven successful in different applications.It can be used for images at any scale as seen in Figures 7  and 9, where Figure 7 is the photo of a carbonate outcrop from Saudi Arabia (lower Eocene Rus Formation, described in [27]), Figure 9 is the ESD map of the optical micrograph (shown in Fig. 8) of a sample taken from the same outcrop.As seen in the 3 rd image of Figure 7, the entropy cutoff 2  H reliably defines the "pores" (more exactly, vugs and caves in this case, as the picture represents the outcrop scale).The inset in Figure 7 shows the histogram of distances from randomly selected points to the nearest pore.To compute a histogram such as this, it is not necessary to move a sliding window W all over the image, we only need to randomly generate a large number of Poisson distributed points and compute the entropy of the probability distribution of their distances from the nearest pore.The mathematical treatment of the Poisson-distributed points approach is very challenging, and we have not attempted it in this paper.Mark Berman [25] derived the distribution of the distances of a fixed point from Poisson-distributed objects of random sizes and directions, as well as the distribution of distances between a fixed object and random Poisson-distributed points.We think that his results, combined with Tomiczková's [26] Equation (7) for the area  

Concluding Remarks and Outlook
For triple-porosity carbonate rocks, apart from detecting void spaces on images, we also have to differentiate between pores, fractures and vugs.We expect that these three types of void space will be characterized by different entropy cutoffs.Some preliminary results are shown in Figure 9 representing the entropy map of the micrograph Figure 8, where we found for large vugs H = 0.2-0.7,for small vugs and pores H = 1-1.7,while in the solid matrix, far away from pores H = 1.9-2.4.For fractures, we expect a small entropy cut-off 0  H .Of course, these ranges depend on the size of the sliding window, what in our case was    10 10 . Both algorithms (the sliding window, and the Poisson points) are based on entropies of the probability distribution of the shortest distances of points from pores, rather than on entropies of these distances themselves considered as random variables.As compared to the entropy of the geometric distribution of N points on the plane (Equation 5b), which logarithmically scales with magnification λ: (the upper bound of entropy in Equation (5c) has a similar scaling) both our ESD measures are scale free, as for example the entropy map in Figure 9 only depends on the image in Figure 8 and not on its scale.Still, we would hesitate to call these algorithms scale invariant, because the cut-off entropy values characterizing pore-(or vug-, or fracture-) boundaries certainly depend on metric factors, which are the window size in the sliding window algorithm, and the density when we use Poisson-distributed points.

Figure 1 .
Figure 1.Ludwig Boltzmann's grave in the Central Vienna Cemetery, with his famous equation, S=k log W.

Figure 2 .
Figure 2. A model representing the case of strong correlation between the placement of the mineral occurrences (yellow dots), and lineaments.

Figure 4 .
If the radius of the circle B is r, the sides of the rectangle A are a and b, it is easy to check Equation

Figure 4 .
Figure 4. Minkowski sum of a rectangle of sides a, b with a circle of radius r ( b r a r   ,).

Figure 5 .
Figure 5. Illustration of the sliding window entropy technique for a better definition of the boundary of the pore 0 A .The sliding window W, which moves out of 0 A , has a size less than half the distance to the nearest pore.The sequence


will form the foundations upon which the theory of ESD of random Poisson-distributed points from the nearest pore will be developed.

Figure 7 .
Figure 7. Entropy of shortest distance (ESD) processing of a carbonate outcrop photo.The second image in the sequence shows the entropy map over the whole image, as discussed in the text, the cutoff 2  Hdefines the pores (3rd image).The inset shows the histogram of distances from randomly selected points to the nearest pore.

Figure 8 .
Figure 8. 10 × magnification of a rock sample, taken from the outcrop in Figure 6.The position of the section is perpendicular to the face of the rock wall.
Change of the Shannon entropy (Equation (