The Neighborhood Gray-Tone Difference Matrix (NGTDM) is a texture analysis method that quantifies the spatial coarseness of an image by calculating the sum of absolute differences between the gray-level of a central voxel and the mean gray-level of its surrounding neighbors within a Chebyshev distance. Unlike matrices that focus on specific directional relationships, the NGTDM captures the aggregate local intensity variation in a rotationally invariant manner, making it a robust descriptor of tissue heterogeneity in radiomics.
Glossary
Neighborhood Gray-Tone Difference Matrix (NGTDM)

What is Neighborhood Gray-Tone Difference Matrix (NGTDM)?
A second-order texture matrix that quantifies the local intensity variation by measuring the difference between a voxel's gray-level and the average gray-level of its neighbors within a defined distance.
From the NGTDM, five primary features are derived: coarseness, contrast, busyness, complexity, and strength. Coarseness reflects the granularity of the texture, with higher values indicating larger, more uniform regions. Busyness measures the rate of spatial intensity changes, while complexity indicates the information content. These features are highly sensitive to the intensity discretization and neighborhood distance parameters, requiring strict adherence to Image Biomarker Standardisation Initiative (IBSI) guidelines for reproducible extraction.
Key NGTDM-Derived Features
The Neighborhood Gray-Tone Difference Matrix (NGTDM) quantifies the difference between a voxel's intensity and the average intensity of its neighbors within a defined distance. The following five core features are derived directly from the NGTDM to characterize intralesional heterogeneity.
Coarseness
A measure of the spatial rate of intensity change. Coarseness quantifies the granularity of the texture by summing the product of each gray-level probability and its corresponding NGTDM entry.
- High Coarseness: Indicates a uniform, slowly changing texture with large, homogeneous regions. Spatial variations are low.
- Low Coarseness: Indicates a fine, rapidly changing texture with high spatial frequency and small, distinct primitives.
- Clinical Relevance: In oncology, higher coarseness often correlates with more homogeneous tumor tissue, while lower values suggest greater microstructural heterogeneity.
Contrast
Quantifies the intensity difference between neighboring regions and the dynamic range of the gray levels. Contrast is high when the image has sharp intensity transitions and a wide range of gray values.
- Calculation: It weights the squared difference between gray-level pairs by their average probability, emphasizing large intensity excursions.
- High Contrast: Suggests a heterogeneous texture with distinct, sharply delineated boundaries between tissue compartments.
- Low Contrast: Suggests a blurred, smooth texture with minimal intensity variation between adjacent regions.
- Example: A CT scan with a necrotic core adjacent to a highly vascularized rim will exhibit high contrast.
Busyness
Measures the spatial frequency of intensity changes. Busyness is high when intensity changes rapidly from one pixel to its neighborhood, indicating a 'busy' texture.
- Mechanism: It computes the sum of the product of gray-level probabilities and their NGTDM values, normalized by the absolute differences between gray levels.
- High Busyness: Indicates a fine, chaotic texture with rapid, high-frequency intensity fluctuations.
- Low Busyness: Indicates a coarse, slowly varying texture.
- Distinction from Coarseness: While coarseness measures the magnitude of the difference, busyness emphasizes the rate of change between adjacent intensity levels.
Complexity
A measure of the information content and the number of primitive components in the texture. Complexity is high when there are many distinct gray-level patches and rapid spatial changes.
- Calculation: It sums the absolute differences between the probabilities of gray-level pairs, weighted by the sum of their NGTDM values.
- High Complexity: Indicates a non-uniform, intricate texture with many different intensity primitives and irregular borders.
- Low Complexity: Indicates a simple, regular texture with few distinct gray-level components.
- Clinical Context: High complexity in a tumor ROI often indicates a disorganized, aggressive growth pattern with mixed cellularity and necrosis.
Strength
A measure of the overall emphasis on coarse, high-contrast primitives relative to fine, low-contrast ones. Strength is high when the image contains well-defined, easily distinguishable coarse structures.
- Mechanism: It is computed as the ratio of the sum of the product of probabilities and squared gray-level differences to the sum of the NGTDM values.
- High Strength: Indicates that the texture is dominated by bold, coarse, and visually prominent structures.
- Low Strength: Indicates that fine, low-contrast textures dominate the image.
- Interpretation: Strength helps differentiate between images where coarse features are visually dominant versus those where they are present but not the primary textural signal.
Frequently Asked Questions
Clear, technical answers to the most common questions about the Neighborhood Gray-Tone Difference Matrix and its role in quantifying image texture.
The Neighborhood Gray-Tone Difference Matrix (NGTDM) is a second-order statistical texture matrix that quantifies the difference between a pixel's gray-level value and the average gray-level value of its surrounding neighbors within a defined distance. Unlike the Gray-Level Co-occurrence Matrix (GLCM), which analyzes pixel pairs, the NGTDM captures the spatial relationship between a central voxel and its local neighborhood. The algorithm works by: (1) defining a neighborhood size (typically a Chebyshev distance of 1, creating a 3x3 kernel in 2D or 3x3x3 in 3D), (2) calculating the average gray tone of all neighbors for each pixel, (3) computing the absolute difference between the center pixel's value and this neighborhood average, and (4) summing these differences for each discrete gray level to populate the matrix. This approach excels at capturing coarseness, contrast, and busyness—textural properties that directly correlate with human visual perception of roughness and granularity in medical images.
NGTDM vs. Other Texture Matrices
Comparison of the Neighborhood Gray-Tone Difference Matrix against other core radiomic texture matrices across key methodological and computational properties.
| Feature | NGTDM | GLCM | GLRLM | GLSZM |
|---|---|---|---|---|
Statistical Order | Second-order | Second-order | Higher-order | Higher-order |
Primary Quantification | Gray-tone difference from neighborhood mean | Pixel pair co-occurrence probability | Consecutive pixel run length | Connected region size |
Directional Dependence | ||||
Rotationally Invariant | ||||
Captures Coarseness | ||||
Captures Contrast | ||||
Computational Complexity | O(n × m) | O(n² × d) | O(n × m × d) | O(n × m) |
Typical Feature Count | 5 features | 22-24 features | 16 features | 16 features |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The NGTDM is one of several core texture matrices used in radiomics. Understanding its relationship to sibling matrices clarifies when to use each for capturing specific aspects of tissue heterogeneity.
Coarseness (NGTDM Primary Metric)
The signature feature derived from NGTDM, quantifying the spatial rate of intensity change. High coarseness indicates large, uniform regions; low coarseness indicates fine, rapidly changing textures.
- Formula: Coarseness = 1 / (sum of NGTDM elements + small epsilon)
- Inversely related to the sum of neighborhood differences
- Clinical relevance: High coarseness in tumors often correlates with necrosis
- Highly sensitive to discretization parameters
- Often combined with contrast and busyness for multi-feature texture profiling

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us