Cell outlining algorithms

This section describes the underlying principles of the cell detection algorithms used by MicrobeTracker. The algorithm is chosen by algorithm parameter and is the most essential property determining the quality and speed of cell detection, as well as some details of the output format. There is a very detailed description of the principles of MicrobeTracker operation in the Supplementary Material to the paper describing the Suite. This section focuses on listing the available regimes and options.

The general procedure of MicrobeTracker operation on the first frame of a timelapse or in the independent frames regime consists of these steps:

  1. Image segmentation (using thresholding, edge/valley detection, splitting large regions). See Parameter testing mode for a list of parameters used.

  2. Cell outlining following one of the algorithms listed here.

  3. Mesh creation (placing equally spaced "ribs" perpendicularly to the centerline).

In the timelapse regime the procedure is somewhat different and depends on the detection algorithms listed below.

Algorithm 1

This is the most basic method that does not use any refinement of the outline. However, it encomasses two submethods:

  • Simple outlining - the outline goes through the centers of boderline pixels of the region being outlined. The outline is determined by the segment border, though it can be Fourier-smoothed later by setting fsmooth parameter to a number other than 0 or Inf (Fourier-smoothing can be used with all other regimes as well).

  • Subpixel resolution outlining - the outline is interpolated between pixel values. To use this regime, include interpoutline parameter and set it to 1. This outline generated is in a certain range from the segment border, but the exact location is determined by thresholding a sum of the original image and a "Maxican hat"-filtered image (depends on interpSigma) in order to enhance the boundaries, with the weights of the two determined by interpWeights parameter.

Using this regime, in case of timelapses the procedure is the following:

  1. Segment the image.

  2. Outline the cells.

  3. Find the closest matching outline for each cell, which will be considered the same cell on the next frame.

In algorithm 1 (and similarly algorithms 2 and 3), mesh creation is not an essential step and can be skipped by setting getmesh parameter to 0. This typically leads to achieving a noticeably higher operation speed, since the other operations in algorithm 1 are fast.

Algorithms 2 & 3

These algorithms are based on the Point Distribution Model (PDM). Read the description of the method either in the oridinal paper or (more specifically) in the SI to the paper describing MicrobeTracker.

In practice, algorithm 2 is always preferred over the two. Algorithm 3 uses non-linear transformations in addition to the linear ones and was created to deal with filamentous cells, however it was later replaced with the more efficient for this purpose algorithm 4.

An essential feature of these algorithms is that they use training to a particular cell type. They have been trained for C. crescentus and E. coli cells. These training sets seem to work for a very large number of rod-shaped cells, however they might need to be retrained if the shape is fundamentally different, for example lemon-, pear- or dumbbell-shaped.

Since it is impossible to automatically convert an arbitrary cell outline to a PDM model, the cell outlining procedure in algorithms 2 & 3 consists of two substeps:

  1. Fit the PDM model to the binary region outline.

  2. Fit the PDM model under the action of the image forces.

The operation of MicrobeTracker in these regimes can be visualized in the Parameter testing mode.

If using these algorithms, as well as algorithm 4, the procedure in the timelapse regime is the following:

  1. Start with the outline from the previous frame as the initial guess.

  2. Fit the outline to the new image.

This algorithm depends on a small number of constraint parameters: scaleFactor, trainingFile, Nkeep and rigidity (and also on the image force and fitting parameters, similarly to algorithm 4).

Algorithm 4

This algorithm is based on a manually constrained contour. The constraints and the parameters they depend on are listed below:

The cell outlining procedure when using algorithm 4 is the following:

  1. Use either the mesh from the previous frame of one detected by segmentation followed by mesh creation.

  2. Convert the mesh to model (simply by reshaping the data structure).

  3. Fit the model to the image.

Notice that in the case of algorithm 4, mesh creation is mandatory.