ZEISS Knowledge Base
Help
ZEISS Knowledge Base

Backround substraction vs. Shading correction

This guide clarifies the practical differences between the background subtraction technique compared to the shading correction. The meaning and the effects of both methods on the images are also detailed. Finally, the guide will focus on the background subtraction techniques available on arivis Pro.

There's a great deal of confusion regarding the use of the Shading correction and Background subtraction on images for quantitative fluorescence microscopy.

Shading correction and background subtraction allows you to quantify intensities more accurately and improve image quality for image display. Moreover, they may be very useful for the object's detection tasks.

The Background subtraction is a technique for separating foreground elements from the background. The background definition is simple. Anything that is not object of interest in the image counts as background. This technique improves the precision and the reliability on which the objects can be separated from the rest of the scene, regardless from the images changing. The background subtraction is almost always mandatory for object tracking in the time lapse dataset. There are several techniques for background subtraction. This document will show the options available in arivis Pro.

The Shading correction (also known as Flat-Field correction) is a technique used to improve quality of the image by correcting the uneven illuminations in the image itself. It cancels the effects of image artifacts caused by variations in the pixel-to-pixel sensitivity of the detector and by distortions in the optical path. The Shading effect is usually visible as different intensity areas distributed across the entire image. In some cases, the image might be bright in the center and decrease in brightness as one goes to the edge of the field-of-view. In other cases, the image might be darker on the left side and lighter on the right side. The Shading effect makes the objects detection very complex.

This guide will only focus on the Background subtraction topic.

Shading correction

The image below is a typical example of uneven illumination between the center and the edges of the field-of-view. The same structures will have a different intensity range if located closer to the borders than the center. This makes their segmentation very complex.

The shading effect is much more visible in case of fields stitching. The dark border pattern makes the reconstruction imperfect.

Background subtraction

Arivis Pro offers several background subtraction approaches. All of them are available as operators in the pipeline workflow. The background subtraction results can be saved as new SIS file, new Image-Set or as an additional channel in the active Image-Set for display purposes.

Background subtraction operator anatomy

The background operator allows to set many methods and sources to compute the result.

Each of them can have one or more parameters associated.

The Background subtraction operator temporarily generates the corrected image only with the purpose to detect the objects. Intensity measurements of the detected objects are executed on the original image (before the background subtraction and any other processes).

Backround source

Image

The background source is an image.

  • Method: Automatic
    The background is extracted from the image itself and subtracted from the source. A blur filter (Gaussian) is applied to the source image to generate the background representation.

    Blur diameter: The Gaussian filter will have a kernel size matching the blur diameter.
  • Method: Manual
    The background is an external image. It can be collected directly from the acquisition device or generated by a pipeline (e.g. applying to the source image a Mean/Median filter). The background image must be stored in a separate Image-Set.

Constant

The background source is a constant value.

  • Method Automatic:
    The background is computed using one of the Thresholder algorithms and subtracted from the source.
  • Thresholder: Mean
    Compute the background value as the mean of the plane or time points or full dataset and subtract it from the source image.
  • Thresholder: Histogram based
    Compute the background value applying one of the available algorithms (Auto, Huang, Li, Yen).
  • Mean computed as single value:
    • Over all the planes
    • Over all the Time Points
    • Over the full dataset (both checks on)
  • Method: Manual
    The background value is manually set to a specific value.
  • Maintain original color range

    The output of this operation might shift the intensity range and might thus be unrelated to the color range. This parameter selects whether or not this operation adapts the color range to meet the output.
  • Correction:

    Preserve Bright: This method will only preserve parts of the image that have higher intensity values than the background (e.g. bright parts in a grayscale image). After this method is finished, the background intensity will be zero and the remaining foreground pixels will have a higher intensity value.
    Preserve Dark: This method will only preserve parts of the image that have smaller intensity values than the background (e.g. dark parts in a grayscale image). This method will invert the intensity of the image, so that foreground pixels will again have a higher intensity value. After this method is finished, the background intensity will be zero and the remaining foreground pixels will have a higher intensity.
    Preserve Both: This method tries to preserve both brighter and darker parts of the image. Therefore, an average background intensity value will be calculated over all time points first. After this method is finished, the background intensity will be shifted to this calculated value. Formerly darker parts will still be darker than the background and formerly brighter parts will be brighter than the background.

Background comparison

The background is not homogeneous. There is an intensity gradient from top to the bottom of the image

The background subtraction has partially maintained almost all the structures of interest.

The method is fine for this kind of image.

The background subtraction has partially removed the structures of interest.

The method is too strong for this kind of image.

The background subtraction has removed the structures of interest.

The method is too strong for this kind of image.

Morphological Background subtraction operator anatomy

Arivis Pro also includes background subtraction algorithms based on morphological operators. All of them are available as operators in the pipeline workflow. As mentioned in the previous chapter, the background subtraction results can be saved as a new SIS file, new Image-Set or as an additional channel in the active Image-Set for display purposes.

One of the main applications of the Methods Preserve bright/dark objects is to remove objects from an image using a structuring element that does not match the ones to be removed. The different operations produce an image in where only the removed components are present. This image is subtracted from the source one. The top-hat transformation is used for lighter objects on a dark background (white top-hat), while the bottom-hat is used for the contrary (black top-hat). The top-hat transformation effectively corrects the effects of uneven lighting (shading correction). This operation is essential when you want to carry out the segmentation.

The Morphology Filter allows to apply the White or Black Top-Hat Algorithm.

Method:

Select between the Preserve bright objects (White Top-Hat) and the Preserve dark objects (Black Top- Hat) method.

A radius value is required to define the minimum size of the objects that will be preserved by the Background subtraction.

Morphological Background subtraction options

The morphology filter Shape should be selected according to the size of the structures (small structures = Box, big structures = Sphere)

The Perform Plane Wise option must be selected.

Top Hat background correction (radius 25 um)
Top Hat background correction (radius 25 um)

Objects segmentation after morphological Background subtraction

Impressum
Carl-Zeiss-Strasse 22
73447 Oberkochen
Germany
Legal