Opentopia Directory Encyclopedia Tools

Co-occurrence matrix

Encyclopedia : C : CO : COO : Co-occurrence matrix


}

Definition

If there are two matrices A and B, with same size and both with n grey-levels, then the co-occurrence matrix of A and B is a [n*n] matrix. Let the co-occurrence matrix be C, then the value in C[i][j] equals the number of appearance of this situation: A has a i value in a position while B has a j value in the same position.



Following is Matlab Codes for calculating a co-occurrence matrix mentioned above:
function M=getCoMatrix(M1,M2)
GREY_LEVEL_NUM=2;
ROW_NUM=size(M1);
ROW_NUM=ROW_NUM(1);
M=zeros(GREY_LEVEL_NUM:GREY_LEVEL_NUM);
for i=1:ROW_NUM,
for j=1:ROW_NUM,
X=M1(i, j)+1;
Y=M2(i, j)+1;
M(X, Y)=M(X, Y)+1;
end
end

Application to

A co-occurrence matrix, also referred to as a co-occurrence distribution, 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 x m image I, parameterized by an offset (Δx,Δy), as:

[C(i,j)=\sum_^n\sum_^m\begin 1, & \mboxI(p,q)=i\mboxI(p+\Delta\ x,q+\Delta\ y)=j \\ 0, & \mbox\end]

Whether considering the intensity 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. However, there has been some success using the raw values of the co-occurrence matrix to discriminate between image textures.

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: