The following example demonstrates how to configure a find operation to locate a model within a target image.
The example mpat.cpp does the following:
Finds a CPU chip on a board, using a pattern matching context containing a model defined using MpatDefine() with M_REGULAR_MODEL that has its accuracy and speed set to high (using MpatControl() with M_ACCURACY and M_SPEED both set to M_HIGH).
Finds the same chip within a range of angles, using a pattern matching context containing a model defined using MpatDefine() with M_REGULAR_MODEL + M_CIRCULAR_OVERSCAN.
Finds a rotated wafer model occurrence within a rotated target image, using a pattern matching context containing a model defined using MpatDefine() with M_REGULAR_MODEL. In addition, the example uses MimRotate() to rotate both the source and target image.
Automatically defines a model within a target image, using a pattern matching context containing a model defined using MpatDefine() with M_AUTO_MODEL.