Choosing Parameters

From FarsightWiki
Jump to: navigation, search

Users need to choose several parameters related to the computation of binary images. The quality of the binary images is very important for the tracking system.

  • Threshold for binarization: Since the intensity of most worm images with clean background could be modeled as a mixture of N=2 Gaussian mixtures, when directly using the thresholding and hole filling filter for preprocessing, the threshold should be selected as the value separating the two Gaussian distributions, as shown in Figure 5. Intensities smaller than this threshold will be set to 1; the rest will be set to 0. When using background image for subtraction, intensities larger than the selected threshold will be set to 1, which is the opposite of the behavior from direct use of the thresholding and hole filling filter. The threshold value also can be chosen based on the histogram.
Figure 1: Use of an image histogram for selecting the threshold value
  • Minimum and maximum object area size: These are used to clean the background objects left after binarization. The user should try several values until desirable binary images are obtained.
  • Background subtraction: For images with cluttered backgrounds, this should be set to 1 (true). A background image would be computed first; for images with clean backgrounds, this can be set to 0 (false). The thresholding and hole filling filter will then be used directly.


The following are examples showing tracker initialization results obtained from the chosen parameters. For an image with a clean background like Example 1, we can directly use thresholding and hole filling. For an image with a cluttered background like Example 2, however, we should compute the background image first. For a more complex background like Example 3, even by background subtraction we still cannot obtain a good binary image. In this case it would be more helpful to adjust the minimum and maximum object size. However, this requires careful selection of the two size parameters, and some small worms with similar size as clutter in the background will be missed in the initialization. This problem could be solved by the Editing Module, in which user could manually add these missed worms. But to avoid manual operation, we are currently developing more advanced background modeling and subtraction method to handle complex background.

Figure 2: Example 1. Parameters [GrayThreshold:85] [AreaThreshold1:400] [AreaThreshold2:4000] [BGsub:0]
Figure 3: Example 2. Parameters [GrayThreshold:15] [AreaThreshold1:200] [AreaThreshold2:1500] [BGsub:1]
Figure 4: Example 3. Parameters [GrayThreshold:40] [AreaThreshold1:1500] [AreaThreshold2:4000] [BGsub:1]