# Tips and Tricks to set parameters

## Setting the parameters​

They are several tricks that can be used to increase tracking accuracy and select the optimal parameters.

### Detection​

The detection parameters reject objects that are smaller or bigger than a specific size. To increase the tracking accuracy, we want to reject noise and artifacts and reject blobs constitute of more of one object. If all the objects are of similar size, these two parameters can be selected easily in four steps:

• Select an image where two objects are in contact forming a single blob.
• Select the Maximal Size parameter just at the limit to reject this blob.
• Select the Maximal Size parameter just at the limit to detect the movie's smaller object.
• Fine tune these parameters to account for size variability across the movie.

### Tracking​

Tracking parameters are mostly found by trials and errors. However, some rules of thumbs can be applied.

Spot to track has to be set to Body for quasi-symmetric objects and low-resolution objects. For deformable objects with enough resolution, select Head or Tail according to the part that predicts best the object's traveling direction.

## Parameters file​

For each tracking analysis, FastTrack will save the parameters used in cfg.toml that can be reloaded in the software or in fasttrack_cli. Before FastTrack version 5.2.1, the software used to saved the parameters in parameter.param, these files can be converted as following (left: old file, right: new file):

                                      title = "FastTrack cfg""                                      [parameters]Light background = 0                  lightBack = 0Maximal size = 170                    maxArea = 170Maximal occlusion = 200               maxDist = 200Maximal time = 100                    maxTime = 100Background method = 1                 methBack = 1Minimal size = 50                     minArea = 50Morphological operation = 8           morph = 8Kernel type = 2                       morphSize = 2Kernel size = 0                       morphType = 0Number of images background = 20      nBack = 20Maximal angle = 90                    normAngle = 90Binary threshold = 60                 normArea = 0Normalization area = 0                normDist = 100Maximal length = 100                  normPerim = 0Normalization perimeter = 0           reg = 0Registration = 0                      regBack = 0Background registration method = 0    spot = 0Spot to track = 0                     thresh = 60ROI bottom x = 0                      xBottom = 0ROI top x = 0                         xTop = 0ROI bottom y = 0                      yBottom = 0ROI top y = 0                         yTop = 0