Pattern matching examples
The following example demonstrates how to configure a find operation to locate a model within a target image.
Code example: mpat.cpp
To run this example, use the Aurora Imaging Example Launcher in the Aurora Imaging Control Center.
The example mpat.cpp does the following:
- Finds a CPU chip on a board, using a pattern matching context containing a model defined using
MpatDefinewithM_REGULAR_MODELthat has its accuracy and speed set to high (usingMpatControlwithM_ACCURACYandM_SPEEDboth set toM_HIGH). [Image: mpatcircuitsboard.png] - Finds the same chip within a range of angles, using a pattern matching context containing a model defined using
MpatDefinewithM_REGULAR_MODEL+M_CIRCULAR_OVERSCAN. [Image: mpatcircuitsboardrot.png] - Finds a rotated wafer model occurrence within a rotated target image, using a pattern matching context containing a model defined using
MpatDefinewithM_REGULAR_MODEL. In addition, the example usesMimRotateto rotate both the source and target image. [Image: mpatwafer.png] - Automatically defines a model within a target image, using a pattern matching context containing a model defined using
MpatDefinewithM_AUTO_MODEL. [Image: mpatwafer02.png]