|This article may need to be rewritten entirely to comply with Wikipedia's quality standards. (October 2013)|
||This article is written like a personal reflection or opinion essay rather than an encyclopedic description of the subject. (October 2013)|
||This article needs attention from an expert on the subject. (October 2013)|
||This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (October 2013)|
A co-occurrence matrix or co-occurrence distribution (less often coöccurrence matrix or coöccurrence distribution) is a matrix or distribution that is defined over an image to be the distribution of co-occurring values at a given offset. Mathematically, a co-occurrence matrix C is defined over an n × m image I, parameterized by an offset (Δx,Δy), as:
where i and j are the image intensity values of the image, p and q are the spatial positions in the image I and the offset (Δx,Δy) depends on the direction used and the distance at which the matrix is computed d. The 'value' of the image originally referred to the grayscale value of the specified pixel, but could be anything, from a binary on/off value to 32-bit color and beyond. Note that 32-bit color will yield a co-occurrence matrix!
Really any matrix or pair of matrices can be used to generate a co-occurrence matrix, though their main applicability has been in the measuring of texture in images, so the typical definition, as above, assumes that the matrix is in fact an image.
It is also possible to define the matrix across two different images. Such a matrix can then be used for color mapping.
Note that the (Δx,Δy) parameterization makes the co-occurrence matrix sensitive to rotation. We choose one offset vector, so a rotation of the image not equal to 180 degrees will result in a different co-occurrence distribution for the same (rotated) image. This is rarely desirable in the applications co-occurrence matrices are used in, so the co-occurrence matrix is often formed using a set of offsets sweeping through 180 degrees (i.e. 0, 45, 90, and 135 degrees) at the same distance to achieve a degree of rotational invariance.
Co-occurrence matrices have been referred to as:
- GLCM (Gray-Level Co-occurrence Matrices)
- GLCH (Gray-Level Co-occurrence Histograms)
- spatial dependence matrix
Application to image analysis
Whether considering the intensity or grayscale values of the image or various dimensions of color, the co-occurrence matrix can measure the texture of the image. Because co-occurrence matrices are typically large and sparse, various metrics of the matrix are often taken to get a more useful set of features. Features generated using this technique are usually called Haralick features, after R M Haralick.
- Robert M Haralick, K Shanmugam, Its'hak Dinstein (1973). "Textural Features for Image Classification". IEEE Transactions on Systems, Man, and Cybernetics. SMC-3 (6): 610–621.