# Simple Pattern Origin

PatMax returns the position (X-translation and Y-translation) of a found instance of the pattern in a run-time image as the location of the pattern origin in the run-time image's selected space.

When you specify the pattern origin location, keep in mind that if you enable any generalized degree of freedom, instances of the pattern might be reported at a shifted location. The following figure shows an example where the transformation between the two patterns is rotation only, but because the an origin at the corner of the pattern training region is used, a translation is reported in addition to the rotation.

The following figure shows the effect of specifying a pattern origin at the pattern center.

In general, you should either:

- Set the origin to correspond to a point of interest within the trained pattern.
- Set the origin to be at the center of the trained pattern.

Note: If you are using the PatFlex algorithm, you should make sure to specify an origin that lies within the pattern; the run-time location of an origin outside of the pattern in a deformed image can be very inaccurate.