The MicrobeTracker grabs the parameters from the window at the beginning of any operation. Any changes made afterwards will have no effect. Not all of the parameters are used for every operation, the rest are just ignored. Some of the parameters sets are saved as default, but they may need to be modified depending on the particular image set. Usually only a few parameters have to be changed, these parameters are written in bold and their effect described in more detail on the Adjusting Parameters page. Most of the parameters are numeric. The logical parameters (yes/no) are also numeric, with yes=1 and no=0.


algorithm is the most important parameter, which determines how the cells are outlined. For a more description of the difference between algorithms see Cell outlining algorithms section. If you are detecting cells in a timelapse series, the algorithm used must be the same, the program will not be able to continue otherwise. Currently, 4 algorithms are implemented (numbered 1 to 4), though their quality of work and intended use differ.

Algorithm 1 is the most primitive and the fastest algorithm based exclusively on morphological operations, such as thresholding, edge detection, and watershed algorithms. It is the closest to what most previous object or cell detection program offered. This algorithm should be used when nothing is known about the cell shape. However, if it tries to create a mesh (which could be disabled with getmesh parameter), it will not detect a cell if this is impossible for a particular object. This algorithm uses a minimum number of parameters, only such parameters as fsmooth, areaMin, areaMax, fmeshstep, maxmesh, interpoutline (and related), and valley/edge parameters will affect detection.

The algorithms 2-4 use an attraction map, attracting the cell outline contour to particular points on the image, which is opposed by resistance related to internal shape constraints. The nature of these constraints is different for each algorithm and is described below.

Algorithm 2 uses the same procedure as algorithm 1 for initial guess, which is then refined using the Point Distribution Model (PDM). In timelapses, the outline produced for the previous frame is used as the initial guess. This algorithm is faster than the following algorithms and works only for the cells which it is trained for. Currently only the data for "normal" Caulobacter cells is included, but training is relatively simple and can be performed by the user (see subsection Training).

Algorithm 3 is a modification of algorithm 2, though is uses a further modified variant of the PDM to work on elongated cells. It currently requires additional attention to develop the best parameter set and solve some common issues.

Algorithm 4 is based on a version of the Active Contour Model (snake). It is the slowest method and requires setting all parameters manually. It was developed for filamentous cells, but is works well for all cell types. It is recommended for the applications with filamentous cells and non-Caulobacter rod-shaped cells. It will not work well for noticeably non-rod-shaped cells.

List of parameters

The most important parameters that should be changed relatively frequently are indicated in bold. The typical values are shown for wild type Caulobacter crescentus cells imaged in phase contrast regime at 0.064 μm/pixel resolution, unless mentioned otherwise.


  • algorithm ─ the algorithm used, a number from 1 to 4, described above.
  • invertimage (previously called useExtraData) ─ indicates that light cells are used on dark background and the image needs to be inverted (for example, if you are using diffuse GFP instead of phase contrast microscopy). All algorithms. Default: 0 (false).

Algorithm 1 specific

  • getmesh ─ indicate if mesh should be generated. Default: 1 (true).
  • interpoutline ─ produce an interpolated outline instead of a pixilated one in order to achieve subpixel resolution. When using interpolation, typically use with fsmooth=Inf in order to not smooth the outline additionally. Default: 0 (false).
  • interpSigma ─ width of Gaussian smoothing (in pixels) applied in the interpolation procedure. Consider values between 0 and 1-2 pixels.
  • interpWeights ─ relative weights of the original image and edge strength in the interpolation procedure, a vector of two values. Start with 0.5 0.5, then try from 0 1 to 1 0.

Pixel-based operations

  • areaMin ─ minimum area of the region or the cell that is kept, all objects smaller will be discarded. Depends on the resolution, select the smallest cell when detected to estimate.
  • areaMax ─ maximum area of the region or the cell that is kept, all regions larger will be attempted to split, all cells larger will be discarded. The area of the cells depends on the resolution. To estimate this parameter, set this value very large so that no cells are rejected and click on the largest cell.
  • splitregions ─ determines whether the regions can be split using watershed algorithm, default value: 1 (meaning "yes").
  • edgedetection (obsolete) ─ determines whether the edge detection should be used (Laplacian of Gaussian algorithm), default value is 1 (meaning "yes").
  • edgemodeboundary (edge) detection method. Currently a choice of "none" (or 0) - no edge detection, "log" (or 1) - Laplacian of Gaussian (LoG) edge detection algorithm, "valley" (or 2) - 'valley detection' algorithm (zero crossings of the gradient), "logvalley" (or 3) - both.
  • edgeSigmaL (previously called edgeSigma) ─ σ parameter of Gaussian smoothing for the LoG edge detection algorithm.
  • logthresh ─ threshold for the LoG edge detection algorithm. Default: 0. Typical values: ~0.1-0.4 (in the range 0 to 1).
  • edgeSigmaV ─ σ parameter of Gaussian smoothing for the Valley detection algorithm.
  • valleythresh1 (previously called valleythres1) ─ weak threshold for the Valley detection algorithm. Must be smaller than valleythresh2.
  • valleythresh2 (previously called valleythres2) ─ strong threshold for the Valley detection algorithm.
  • crossthresh ─ cross-detection threshold between the LoG and valley algorithms. Default: 0. Typical values: ~0.1-0.4 (in the range 0 to 1).
  • opennum ─ number of pixels to open (erode, then dilate) an image after segmentation to separate some of the cells that remained linked. Typical values from 0 to 3. Default - 0. For all algorithms.
  • thresFactorM ─ image intensity (considering white is 0 and black is 1) threshold factor, used in morphological operations. The value of 1 implies using the automatically detected threshold. Increasing may help for some unevenly illuminated images for which multiple false cells get detected. Typically try increasing the values from 1 to 1.1-1.5. Increasing it too much can be dangerous - if the automatically detected threshold multiplied by this value exceeds the maximum bit depth of the image, the program will exit with an error.
  • threshminlevel ─ an alternative to thresFactorM; this factor tells the program the fraction of the brightest pixels to exclude from threshold calculation. To eliminate the effect of bright dust particles which may appear in the field of view. Default: 0, typical values: 0.05-0.1.
  • erodeNum ─ number of pixels to erode from the cell before detection. Usually the value should be 1, but may be increased if the cells tend to be detected smaller or missing the poles.

PDM model specific (for algorithms 2 and 3)

  • scaleFactor ─ multiplication factor to switch between different cameras or microscopes. Since cell diameter cannot be set directly in the PDM model, this parameter is required to use the same training file with different resolution images. For the included training files (both for C. crescentus and E. coli, the value 1 corresponds to the resolution 0.064 μm/pixel. In other cases the parameter should be set to resolution / 0.064.
  • trainingFile ─ file where the PDM training data is saved.
  • Nkeep ─ number of Principal Components Analysis (PCA) modes to keep in a PDM-based algorithm. The default for C. crescentus is 11, the number should be increased for more complexly shaped cells and decteased for simpler shaped cells.
  • rigidity ─ enhances the degree of keeping constraints. Typical values from 0 to 0.1.

Constraints (for algorithm 4)

  • cellwidth ─ typical width of the cell.
  • wspringconst the ─ "rigidity" of the cell width. This parameter has to be reduced when measurements of the cell width or cell constriction are performed or if the cell width is highly variable (typically from 0.5 to ~0.1).
  • rigidityRange ─ the range of the cell outline rigidity in pixels.
  • rigidity ─ the value of the cell outline rigidity. Reduce (from the default 0.4 for "normal" cells) to pick roughness of the cell, increase for the cells to be smoother (for example on rough background).
  • rigidityRangeB ─ the range of the backbone (centerline) rigidity in pixels.
  • rigidityB ─ the value of the backbone rigidity. Reduce for cells with kinks (default value is 4).
  • horalign ─ parameter responsible for maintaining perpendicular "ribs" during fitting. Only try changing if cell outlines form self-intersections.
  • eqaldist ─ parameter responsible for maintaining equal spacing during fitting. Only try changing is cell outlines form self-intersections.

Image forces (for algorithms 2-4)

  • imageforce ─ factor, multiplying the image attraction force (as opposed to constraints, see section "Algorithm" above).
  • attrCoeff ─ the force attracting the contour to the dark areas outside of the cell. It is useful to fill the cells on low contrast images, but may produce contours being detached from the cell or noticeably larger, or the cells filling extra area after splitting. In the latter cases the value has to be reduced to about 0-0.3. Otherwise keep in the range 0.5 to 1 for algorithm 4. For algorithms 2 and 3 it should be ~10 times lower.
  • repCoeff ─ the force repulsing the contour from light areas inside the cell, for algorithms 2-4. It should not exceed attrCoeff more than 3-4 times and has to be increased if the contours are larger than the cells on some low-contrast images.
  • attrRegion ─ the width of the attraction/repulsion area. Keep the default value (4) in most cases.
  • forceWeights ─ relative weights of different image force components (3 numbers in square brackets) in the order: distance from the edge ─ gradient forces ─ attraction to the intensity close to the threshold.
  • dmapThres ─ threshold for the distance from the edge method of force calculation (the force is a sigmoid function of the distance, characterized by threshold and power parameters).
  • dmapPower ─ power for the distance from the edge method of force calculation.
  • gradSmoothArea ─ the amount of smoothing for the gradient forces method of force calculation.
  • thresFactorF ─ similar to thresFactorM, but used for the contour motion. Keep equal to 1 in most cases, change together with thresFactorM.
  • repCoeff1 ─ similar to repCoeff, but for the fit to the initial guess. Keep 0 in most cases, except for very irregularly shaped cells, in that case increase to ~1. For algorithms 2-3 only.
  • attrCoeff1 ─ similar to attrCoeff, but for the fit to the initial guess. Keep 0 in most cases, except for very irregularly shaped cells, in that case increase to ~1. For algorithms 2-3 only.
  • repArea ─ maximum area of the cell when it still experiences attraction as a fraction of areaMax. Designed to use the attraction only for falsely small cells.
  • attrPower ─ the power in the sigmoid function used in attraction.
  • neighRep ─ the amount of repulsion from previously detected neighbors in timelapses. Should be increases if cells tend to grow into other cells area. If the growth between frames is significant or if there is drift that cannot be eliminated by aligning images, it may prevent the cells from occupying areas previously occupied by the neighbors - the value should be reduced.
  • neighRepA ─ similar to neighRep, but uses a different way of taking neighbors into account, should be 0 in most cases. For algorithm 4 only.

Contour fitting (for algorithms 2-4)

  • fitDisplay ─ whether the images during fitting should be displayed, for debugging purposes only.
  • fitqualitymax ─ minimum allowed quality of fit. Designed to reject not well fitted cells, but no efficient criterion is currently implemented.
  • fitDisplay1 ─ whether the cell should be displayed during the fit for the initial guess. For debugging purposes. For algorithms 2-3 only.
  • fitConvLevel1 ─ one of the two possible conditions to finish fitting to the initial guess if the norm of the force drops below this value, usually not used. For algorithms 2-3 only.
  • fitMaxIter1 ─ another condition to finish, the maximum number of iterations in the initial guess fit. Rarely changed. For algorithms 2-3 only.
  • fitStep1 ─ the norm of the step size when fitting to the initial guess. Rarely changed. For algorithms 2-3.
  • fitConvLevel ─ one of the two possible conditions to finish fitting if the norm of the force drops below this value, usually not used.
  • fitMaxIter ─ one of the conditions to finish the fitting, the maximum number of iterations. Increase if you think the contour has not converged yet; will be slower but more precise.
  • moveall ─ whole cell motion coefficient, linearly spanning between 0 and 1. 0 corresponds to growing non-moving cells detection. 1 - the cell moving as a whole. For timelapses only. It is recommended to set it below 1 even for moving cells for stability (i.e. 0.5-0.9). Setting it above 0 for non-moving cells helps if some drift of pushing by other cells are present. For algorithm 4 only.
  • fitStep ─ the norm of the step size. Decrease if you the contour diverges, only helps if some of the force parameter were increased.
  • fitStepM ─ the norm of the step size of the whole cell motion (in pixels). Typically about 1 is fine, decrease it if the program is losing cells, increase if the outline does not shift sufficiently from frame to frame. For algorithm 4 only.

Mesh creation

  • fmeshstep ─ distance between "ribs" in the mesh in pixels, usually 1.
  • fsmooth ─ number of Fourier modes used to smooth the cell. The default for "normal" cells is 40, this number has to be proportionally increased for filamentous cell (up to ~250 for very long cells). Values 0 or Inf will result in no smoothing.
  • maxmesh ─ maximum size of the mesh. It is mainly designed to reject meshes formed on clusters of cells, junk particles or other large objects, keep the default value (1000) in most cases.
  • roiBorder ─ distance in pixels around the existing mesh or detected region used to crop the corresponding image area. Has to be larger than the cell can grow in one frame, if the cell can be different from its initial guess.
  • noCellBorder ─ distance from the edge of the image the cells are not allowed to be in.
  • splitbndcells ─ this parameter controls if a cell (which could in reality be a cluster of cells) be rejected because of its proximity to the image edge should be splitted to try getting a good cell. For algorithms 2-4. Default 1 (true).
  • maxRegNumber ─ maximum number of regions on a frame. Designed to prevent forming multiple regions in case of wrong threshold detection. For a typical frame should be ~1000, depends on the number of cells and image size. For algorithms 2-4.
  • maxCellNumber ─ maximum number of cells on a frame. Designed to prevent uncontrolled false divisions of some cells in timelapses. For algorithms 2-4.
  • meshStep ─ distance between ribs in the final mesh.
  • meshTolerance ─ Tthe precision of mesh creation.
  • meshWidth ─ typical width of the mesh, used for mesh creation.

Joining and splitting

  • splitThreshold ─ relative threshold determining when the cell has to be split into two. Designed for timelapse series, but can be used for independent images. Usually values 0.25-0.4 work for "normal" C. crescentus cells. Decrease if cells don't split in time, and increase if they split too soon. For algorithms 2-4.
  • joindist ─ maximum distance in pixels between cell poles when the program should try to join them. The other condition is the angle between the backbones. The program will try joining, but will keep the original shapes if it fails. For algorithms 2-4.
  • joinangle ─ maximum angle between cell backbones in radians when the program should try to join them. For algorithms 2-4.
  • joinWhenReuse ─ whether the program should try joining cells when reusing meshes. For algorithms 2-4.
  • split1 ─ whether the program should try splitting cells on the first frame or independent images. For algorithms 2-4.
  • joindilate ─ the amount of dilation (erosion) used when joining cells manually. The default is 1, it may have to be reduced for long self-touching filamentous cells (using algorithm 4) to -1 or -2.
  • forceindframes (only in Manual Operations regime) ─ if this parameter is available and is equal to 1, it forces cell numbering in time-lapse series to follow the rule of Individual Frames mode. New cells aqcuire the smallest available numbers on the frame and the lineage data are not updated.


  • bgrErodeNum ─ the number of pixels to erode the image when detecting and subtracting the background. For the background subtraction routine only.
  • sgnResize ─ resizing when adding the signal to increase the precision. Usually the effect is small at the cost of increasing time. For the signal addition routine only.
  • aligndepth ─ number of frames before each image used during alignment. Default: 1. Increase beyond 1 to correct for small drifts that accumulate into significant values in long time-lapse series. Set this parameter to the typical number of frames required to drift by 2-3 pixels. For the image alignment routine only.