| MIL 10 User Guide
| Customize Help

Measurement examples



See also
Availability
Not available in MIL-Lite

Available in MIL
Next

The Measurement example MMeas.cpp demonstrates how to find a stripe in an image and measure its position, width, and angle.

This example also demonstrates how to find the average position, average width, and average angle of a row of pins on a chip.

In addition, the example shows you how to perform drawing operations and return measurement statistics.

Circle markers and advanced settings

There are also examples regarding circle markers and advanced measurement settings. These examples illustrate how to handle:

  • A simple circle.

    In this case, a circle is found with default settings.

  • A circle with two possible outer edges (circles).

    In this case, only the outermost circle must be measured. To achieve proper results, MmeasSetMarker() with M_MAX_ASSOCIATION_DISTANCE (restricts edges) was used.

  • A circle that is both incomplete and textured (can detect many edges).

    In this case, only the main circle must be measured. To achieve proper results, MmeasSetMarker() with M_EDGEVALUE_MIN was set above the default (reduces noise) and M_MAX_ASSOCIATION_DISTANCE was given a value (restricts edges).

  • Concentric circles.

    In this case, only the inner-most circle must be measured. To achieve proper results, MmeasSetMarker() with M_MAX_ASSOCIATION_DISTANCE (restricts edges) was used. Also, the strength score characteristic was removed and a radius score characteristic was set, using MmeasSetScore() with M_STRENGTH_SCORE and M_RADIUS_SCORE (locates smallest circle).

To view these examples, access the Measurement folder from the MIL Processing Examples link in the MIL Control Center.