| Customize Help

Edge markers: basic characteristics that should be specified

This section describes basic edge marker characteristics that you should specify for most applications so that the appropriate edge marker is found. These edge marker characteristics are also characteristics that must be met.

To specify a characteristic of an edge marker that must be met, use MmeasSetMarker(). These are known as essential characteristics. MIL can only find a marker if it meets all the essential characteristics. Note that certain essential characteristics, such as those related to the search region, multiple-occurrence markers, and the search algorithm, are described earlier in this chapter. Other more advanced edge marker characteristics that you can specify and that must be met are described later in this chapter.


The polarity of an edge describes whether it is rising or falling, relative to the direction of the search (M_ORIENTATION). A rising edge denotes an increase (from dark to light) in grayscale values and a positive polarity, while a falling edge denotes a decrease (from light to dark) in grayscale values and a negative polarity. Use M_POLARITY to specify that the polarity of the edge marker must be positive (M_POSITIVE) or negative (M_NEGATIVE). You can also specify that the edge marker can have any polarity (M_ANY), in which case MIL does not consider polarity when trying to find the marker (default).

For more information about orientation and search direction, see the Marker orientation and search direction subsection of the Search region section earlier in this chapter.

Minimum edgevalue

As previously discussed in this chapter, MIL establishes edgevalues by taking the normalized first derivative of the intensity profile. When you draw the edgevalues of each column, the graph generally resembles a peak when an edge is present. The minimum edgevalue is a type of threshold characteristic that you can set to represent the edgevalue above which a grayscale variation can be considered an edge. Any grayscale variation in the image that does not meet the specified minimum edgevalue is therefore discarded when MIL is searching for the marker. Though the default minimum edgevalue is typically sufficient, you can change it using MmeasSetMarker() with M_EDGEVALUE_MIN.

When searching for multiple edges, some advanced applications might also need you to specify the minimum prominence of the required edge peaks, using M_EDGEVALUE_VAR_MIN. For more information about M_EDGEVALUE_VAR_MIN, and also about M_EDGEVALUE_MIN, see the Search algorithm section earlier in this chapter.