# Sampling Tool Parameters

The Sampling tool parameters control the way that images are sampled during training.

Note:

- The Detail parameter is only available with the Blue Locate Tool.
- Changes to the Sampling parameters after a tool has been trained will invalidate the training, because the underlying image statistics may be fundamentally changed, which will necessitate retraining the tool.

Parameter | Description
--- | ---
Feature Size | Specifies the typical feature diameter, in pixels. The Feature Size parameter is graphically displayed in the lower left of the image, and can be graphically resized within the image to set a more accurate size. Feature size strongly influences processing time (n2), i.e., a Feature Size of 100 is 100 times faster than a size of 10, while a Feature Size less than 15 usually does not yield good results. When setting the Feature Size, consider the following in regards to Processing time (Ptime): Note: The tool will actually see an area five times larger than the Feature Size setting. However, the level of detail will be much higher in the center of the feature, as opposed to the periphery. For the Blue Read Tool, the Feature Size is two-dimensional, Width x Height.
Detail | Specifies how much focus the Blue Locate tool should place on the area within the feature graphic, versus the area surrounding the feature label. The available settings are values 1 through 4. When this parameter is enabled and set to 4, the tool will focus attention on learning more about the area inside the labeled feature size graphic, and place limited emphasis on the context region surrounding the graphic. When this parameter is enabled and set to 1, the tool will focus attention on both the context and the area inside the labeled feature size graphic, though less emphasis will be placed on the detail inside the labeled feature size graphic. Settings 2 and 3 place varying degrees of emphasis between the two extremes of 1 and 4. Note: For more information about the way the tool samples images based on feature size, see the Feature Size topic.
Color | Specifies the number of color channels to use when sampling the image. When set to 1, color images will be converted to greyscale. Treats the image as greyscale BGR image.
- Border Type | Specifies how pixels on the outside of the image are sampled. For more information about how this parameter affects sampling, refer to the Sampling Method topic. Tip: Adding an additional mask at the boundaries of the image highly reduces the false detection rate. Black: Fills the outside of the image with a solid color, black.
  Black Fill
Replicate: Fills the outside of the image with the last pixel.
Masking Mode | Specifies how a mask will be applied to the sampled image. A mask is used to limit areas of the image processed by the tool. Note: Masks can be set after training, however, setting them prior to training will help the learning phase. Transparent: Samples are only collected within the unmasked parts of the image, but data from the Context Region is also collected from the areas that are masked. This ensures that features or defects that are at the boundary of the mask or ROI generate the same response as features or defects that are centrally located.