PatMax Shape Training
Shape training allows you to train PatMax directly from a shape model rather than from an image. Shape models are sometimes called geometric descriptions or synthetic models.
When you train PatMax using a shape model you pass it a pointer to a ccShape object that describes the shape. Cognex provides an extensive library of primitive shapes for you to use such as rectangle, circle, line, ellipse, point, and others. You can also create your own primitive shapes using the ccGenPoly class. It is a good practice to configure polarity and weights for shapes before training PatMax using ccShape objects. Polarity and weight is discussed in the ccShapeModel reference page and in the Shape Models chapter of the CVL Vision Tools Guide.
While all of these primitive shapes are available, most shapes you will need to train are more complex and require multiple primitives combined in various ways to represent the desired shape. To create these shapes Cognex provides shape trees, which are container classes that can hold many primitives related in various ways to represent one shape. The shape tree classes also derive from ccShape. You will normally pass your shape as a pointer to a shape tree rather than as a pointer to a primitive. The shape and shape tree classes are described in the Shapes chapter of the CVL User’s Guide, where you will also find information about building shape trees.