Using a PMAlign Tool to Process Multiple Part Instances in a Single Image with a Red Analyze Tool

In order to handle multiple part instances in a single image, a separate View must be created for each instance. Each View requires a transform to fixture to its part; for each PMAlignResult produced by a PMAlign tool, the procedure above can be repeated to create multiple fixtured Views:

For each result from a PMAlignTool:

  1. Get the Pose from a CogPMAlignResult.
    1. Convert the Pose from CogTransform2DLinear to System.Windows.Media.Matrix using the provided extension method.
  2. Get the RegionOfInterest from the Deep Learning tool and cast it to IManualRegionOfInterest.
  3. Call the AddView method on the IManualRegionOfInterest to create the fixtured View, passing in a size and the Pose matrix.
  4. Process the image once all the Views are added.