0
$\begingroup$

I need to calculate the Gray Level Co-occurrence Matrix (GLCM) of a given matrix. In Matlab there is a built-in function to do this. However, it only considers the co-occurrence along the horizontal direction.

Is there any such function in Mathematica?

If not, how to find the GLCM which will consider the co-occurrence along any arbitrary direction and with any arbitrary kernel size(to consider the neighbors)?

$\endgroup$
2
$\begingroup$

From the documentation for ImageCooccurrence

For the test image

Mathematica graphics

MatrixPlot[
 ImageCooccurrence[
  Import["http://i.stack.imgur.com/XnpBr.png"]
  , 32
  ]
 ]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.