Image Quality Control (QC) is an automated computational pipeline that systematically detects and excludes non-diagnostic artifacts—such as tissue folds, pen marks, air bubbles, and out-of-focus regions—from whole-slide images (WSIs) before downstream analysis. This critical pre-processing step ensures that only viable tissue regions are passed to diagnostic or prognostic deep learning models, preventing corrupted data from skewing quantitative biomarker extraction.
Glossary
Image Quality Control

What is Image Quality Control?
An automated pre-processing pipeline that detects artifacts like tissue folds, pen marks, air bubbles, and out-of-focus regions to exclude non-diagnostic image content before analysis.
Modern QC systems employ convolutional neural networks and vision transformers trained to classify image patches as either diagnostically valid or artifact-containing. By operating as a gatekeeper at the beginning of a computational pathology workflow, robust QC directly improves the reliability of subsequent tasks like tumor-infiltrating lymphocyte quantification, Ki-67 index calculation, and HER2 scoring, reducing false negatives caused by obscured tissue regions.
Key Characteristics of Image Quality Control
Automated quality control pipelines systematically detect and exclude non-diagnostic image content before analysis, ensuring only viable tissue regions are passed to downstream AI models.
Tissue Fold Detection
Identifies regions where tissue sections have folded over during slide preparation, creating dense, hyperchromatic areas that obscure cellular morphology. Convolutional neural networks analyze texture patterns and sharp intensity transitions characteristic of folds.
- Detects sharp gradient transitions at fold boundaries
- Differentiates folds from genuine dense cellular regions
- Excludes folded areas from downstream analysis masks
Pen Mark Artifact Removal
Locates and masks surgical inking and pathologist annotations that appear as high-intensity, saturated regions on digitized slides. These foreign ink deposits can be misinterpreted as positive staining in IHC analysis.
- Color deconvolution separates ink from biological stains
- Spectral analysis distinguishes pen pigments from tissue chromogens
- Prevents false-positive biomarker quantification
Air Bubble Segmentation
Detects circular, out-of-focus artifacts caused by trapped air during coverslipping. Morphological operations combined with focus quality metrics identify these regions that lack tissue information entirely.
- Circularity and edge characteristics distinguish bubbles from luminal spaces
- Excluded from tissue area calculations to prevent dilution bias
- Critical for accurate tumor-stroma ratio computation
Focus Quality Assessment
Quantifies image sharpness across the slide to flag out-of-focus regions where diagnostic interpretation is unreliable. Laplacian variance and frequency-domain analysis measure local blur severity.
- Patch-level focus scores generate a quality heatmap
- Threshold-based rejection of regions below diagnostic sharpness
- Prevents AI models from learning from degraded visual features
Tissue Detection and Masking
Segments actual tissue regions from the glass background to constrain all subsequent analysis to biologically relevant areas. Otsu thresholding in HSV color space robustly separates tissue from empty slide background.
- Reduces computational load by ignoring background pixels
- Prevents background noise from contaminating feature extraction
- Essential first step in any WSI processing pipeline
Blurry Region Exclusion
Systematically identifies and excludes image patches that fail to meet minimum sharpness thresholds due to z-stack acquisition errors or tissue thickness variation. Ensures only diagnostically interpretable content reaches pathologists and AI models.
- Brenner gradient and Tenengrad algorithms quantify local focus
- Adaptive thresholding accounts for tissue-dependent focus expectations
- Integrated into real-time WSI scanning quality feedback loops
Frequently Asked Questions
Answers to common questions about automated artifact detection and pre-processing pipelines that ensure only diagnostic-quality tissue regions are passed to downstream analysis algorithms.
Image quality control (QC) is an automated pre-processing pipeline that detects and excludes non-diagnostic content from whole-slide images (WSIs) before computational analysis. The system scans gigapixel tissue images to identify artifacts such as tissue folds, air bubbles, pen marks, blur, and out-of-focus regions. By segmenting the slide into diagnostically valid and invalid regions, the QC module prevents corrupted data from contaminating downstream tasks like tumor detection, Ki-67 Index quantification, or Tumor-Infiltrating Lymphocyte (TIL) scoring. Modern implementations use convolutional neural networks trained on artifact-annotated datasets to classify patches at multiple magnifications, generating a binary tissue-validity mask that gates all subsequent analysis. This step is critical because a single blurred region in a Whole-Slide Image can produce false-negative predictions in cancer detection models, undermining diagnostic accuracy.
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
Explore the interconnected concepts, metrics, and downstream processes that define the role of automated quality control in computational pathology pipelines.
Artifact Detection Taxonomy
A systematic classification of non-diagnostic image content that must be excluded before analysis:
- Tissue folds: Overlapping sections causing dense, hyperchromatic linear regions
- Pen marks: Surgical inking delineating margins, appearing as dense blue/black regions
- Air bubbles: Circular, translucent voids introduced during coverslipping
- Blur/out-of-focus: Regions lacking high-frequency edge information due to z-stack misalignment
- Dust/debris: Particulate matter on the slide or scanner optics
- Uneven illumination: Vignetting or shading artifacts from the scanner light path
Modern artifact detection employs convolutional neural networks trained on pixel-level annotations to generate binary exclusion masks.
Tissue Detection & Foreground Segmentation
The initial step in quality control that separates tissue regions from the glass background. This process:
- Applies Otsu thresholding on the saturation channel of HSV color space
- Generates a binary mask identifying foreground pixels
- Removes white-space background to reduce computational load
- Enables patch-based sampling only from diagnostically relevant areas
Advanced methods use U-Net architectures for robust segmentation across varied staining protocols. The resulting tissue mask gates all downstream analysis, ensuring models process only biological material.
Focus Quality Assessment
A computational metric that quantifies image sharpness to reject blurred regions. Key algorithms include:
- Laplacian variance: Measures the spread of second-derivative pixel intensities; low variance indicates blur
- Brenner gradient: Computes squared differences between pixels separated by a fixed offset
- Tenengrad function: Aggregates gradient magnitudes above a Sobel threshold
- Frequency domain analysis: Evaluates power spectral density decay rates
A focus score is calculated per tile; regions falling below an empirically determined threshold are excluded. This is critical for nuclear segmentation tasks where precise membrane boundaries are essential.
Stain Normalization
A pre-processing technique that standardizes color appearance across slides to mitigate inter-laboratory variability. Methods include:
- Reinhard normalization: Matches mean and standard deviation in LAB color space to a reference image
- Macenko method: Decomposes RGB into stain-specific optical density vectors using singular value decomposition
- Structure-preserving color normalization (SPCN): Leverages sparse non-negative matrix factorization
- CycleGAN-based approaches: Learn unpaired image-to-image translation for stain transfer
Normalization is essential before quality control to ensure artifact detectors generalize across staining protocols and scanner types.
Patch-Level Quality Scoring
A granular approach where each extracted tile receives a composite quality score aggregating multiple criteria:
- Tissue percentage: Ratio of foreground to background pixels
- Artifact overlap: Intersection-over-union with artifact masks
- Focus metric: Normalized sharpness value
- Stain intensity: Deviation from expected hematoxylin/eosin optical density ranges
Tiles are ranked and filtered using configurable thresholds. This quality-aware sampling ensures that only diagnostically viable patches enter the Multiple Instance Learning (MIL) pipeline, directly impacting model performance.
Whole-Slide Image (WSI) Quality Metrics
Slide-level aggregate statistics reported to laboratory information systems for continuous quality improvement:
- Artifact burden: Percentage of total tissue area affected by artifacts
- Coverage ratio: Proportion of the slide containing tissue vs. blank glass
- Focus uniformity: Coefficient of variation of focus scores across the slide
- Stain quality index: Deviation from reference hematoxylin/eosin color distributions
These metrics enable real-time feedback to histology technicians, flagging slides requiring re-scanning or re-staining before pathologist review. Integration with LIS/LIMS systems automates quality assurance workflows.

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