Module 05 · Program glcm3d
Haralick proposed fourteen numbers to squeeze out of a co-occurrence matrix and AASPI computes eight of them. They have distinct names and distinct formulas, and a good part of the work of using them is finding out which ones are telling you the same thing twice. This module computes them all on the same data and lets you check.
The seismic line — drag anywhere on it to move the analysis window
The data, and the matrix behind the measures
Work through the six steps in order, then try the exercises. Method and references are there when you want them.
These three all ask how far the matrix sits from its diagonal. They differ only in how much they care about the boxes that are a long way out:
contrast C = Σ Pij (i−j)2
dissimilarity D = Σ Pij |i−j|
homogeneity H = Σ Pij / (1 + (i−j)2)
Contrast squares the distance, so a single pair of very different neighbors dominates it. Dissimilarity uses the distance itself, so it is far less swayed by one outlier. Homogeneity uses the reciprocal, so it is largest when everything is near the diagonal and it barely notices how far out the far pairs are. Three answers to "how rough", weighted for three different tolerances of outliers.
1 The three weighting curves what each measure pays for distance
2 The matrix here, with those weights on it
That last figure is the reason the three exist separately. When a handful of extreme pairs carry most of the contrast, contrast is reporting those pairs and dissimilarity is reporting the window.
The next two ignore where the weight sits and ask only how it is spread out.
energy E = ( Σ Pij2 )1/2
entropy S = − Σ Pij ln Pij
Energy here has nothing to do with amplitude. The name is inherited from signal processing and it is actively misleading on seismic data. It is large when the weight is concentrated in a few boxes, which happens when the window is monotonous. The AASPI documentation makes the point sharply: if every voxel in the window is the same, even if that value is zero, the energy is high. A dead trace scores maximum energy.
Entropy is its opposite in behavior, large when the weight is spread evenly over many boxes. The two are so closely anti-correlated that computing both is nearly always redundant. Entropy is the one AASPI recommends, alongside homogeneity.
1 Three matrices with the same roughness different spread
2 Energy against entropy every window in the section
The last three treat the matrix as a probability distribution and take its ordinary statistics.
mean μ = Σ j Pij
variance V = Σ Pij (i − μ)2
correlation R = (1/V) Σ Pij (i − μ)(j − μ)
Mean is the average gray level in the window. The levels came from quantizing the window against its own RMS amplitude, so this is close to a constant everywhere. AASPI says plainly that it has little value in either interpretation or machine learning.
Variance is the spread of levels, and the AASPI documentation states the consequence directly: it reproduces semblance-based similarity, up to a scaling and a change of sign, and adds almost nothing to it. The panel below checks that claim against the semblance coherence of the first module set. The coherence is computed with the same lateral window as the texture measures, so that the comparison is about the two attributes and not about two different window sizes.
Correlation is the one whose everyday meaning does not transfer. On a photograph it measures whether neighboring pixels resemble each other, and reads as a measure of how alike a window is. Here it measures whether one level predicts its neighbor, and those are not the same question. A window whose amplitudes are all close to the mean scores low. So does a window of random values. What scores high is a window whose levels climb or fall steadily across it, which on seismic data means a wavelet passing through. The quantity measured is predictability rather than variety, and a window can hold a great deal of variety with none of it predictable.
1 GLCM variance against semblance coherence every window in the section
2 The two as maps variance above, coherence below
Every panel is computed from the same co-occurrence matrices; only the number squeezed out of them changes. Pick one with the selector in the header to see it larger, with its own color bar.
1 The eight measures each scaled to its own range
2 The one you selected with a color bar
The AASPI documentation is blunt about what these images are for: in general the output attributes are somewhat fuzzy and not very useful for human interpretation, and their role is to be input to clustering. The comparison with the coherence of the first module set bears that out. A self-organizing map does not require a crisp picture; it requires several measurements that differ from one another in a consistent way.
The table below is the correlation of every measure with every other, computed over every window in the section. Dark boxes are pairs that move together and are therefore mostly redundant. If you are choosing two or three attributes to feed a classifier, you want a set with pale boxes between them.
1 Correlation between the measures dark means redundant
2 How many independent directions variance explained
The second panel takes the eight measures across the whole section and asks how many independent directions the cloud of points really has. If two or three components account for nearly all of the variance, then eight attributes carry two or three attributes' worth of information. That does not make the other five useless. It does mean that feeding all eight to a classifier is not feeding it eight things.
Every step so far has worked on a vertical section, which is a convenient place to follow the arithmetic and a poor place to apply it. A texture attribute computed on a section is largely measuring the pattern the wavelet makes. The strongest variation in any vertical window is the peak-trough-peak of the wavelet itself, which is what the Hilbert term of step 2 corrects for.
Sliced along a horizon, the same attribute is measuring the pattern the geology makes. Amplitude changes laterally because the rock changes laterally, and the texture of that change is the facies. This is how a GLCM volume normally gets looked at, and it is why the AASPI examples are horizon and stratal slices rather than lines.
The map below is an amplitude extraction with four things on it: conformable background, a chaotic body, a meandering channel with accretion banding across its axis, and a fault lineament. All four are around the same brightness on purpose. An amplitude map struggles to separate them; the texture measures do not, because they are not looking at brightness.
The background is not smooth. It carries a depositional fabric of its own, at a scale of a few bins, and the chaotic body is built from a field with a scale rather than from uncorrelated speckle. That distinction is the one that matters most on real data: a chaotic facies has a size to it, and acquisition noise does not, which is what separates a genuine anomaly from a noisy patch of section. The noise slider adds the second kind, so the two can be compared directly.
1 The amplitude extraction the input
2 The selected attribute, in map view
3 One direction at a time contrast, east against north
In map view the four directions are the four compass directions, which makes the anisotropy visible rather than theoretical. A north-only matrix and an east-only matrix agree almost exactly on the background and disagree on the channel, which is banded across its axis and smooth along it. The size of that disagreement is modest, roughly two to one. A channel on a real horizon slice is only modestly anisotropic at a one-bin lag, and most of what shows up comes from its margins rather than from the bars inside it. The fault lineament, at about one to two the other way, is the more strongly directional feature on this map. Summing all four directions, which is what AASPI does, buys an answer that does not depend on how a feature happens to be oriented, at the cost of any indication that it is oriented at all. Ratios of this size are also why azimuth scanning is used: four compass directions at unit offset resolves orientation only coarsely.
Texture attributes are normally used as classifier input rather than displayed for interpretation, which changes the basis on which a good set of them is chosen.
The co-occurrence matrices are built exactly as in module 04. The window is gathered along structural dip and quantized against its own RMS amplitude with a 1.5σ clip — σ being the RMS taken about zero rather than about the window mean, as module 04 sets out — and all four directions are counted with each pair added both ways round. The eight measures are then computed from those matrices with the formulas printed in steps 1 to 3, which are the forms given in the glcm3d documentation.
The Hilbert term. When the checkbox is on, a second matrix is built from the Hilbert transform of the same window and the two are added inside each measure, which is what AASPI does. It removes the dependence on where the analysis window happens to sit on the wavelet. AASPI additionally weights the contribution of each one-sample-thick slice by its RMS amplitude; that weighting is not applied here, and the difference it makes is small on a section with no strong amplitude gradient.
Correlation is the one measure where “compute both and add” does not describe what happens, because it is a ratio rather than a sum. With the Hilbert term on, the summed cross term is divided by the summed variance, so the two matrices are pooled into one correlation instead of producing two that are added. Pooling is the sensible reading of a normalized quantity, but it is a choice, and it is why correlation moves differently from the other seven when the checkbox is toggled.
Where this departs from AASPI. Two dimensions rather than three. The maps use fewer gray levels than the 33-level default, and the slider tops out at 17. A map requires a matrix at every sample, and a sparse matrix produces a noisy map. The single-point matrices in module 04 use the full 33. That is a real effect and not only a speed compromise: it is the same sparsity argument module 04 makes, seen from the other side. AASPI computes fifteen measures in total, including Gao's randomness; the eight here are the ones the GUI offers as output volumes.
The map view in step 6 is a synthetic amplitude extraction rather than a slice through a computed volume. It is ng by ng bins carrying four facies, each given a texture rather than only a brightness, since a texture attribute cannot see brightness. The background varies slowly, the chaotic body is fine random speckle, the channel is banded across its axis and smooth along it, and the fault is a narrow dim lineament. The measures are computed on it exactly as they are on the section, with a square window and the same four directions. In map view those are the four compass directions, the sense Haralick originally defined them in. The window there is capped at 8 bins radius and the maps are computed every other bin, for speed.
The redundancy analysis in step 5 standardizes each measure to zero mean and unit variance before computing the correlation matrix and its eigenvalues. The eight have wildly different units, and an unstandardized analysis would simply rank them by magnitude.
Every number quoted on this page is measured from the running page.
Where the meters come from. The section model has an assumed interval velocity of 2800 m/s and an assumed trace spacing of 12.5 m attached to it, used nowhere in the eight measures and only in the scale panel. The map-view model is built on 25 m bins directly. Neither number is fitted to anything; they are there so that the size of an analysis window can be compared against the size of the feature it is meant to resolve.
The panels are not the same kind of picture. The section is amplitude. The eight measures are statistics of a matrix of pair counts, each with its own units or none, and several of them run in opposite senses: homogeneity is high where contrast is low. A map of one of them is not a map of the rock but a map of a property of a window, and moving the window changes the value at a point without anything in the ground having changed.
What the model leaves out. Both models are cartoons. The section has no multiples, no tuning wedges beyond what the random bed spacing produces by accident, and no amplitude variation with offset, so nothing on this page tests whether these measures survive an AVO-driven amplitude change. The map-view facies are drawn as textures on a flat statistical model rather than deposited by any process, which is why they separate more cleanly here than they will on a real horizon slice.
Fault dip, and why the drawn one is steeper. The dip is specified in the ground and converted to a slope on the section through the velocity and the bin spacing, so the plane is at 65° in the rock rather than 65° on the screen. The section is vertically exaggerated, as nearly every seismic display is, and the scale panel reports the drawn dip alongside the true one so the difference can be seen rather than inferred. Fault dips measured off a section are routinely too steep for this reason alone.
Next up
The last of the four programs asks a question the others cannot: not whether the reflectors are continuous or rough, but whether they are parallel to each other. That is what separates a chaotic package from a conformable one even when both are perfectly coherent.
Open module 06 → All modules