# Which Features Are Trained

PatMax considers all of the features contained within the supplied training region, but it may also consider some features from outside the training region. This happens under the following conditions:

- If the pattern training window is close to the edge of the image, features that are closer to the edge of the image than the coarse granularity limit may not be detected. However, if the pattern training window is not close to the edge of the image then it is guaranteed that every feature inside the window is detected, regardless of the coarse granularity setting.
- PatMax can detect features that are outside of the training region if those features are within the coarse granularity limit of the edge of the pattern training window and if they are not within the coarse granularity limit of the edge of the image.

If the edge of the training region is close to the edge of the training image, then features within the training image might not be trained, as shown in the following figure.

Because PatMax may train features that are outside the training image, you should take care that no features that are not part of the actual pattern are present in the image near the training region. The following figure shows a case where unwanted features could be trained even though they are outside of the training region.

In general, you should observe the following basic guidelines:

- Do not train a pattern with features that are close to and just inside the training window if the window is close to the edge of the training image; these features may not get included in the trained pattern.
- Always examine the graphic display of the feature boundary points trained as part of a pattern; verify that all the features you expected to be trained are trained and that no extraneous features from outside the training image window are trained