Feature Size and Pattern Granularity

The features that make up a pattern can be of different sizes, from features a few pixels in size to features up to 50 or 100 pixels in size. Most patterns contain features with a range of sizes.

PatMax uses pattern features of different sizes to locate similar features in run-time images. In general, PatMax uses large features to find an approximate pattern match in a run-time image quickly, and small features to determine the pattern location precisely.

For example, when PatMax searches for a trained pattern of a diskette, it uses the large features from the diskette (such as the overall shape of the diskette and the outline of the label) to quickly locate the diskette, then it uses the smaller features (such as the letters on the label) to determine the precise location of the pattern. The figure below shows how PatMax uses the different feature sizes.

Large features used for coarse location and small features for fine location

The features that PatMax detects in an image are controlled by the granularity used by the PatMax when it analyzes the image. To detect only the large features in an image, PatMax uses a larger granularity setting. To detect the small features in an image, PatMax uses a smaller granularity.

Granularity is expressed as the radius of interest, in pixels, within which features are detected. The figure above illustrates two important characteristics of pattern granularity.

  • Large features such as the outline of the diskette are detected at both small and large granularity settings.
  • Smaller features are present or absent from the image depending on the granularity setting.

In some cases, however, a feature might be present at a fine granularity and at a coarse granularity, but not at an intermediate granularity.

The figure below shows the effect of different granularity settings on the features that are detected in a single image.

Pattern granularity

At the smallest pattern granularity, the trained pattern includes one or two features for each letter on the diskette label. As the pattern granularity increases, the number of features decreases.

In addition to affecting the features that are trained as part of the pattern, pattern granularity also affects the spacing of boundary points along a feature boundary. In general, the spacing of feature boundary points is approximately equal to the pattern granularity.

PatMax uses a range of pattern granularities when it trains a pattern from an image; PatMax automatically determines the optimum granularity settings when it trains a pattern. The smallest granularity used to detect features in the training image or shape description is called the fine granularity limit. The largest granularity used to detect features is called the coarse granularity limit.

You can obtain a diagnostic display that shows the actual features and feature boundary points trained using the coarse and fine granularity limits. See Diagnostic Displays.

Note: PatMax trains the pattern using a range of granularities, not just the coarse and fine granularity limits. The coarse and fine limits are the largest and smallest granularities that PatMax uses.