Image Analyst MKIIWorkflow
HomeWorkflowImage Processing PrinciplesFunctions GlossaryPipelines GlossaryProtocolsQuick How ToSearch

Segmentation of images

Segmentation identifies individual objects in the image. In the segmented image objects are contiguous areas marked with unique integer numbers (markers). Image Analyst MKII can segment binarized images, grayscale images, grayscale images with uneven background using local thresholding and grayscale images by extending previously calculated seeds.

Built in pipelines use various combinations of the Advanced Segmentation functions detailed below e.g.:

Hint: To see worked examples of preparation of images for segmentation and multi-step segmentations with classifiers, activate these pipelines and look the pipeline structure by pressing the Pipeline Window Pipeline Window main toolbar window.

To segment an image (series) in Image Analyst MKII

  • First binarize images with the FThreshold function, then use the FSimple Segmentation function (both are accessed from the main menu/Segmentation)
  • Or use the FAdvanced Segmentation to segment grayscale images with the Watershed algorithm. Advanced  segmentation is a combination of locally adaptive thresholding and Watershed segmentation.
  • To calculate segments originating from specific seeds, e.g. to find boundaries of cells originating from nuclei, use the FAdvanced Segmentation Separate Seed function. The seed can be another grayscale image, or a previously segmented image.

Using Simple Segmentation

  1. Prepare image for thresholding
  2. Binarize image with the Segmentation/ FThreshold function
  3. Set segmentation classifiers (see below)
  4. Segment image with  the Segmentation/FSimple Segmentation
    • Textual output: to see morphological parameters of the objects set it Yes. If segmenting for further processing No prevents opening of the data window. If Excel Data Window is open, results will appear there.

Using Advanced Segmentation

  1. Prepare image for segmentation (do not binarize)
  2. Set segmentation classifiers (see below)
  3. Segment image with  the Segmentation/FAdvanced Segmentation
    Parameters of this function closely follow the parametering of the FThreshold function in its locally adaptive mode.
    1. Way: Above or Below for detection of brighter or dimmer details than their surroundings, respectively. The parametering is described for brighter details below:
    2. The Threshold value calculation method is:
      • Pixel Value: local maxima brighter than their surroundings by this value will be detected
      • Percentile by frames:  local maxima brighter than their surroundings by the level calculated as the given percentile of the intensity histogram of each image will be detected
      • Percentile by series:  local maxima brighter than their surroundings by the level calculated as the given percentile of the intensity histogram of the image series will be detected
      • Otsu by frames: local maxima brighter than their surroundings by the level calculated as the Otsu optimal threshold of each image will be detected
      • Otsu by series: local maxima brighter than their surroundings by the level calculated as the Otsu optimal threshold of the image series will be detected
    3. The Threshold from local max/min is:
      • None: no threshold will be applied, the segments will completely fill the image
      • Bound uniformly: the boundary of objects is defined by that they are brighter than their surroundings by the above calculated threshold value. Practically the threshold value is applied downwards from the local maximum. The Determine boundaries at is normally set to zero. This value is added the threshold value when determining the boundaries of an object, so increase this value to get thicker objects.
      • Bound locally:  the boundary of the object will be determined at the percent of its maximal intensity, given in the Determine boundaries at parameter.
    4. Method:
      • Mark Seed: pixels corresponding to local maxima are shown
      • Mark Shape: segments to contiguous objects without applying Watershed algorithm
      • Watershed: splits contiguous objects using local maxima as sources in the Watershed algorithm
    5. Connectivity: defines contiguity
    6. Separate segments: if Yes, touching segments are separated by a single pixel line of zero pixels.
    7. Evaluate Segment data and Textual output: to see morphological parameters of the objects set it Yes. If segmenting for further processing No prevents opening of the data window. If Excel Data Window is open, results will appear there.

Using Advanced Segmentation with a separate seed image

  1. Segment seed image as given for "Using Advanced Segmentation" above. Note, that for using nuclei as seeds it is useful to filter images before segmentation with the Filters/FDetect Nuclei Convolution to prevent splitting nuclei into multiple segments.
  2. Segment the image (Image A) where the seeds will be extended using the Segmentation/FAdvanced Segmentation Separate Seed, setting the above generated seed image as "Image B"
    • The Threshold value calculation method is:
      • Mean of Marks: The mean intensity measured in Image A in pixels corresponding to the seed of the segment from Image B is used for calculating the boundaries of the segment according to the "Threshold from local max/min" parameter - see above at "Using Advanced Segmentation".
      • Min of Marks: same as above, but with the minimum of intensities in Image A pixels corresponding to the seed.
      • Max of Marks: same as above, but with the maximum of intensities in Image A pixels corresponding to the seed.

Morphological parameters measured by the Segmentation functions:

Note that segmentation acts independently in each frame of the time-lapse recording, thus in 2D. Some of the parameters below have been designed for future compatibility with 3D segmentation.

  • x,y : position of the center of the segment
  • frame : time point or z position of the center of the segment
  • length : length of the segment in the third dimension (z or t) – note that segmentation is currently 2D only, so this is 1
  • V: volume as total number of pixels of the object (sum of surfaces if present in multiple planes). For single frame objects A=V=S (note that this is always the case as segmentation is currently 2D only)
  • A: surface as total number of pixels of the object in the plane (maximum if present in multiple planes; =A=V for 2D)
  • P: perimeter as number of pixels along the perimeter of the object (maximum if present in multiple planes)
  • d: diameter(maximum if present in multiple planes); the diameter is the diagonal of the bounding rectangle.
  • S: surface (sum of perimeters and bounding surfaces if present in multiple planes)
  • ShF: shape factor or circularity (mean if present in multiple planes) = 4*Pi*A/P^2 - note that this value may be larger than 1 for small objects because P is the number of pixels along the perimeter and not the real perimeter.
  • ShF3D: spherical shape factor = 36*Pi*V^2/S^3
  • Brnch: number branch points (meaningful only for previously skeletonized objects)
  • Fiber length: an approximation of length of elongated objects based on surface area and perimeter = (P+Sqrt(P^2-16*A))/4.
  • Fiber breadth: an approximation of width of elongated objects based on surface area and perimeter = (P-Sqrt(P^2-16*A))/4.

Using Segmentation Classifiers

Object can be discarded from the segmentation using segmentation classifiers. Objects that do not pass the classifiers are deleted from the image (are filled up with zeros). Segments can be classified based on their shape parameters or based on intensities measured in other channels:

  • Before segmentation use the Segmentation /FSet Segmentation Classifiers function running it twice; once with Max and once with Min
    1. Limit Type: Max : objects which have a any parameter that is greater than the corresponding set value are discarded. Zero values are not checked.
    2. Limit Type: Min : objects which have a any parameter that is smaller than the corresponding set value are discarded. Zero values are not checked.
  • Segments can be also classified based on intensities measured in corresponding pixels of other channels using the Segmentation /FSet Segmentation Intensity Classifiers function. Run the function with Max or with Min limit type, and set from which channel (Image Window) to get classifying intensity values as Image B
    1. Limit Type: Max : objects which have a any parameter that is greater than the corresponding set value are discarded. Zero values are not checked.
    2. Limit Type: Min : objects which have a any parameter that is smaller than the corresponding set value are discarded. Zero values are not checked.

Working with segmented images

  • To measure number of objects or size and shape parameters of each object or statistically (use the textual output of segmentation functions, or read lists of values from Mathematica)
  • To measure intensities of other images over the pixels corresponding to the objects obtained by segmentation
  • To count colocalization of different markers with the objects
  • To binarize images in a controlled manner, allowing/rejecting objects based on size or morphological criteria
    • Use the FThreshold with Pixel value=1, Above, None settings to re-binarize segmented image.
  • To find instances of the same object in consecutive frames use tracking:

Limitations

The segmentation algorithm is not limited to maximum 65534 segments any more.
To increase speed, real diameters of objects are not calculated, the diagonal of the bounding rectangle is used instead.
The perimeter is given in numbers of pixels along the perimeter, that can be less than the actual distance around the perimeter, and this makes shape factors the have values above 1 for small circular objects.
The segmentation is 2D currently, thus each frame is independently segmented.

Updated: 11/24/2015