Choosing Parameters

From FarsightWiki
(Difference between revisions)
Jump to: navigation, search
(Fixed various typos, grammar errors)
Line 1: Line 1:
Users need to choose several parameters related to the computation of binary images. The quality of binary image is very important for the tracking system.
+
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: When using direct thresholding and hole filling filter for preprocessing, since the intensity of most worm images with clean background could be modeled as a mixture of N=2 Gaussian Mixtures, the threshold could 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 different from using direct thresholding and hole filling. The threshold value also can be chosen based on the histogram.
+
* 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.
[[Image:Binarization1.png|thumb|center|650px| Figure.1 Use histogram of the image for selecting threshold value]]
+
[[Image:Binarization1.png|thumb|center|650px| Figure.1 Use of an image histogram for selecting the threshold value]]
* Minimum and Maximum object area size: They are used to clean the background objects left after binarization. User should try several values until reach the desirable binary images.
+
* 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 background, it should be set to 1 (true). A background image would be computed first; for images with clean background, it can be set to 0 (false). Direct threholding and hole filling will be used.
+
* 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.
  
  
Followings are examples showing the resutls reached by the chosen parameters. For image with clean background like Example 1, we can directly use thresholding and hole filling. While for image with cluttered background like Example 2, we could compute the background image first. For more complex background like Example 3, even by background subtraction we still cannot reach good binary image. In this case it would be more helpful to adjust the minimum and maximum object size.
+
The following are examples showing the results obtained from using 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.
  
 
[[Image:Parameters2.png|thumb|center|800px| Figure.2 Example 1. Parameters [GrayThreshold:85] [AreaThreshold1:400] [AreaThreshold2:4000] [BGsub:0] ]]
 
[[Image:Parameters2.png|thumb|center|800px| Figure.2 Example 1. Parameters [GrayThreshold:85] [AreaThreshold1:400] [AreaThreshold2:4000] [BGsub:0] ]]
 
[[Image:Parameters1.png|thumb|center|800px| Figure.3 Example 2. Parameters [GrayThreshold:15] [AreaThreshold1:200] [AreaThreshold2:1500] [BGsub:1] ]]
 
[[Image:Parameters1.png|thumb|center|800px| Figure.3 Example 2. Parameters [GrayThreshold:15] [AreaThreshold1:200] [AreaThreshold2:1500] [BGsub:1] ]]
 
[[Image:Parameters3.png|thumb|center|800px| Figure.4 Example 3. Parameters [GrayThreshold:40] [AreaThreshold1:1500] [AreaThreshold2:4000] [BGsub:1] ]]
 
[[Image:Parameters3.png|thumb|center|800px| Figure.4 Example 3. Parameters [GrayThreshold:40] [AreaThreshold1:1500] [AreaThreshold2:4000] [BGsub:1] ]]

Revision as of 14:56, 6 July 2009

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 the results obtained from using 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.

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]
Personal tools