# Runtime Sampling

Each input image is exhaustively sampled at runtime, and the individual samples are then processed by the trained network. The same feature size used for training is also used at runtime (ensuring that the trained network is processing inputs that are consistent with the inputs used for training).

Unlike training, where the sampling density is determined automatically, you can control the runtime sampling density for all the ViDi tools. The sampling density determines the degree of overlap between adjacent samples. A sampling rate of 1 means that the sampling location is incremented by the feature size between samples. The default sampling rate for most tools is 3, which means that the sampling location is incremented by one third of the feature size.

Sampling Density = 1 (4 samples) | Sampling Density = 2 (4 samples)
--- | ---

The Blue Locate tool and the Red Analyze tool in Unsupervised Mode provide additional user controls over sampling at run time.

- The Blue Locate tool performs additional interpolated sampling at locations where it detects features. It uses these additional samples to refine the feature pose. You can control the number of additional sampling passes using the Precision parameter, which specifies the degree of pose improvement at which resampling is stopped.
- The Red Analyze tool in Unsupervised Mode allows you to specify that a number of additional interpolated samples are collected in regions with detected defects. This can be useful for images where the range of complexity is highly variable within individual images.