Texture features / NGTDM
A Neighbouring Gray Tone Difference Matrix quantifies the difference between a gray value and the average gray value of its neighbours within distance \(\delta\). The sum of absolute differences for gray level \(i\) is stored in the matrix. Let \(\textbf{X}_{gl}\) be a set of segmented voxels and \(x_{gl}(j_x,j_y,j_z) \in \textbf{X}_{gl}\) be the gray level of a voxel at position \((j_x,j_y,j_z)\), then the average gray level of the neighborhood is:
where
and
Here, \(W\) is the number of voxels in the neighbourhood that are also in \(\textbf{X}_{gl}\).
As a two dimensional example, let the following matrix \(\textbf{I}\) represent a 4x4 image, having 5 discrete grey levels, but no voxels with gray level 4:
The following NGTDM can be obtained:
6 pixels have gray level 1, therefore:
\(s_1 = |1-10/3| + |1-30/8| + |1-15/5| + |1-13/5| + |1-15/5| + |1-11/3| = 13.35\)
For gray level 2, there are 2 pixels, therefore:
\(s_2 = |2-15/5| + |2-9/3| = 2\)
Similar for gray values 3 and 5:
\(s_3 = |3-12/5| + |3-18/5| + |3-20/8| + |3-5/3| = 3.03\)
\(s_5 = |5-14/5| + |5-18/5| + |5-20/8| + |5-11/5| = 10.075\)
Let:
\(n_i\) be the number of voxels in \(X_{gl}\) with gray level \(i\)
\(N_{v,p}\) be the total number of voxels in \(X_{gl}\) and equal to \(\sum{n_i}\) (i.e. the number of voxels with a valid region; at least 1 neighbor). \(N_{v,p} \leq N_p\), where \(N_p\) is the total number of voxels in the ROI.
\(p_i\) be the gray level probability and equal to \(n_i/N_v\)
\(s_i = \sum^{n_i}{|i-\bar{A}_i|}\) when \(n_i \neq 0\) and \(s_i = 0\) when \(n_i = 0\).
be the sum of absolute differences for gray level \(i\).
\(N_g\) be the number of discrete gray levels
\(N_{g,p}\) be the number of gray levels where \(p_i \neq 0\)
Coarseness
NGTDM_COARSENESS \(= \frac{1}{\sum^{N_g}_{i=1}{p_{i}s_{i}}}\)
Contrast
Assuming \(p_i\) and \(p_j\) are row indices of the NGTDM matrix,
NGTDM_CONTRAST \(= \left(\frac{1}{N_{g,p}(N_{g,p}-1)}\sum^{N_g}_{i=1}\sum^{N_g}_{j=1}{p_{i}p_{j}(i-j)^2}\right) \left(\frac{1}{N_{v,p}}\sum^{N_g}_{i=1}{s_i}\right)\) where \(p_i \neq 0\) and \(p_j \neq 0\)
Busyness
NGTDM_BUSYNESS \(= \frac{\sum^{N_g}_{i = 1}{p_{i}s_{i}}}{\sum^{N_g}_{i = 1}\sum^{N_g}_{j = 1}{|ip_i - jp_j|}}\) where \(p_i \neq 0\), \(p_j \neq 0\)
Complexity
NGTDM_COMPLEXITY \(= \frac{1}{N_{v,p}}\sum^{N_g}_{i = 1}\sum^{N_g}_{j = 1}{|i - j| \frac{p_{i}s_{i} + p_{j}s_{j}}{p_i + p_j}}\) where \(p_i \neq 0, p_j \neq 0\)
Strength
NGTDM_STRENGTH \(= \frac{\sum^{N_g}_{i = 1}\sum^{N_g}_{j = 1}{(p_i + p_j)(i-j)^2}}{\sum^{N_g}_{i = 1}{s_i}}\) where \(p_i \neq 0, p_j \neq 0\)
References
Amadasun M, King R; Textural features corresponding to textural properties; Systems, Man and Cybernetics, IEEE Transactions on 19:1264-1274 (1989). doi: 10.1109/21.44046