Intensity discretization is the process of converting the continuous gray-level values within a medical image into a finite number of discrete integer bins. This quantization step is mandatory for calculating second- and higher-order texture features, such as those derived from the Gray-Level Co-occurrence Matrix (GLCM) and Gray-Level Run Length Matrix (GLRLM), which require a limited, countable set of intensity values to construct their mathematical arrays.
Glossary
Intensity Discretization

What is Intensity Discretization?
Intensity discretization is the foundational pre-processing step that converts continuous medical image intensity values into a finite set of discrete bins, enabling the calculation of texture matrices.
The primary challenge lies in balancing noise suppression against biological information preservation. A small number of bins reduces image noise but can erase subtle tissue heterogeneities, while a large number preserves detail but yields sparse, non-informative texture matrices. The Image Biomarker Standardisation Initiative (IBSI) recommends fixed bin number or fixed bin width approaches to standardize this process across different scanners and protocols.
Key Characteristics of Intensity Discretization
Intensity discretization is the critical bridge between continuous voxel values and the discrete matrices used for texture analysis. The choice of bin number and method directly controls the statistical power, noise sensitivity, and reproducibility of every downstream radiomic feature.
Fixed Bin Number (FBN)
Divides the intensity range of each individual Volume of Interest (VOI) into a constant number of bins, regardless of the absolute intensity values.
- Mechanism: The bin width adapts to the VOI's specific min-max range.
- Advantage: Ensures consistent matrix size across patients, which is critical for GLCM and GLRLM calculations.
- Disadvantage: Highly sensitive to outliers; a single bright pixel can compress the dynamic range of the rest of the tissue.
- Use Case: Preferred when comparing relative tissue heterogeneity within a single scan series.
Fixed Bin Width (FBW)
Uses a constant, pre-defined intensity interval to create bins across the entire dataset or image.
- Mechanism: The bin width is absolute (e.g., 25 Hounsfield Units for CT). The number of bins varies per VOI based on its intensity range.
- Advantage: Preserves the physical meaning of intensity differences, making it essential for cross-scanner comparisons and ComBat harmonization.
- Disadvantage: VOIs with narrow intensity ranges may produce sparse, non-informative matrices.
- Standardization: The IBSI guidelines strongly recommend FBW for multi-center studies to maintain biological interpretability.
Lloyd-Max Quantization
An iterative, data-driven algorithm that minimizes the mean squared error between original and discretized intensities.
- Mechanism: Dynamically adjusts bin boundaries to concentrate bins in high-density regions of the intensity histogram and widen them in sparse tails.
- Advantage: Maximizes information retention for a given number of bins, outperforming uniform methods in preserving first-order statistics.
- Disadvantage: Computationally more expensive and can produce non-intuitive bin boundaries that complicate biological interpretation.
- Relevance: Useful when the primary goal is signal compression for deep radiomics rather than explicit texture matrix calculation.
Equal Probability Binning
Assigns bin edges such that each bin contains approximately the same number of voxels from the VOI's intensity histogram.
- Mechanism: Uses quantile-based thresholds rather than uniform intensity intervals.
- Advantage: Guarantees that every bin is well-populated, eliminating the problem of empty or sparse bins that destabilize entropy and homogeneity calculations.
- Disadvantage: Destroys the linear relationship between intensity values, making it impossible to compare absolute tissue density across patients.
- Trade-off: Maximizes local texture contrast at the expense of global intensity calibration.
Impact on Texture Matrix Robustness
Discretization parameters are the single largest source of non-biological variance in radiomic pipelines.
- GLCM Sensitivity: Too few bins (<16) collapse distinct tissue patterns into identical gray-levels, erasing subtle heterogeneity signals.
- GLRLM Sensitivity: Too many bins (>256) fragment continuous runs of similar intensity, artificially reducing run length metrics.
- Reproducibility Crisis: Studies show that changing the bin count from 32 to 64 can alter feature values by over 40%, exceeding the effect size of the biological phenomenon being measured.
- Best Practice: Always report discretization parameters in compliance with the IBSI reporting guidelines to enable independent validation.
Discretization and Image Pre-Processing Order
The sequence of pre-processing steps critically alters discretization outcomes.
- Correct Order: Apply Hounsfield Unit rescaling → voxel resampling to isotropic dimensions → intensity discretization.
- Rationale: Interpolation during resampling creates new, non-integer intensity values. Discretizing after resampling ensures these interpolated values are correctly binned.
- Filter Interaction: When using Wavelet or LoG filters, discretization must be applied to the filtered image, not the original, as the intensity distribution has been fundamentally transformed.
- Pitfall: Discretizing before resampling introduces partial-volume artifacts that propagate through all downstream shape features and texture matrices.
Frequently Asked Questions
Explore the foundational pre-processing step that converts continuous medical image intensities into discrete bins, enabling robust texture matrix calculation and reproducible radiomic analysis.
Intensity discretization is the process of converting the continuous range of voxel intensity values within a medical image into a finite number of discrete bins or gray levels. This step is essential because texture matrices like the Gray-Level Co-occurrence Matrix (GLCM) and Gray-Level Run Length Matrix (GLRLM) require a finite, integer-based alphabet to count spatial relationships. Without discretization, the number of possible intensity values would be too large, resulting in sparse, non-informative matrices that fail to capture meaningful textural patterns. By reducing the dynamic range, discretization directly controls the dimensionality and statistical robustness of the extracted features, making it a critical determinant of feature reproducibility and biological relevance.
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
Understanding intensity discretization requires familiarity with the texture matrices it enables and the standardization frameworks that govern its application.
Gray-Level Run Length Matrix (GLRLM)
A texture matrix that counts the number of consecutive pixels with the same gray-level value in a specific direction to capture structural coarseness. Discretization bin width directly influences run length counts; coarse binning merges distinct intensities, artificially elongating runs and altering Short Run Emphasis and Long Run Emphasis metrics.
- Quantifies structural anisotropy
- Computed across 13 directions in 3D
- Highly sensitive to intensity quantization
Gray-Level Size Zone Matrix (GLSZM)
A texture matrix that quantifies the size of connected regions of identical gray-level values, independent of directional orientation. Discretization critically affects zone size distributions; finer binning fragments homogeneous regions into smaller zones, while coarser binning merges distinct tissue compartments, potentially obscuring intra-tumor heterogeneity.
- Rotationally invariant by design
- Captures tumor granularity and necrosis patterns
- Used extensively in oncology radiomics
Feature Harmonization
The computational process of removing unwanted technical variability from radiomic features caused by differences in scanner models, acquisition protocols, or reconstruction kernels. Discretization parameters interact with harmonization techniques like ComBat; inconsistent binning across sites can introduce batch effects that harmonization algorithms cannot fully correct.
- Requires phantom-based calibration
- ComBat adapts genomic batch correction to imaging
- Discretization must be standardized pre-harmonization

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