| Customize Help

Steps to validate beads

The following steps provide a basic methodology for using the MIL Bead module:

  1. Allocate a bead context to hold your bead templates, using MbeadAlloc().

  2. Allocate a bead result buffer to hold the results of the verification operation, using MbeadAllocResult().

  3. Add a bead template to the bead context, using MbeadTemplate().

    You can repeat this step to add multiple templates.

  4. Specify training settings, using MbeadControl().

  5. Train the templates, using MbeadTrain().

    If necessary, you can perform certain drawing operations based on the trained templates, using MbeadDraw().

  6. Verify the training status of the templates in the context, using MbeadInquire() with M_STATUS.

    If the templates are not completely trained, you can use MbeadTemplate() and MbeadControl() to modify the templates and then re-call MbeadTrain().

  7. Specify verification settings, using MbeadControl().

  8. Verify beads in a target image against the bead templates, using MbeadVerify().

    If necessary, you can perform certain drawing operations based on bead results, using MbeadDraw().

  9. Retrieve the required bead results from the result buffer, using MbeadGetResult().

    If necessary, you can use MbeadControl() to modify verification settings and then re-call MbeadVerify().

  10. If necessary, save your bead context, using MbeadSave() or MbeadStream().

    Once you save a bead context, you can later restore it, using MbeadRestore() or MbeadStream(). Restoring a bead context instead of creating it again can be more efficient, especially if the restored context requires no further modifications. You can save or restore a bead context to/from a file or memory stream.

  11. Free all your allocated bead objects, using MbeadFree().