A BaSiC tool for background and shading correction of optical microscopy images

Tingying Peng, Kurt Thorn, Timm Schroeder, Lichao Wang, Fabian J. Theis, Carsten Marr, Nassir NavabNature Communications 2017 · OpenReview

Abstract

Quantitative analysis of bioimaging data is often skewed by both shading in space and background variation in time. We introduce BaSiC, an image correction method based on low-rank and sparse decomposition which solves both issues. In comparison to existing shading correction tools, BaSiC achieves high-accuracy with significantly fewer input images, works for diverse imaging conditions and is robust against artefacts. Moreover, it can correct temporal drift in time-lapse microscopy data and thus improve continuous single-cell quantification. BaSiC requires no manual parameter setting and is available as a Fiji/ImageJ plugin.

Introduction

Quantitative bioimaging relies on the fundamental assumption that pixel intensity directly correlates with biological signals. However, two primary phenomena frequently distort this relationship: spatial shading (vignetting), where images appear darker at the edges due to optical paths, and temporal drift, where background brightness fluctuates over time due to photobleaching or light source instability.

Existing retrospective correction tools often struggle with these issues, typically requiring hundreds of images for stability, demanding tedious manual parameter tuning, or failing entirely when images contain artifacts like dust or bright fluorescent debris. BaSiC (Background and Shading Correction) addresses these challenges through a unified mathematical framework that is both efficient and robust.

The BaSiC Method

BaSiC models image formation by considering both a multiplicative flat-field $S(x)$ (shading) and an additive dark-field $D(x)$ (camera offset): $$I_{meas}(x) = I_{true}(x) \times S(x) + D(x)$$

The core innovation lies in treating correction as a low-rank and sparse decomposition problem. Shading patterns are consistent across an image sequence, making them "low-rank," while biological features (cells, structures) change between frames and are treated as "sparse" residuals.

Overview of the BaSiC workflow, showing the decomposition of measurement matrices into low-rank and residual components to correct whole slide images (WSI) and time-lapse data.

By employing a reweighted L1-norm optimization, BaSiC separates these components without requiring manual parameter settings. Furthermore, it can estimate a per-image baseline ($B_i$) to correct for temporal changes in background intensity, ensuring consistent quantification across long time-lapse movies.

Performance and Robustness

The authors validated BaSiC across diverse datasets, including synthetic images, benchmark collections (CIDRE), and large-scale whole slide images (WSIs). A key advantage is efficiency: while previous methods required approximately 100 images to stabilize, BaSiC achieves high accuracy with as few as 5 to 10 images. This makes it suitable for researchers working with small datasets or rare samples.

BaSiC is also uniquely robust to "spikes" or artifacts. Because the algorithm treats outliers as part of the sparse residual, bright artifacts like dust or stray light do not distort the estimated shading pattern.

BaSiC demonstrates robustness to common artifacts in cell culture, such as bright debris, which are effectively separated from the estimated shading and dark-field components.

In practical applications like WSI, BaSiC reduced the standard deviation of mean cell intensities across tiles to roughly 20% of the uncorrected value, enabling seamless stitching of mosaic images. In time-lapse studies of hematopoietic stem cells, the tool was essential for revealing subtle biological signals, such as the upregulation of the transcription factor PU.1, which were otherwise masked by photobleaching.

Limitations and Future Work

The primary limitation of BaSiC is its reliance on the assumption that the foreground (biological signal) is uncorrelated across the image sequence. If a sample is static—for instance, a single cell remaining in the exact center of the frame throughout a movie—BaSiC may incorrectly identify the cell as part of the constant shading pattern. Additionally, while robust to high cell densities, the method may struggle if the foreground covers more than 50% of every frame in a sequence. Future iterations could involve tuning regularization parameters further to handle such highly correlated images.

Conclusion

BaSiC provides a fast, automated, and robust solution for image correction in optical microscopy. Available as a Fiji/ImageJ plugin, it allows researchers to process hundreds of images in minutes, ensuring that quantitative analysis reflects biological reality rather than optical artifacts.

Summary updated

Abstract

Quantitative analysis of bioimaging data is often skewed by both shading in space and background variation in time. We introduce BaSiC, an image correction method based on low-rank and sparse decomposition which solves both issues. In comparison to existing shading correction tools, BaSiC achieves high-accuracy with significantly fewer input images, works for diverse imaging conditions and is robust against artefacts. Moreover, it can correct temporal drift in time-lapse microscopy data and thus improve continuous single-cell quantification. BaSiC requires no manual parameter setting and is available as a Fiji/ImageJ plugin. Accurate quantification of bioimaging data is often confounded by uneven illumination (shading) in space and background variation in time. Here the authors present BaSiC, a Fiji plugin solving both issues. It requires fewer input images and is more robust to artefacts than existing shading correction tools.
BibTeX
@inproceedings{peng2017basic,
  author = {Tingying Peng and Kurt Thorn and Timm Schroeder and Lichao Wang and Fabian J. Theis and Carsten Marr and Nassir Navab},
  title = {{A BaSiC tool for background and shading correction of optical microscopy images}},
  booktitle = {Nature Communications},
  year = {2017},
  url = {https://openreview.net/forum?id=aC5HgmOFuK},
}
Figure