# MATRIXx

cancel
Showing results for
Did you mean:

Highlighted

## Problem calculating grey level Co-occurrence matrix

Hey

Basically I'm having trouble calculating the grey level co-occurrence matrix of a texture and every example I have looked at online doesn't make any sense to me.

(I have attached a few images to try and make more sense).

For example

http://www.fp.ucalgary.ca/mhallbey/the_glcm.htm

"The top left cell will be filled with the number of times the combination 0,0 occurs, i.e. how many times within the image area a pixel with grey level 0 (neighbour pixel) falls to the right of another pixel with grey level 0 (reference pixel)."

In the example below, I am guessing the cell in the top left hand corner of the bottom table has 2 because 0,0 occurs twice, in one cell and n the adjacent cell as highlighted with a circle?

Is this right?

So after do I calculate 0 and 1 then 0 and 2 and so on?

why is it 2, 2, 1 and 0?

How does it work, are there any tutorials out there, please I need help my teacher isn't helping me as well.

Message 1 of 2
(4,397 Views)

## Re: Problem calculating grey level Co-occurrence matrix

Hi Tezelian,

This is a forum for software queries about NI MatrixX.  Are you using this in your projects?

Therefore, this query is slightly outside the scope of the forum, but I'll endeavour to answer it anyway - the last matrix in your post measures the number of times the colour has been to the east of each other colour in the original image - for example, the grey level 0 appears to the east of itself twice, so the (0,0) element in the table is 2.  This is true for all elements.

I hope this helps, and if you have any further questions about NI products, please don't hesitate to get in touch.

Best wishes,

Chiara A
Applications Engineer with NI UK & Ireland
Message 2 of 2
(4,378 Views)