边缘评分

Edge Mode Scoring

This section contains the following subsections.

 

Once the Caliper tool has filtered the projection image and produced a list of the edge peaks that exceed the contrast threshold that you specify, the tool computes a score for each edge pattern candidate within the image. This score lets your application determine which of the edge pattern candidates in the image represent instances of the actual edge pattern of interest, as defined by your edge model.

The Caliper tool computes the score for each edge pattern candidate by comparing the edge pattern candidate with the edge model, based upon a set of scoring criteria that you supply. These criteria are called scoring methods.

A scoring method has two parts:

  • A scoring method type that defines what measurement of the edge you want to evaluate
  • A scoring function that defines the relationship between the raw measure and the mapped score that will be generated for the scoring method

You can define several scoring methods. The Caliper tool applies all the scoring methods to each edge pattern candidate within the image and returns an overall score for each edge pattern candidate. By defining appropriate scoring methods, you can ensure that the edge pattern candidate with the highest score will be the edge pattern of interest.

Edge Model

To evaluate whether an edge pattern candidate in the image is a good match for the edge pattern that you are seeking, you must define a model that describes the edge pattern of interest. You define an edge model by specifying the polarity (light-to-dark or dark-to-light) and position of each edge in the model. You specify the positions of edges relative to a model origin. The Caliper tool lets you define edge models with a single edge or a pair of edges.

Table 1 describes an edge model with a symmetric pair of edges. The origin of the model is centered between the two edges.

Table 1.
Edge Position Polarity

1

-20

Light to dark

2

+20

Dark to light

Figure 19 shows an idealized graphical representation of the edge model described in Table 1. Note that the position of the model origin is implied by the values of the edge positions.

Figure 19. Idealized representation of an edge model

Measurement Caliper Theory Caliper idealized representation of an edge model

 

Scoring Method Types

The Caliper tool bases the score of an edge pattern candidate on how different the edge pattern candidate is from the edge model. You can specify the particular measure that the tool uses to assess this difference. The types of measures that you can specify are called scoring method types. The available scoring method types are

  • Position
  • Size
  • Contrast
  • Straddle

When the tool applies a scoring method type to an edge pattern candidate the result is a raw score. The raw score is different for different scoring method types. The scoring method types and their raw scores are described in the following sections.

Positional Scoring Methods

You can score an edge pattern candidate based on the position of the edge pattern candidate relative to the center of the projection region you specified for this Caliper tool. The position is defined as the distance between the center and the model origin point within the edge pattern candidate.

If you expect the edge of interest to be a specific distance from the center of the projection region, then you can define an absolute positional scoring method and the raw score will be expressed as an absolute distance in pixels.

If you are using an edge pair model and you would like to consider the variation in position between the edge pattern candidate and the center of the projection region relative to the size of the model, you can define a relative positional scoring method. In this case the raw score will be normalized so that a value of 1.0 means that the distance was equal to the size of the model.

Size Scoring Methods

If you are using an edge pair model, you can score edge pattern candidates based on how much the width between the edges of the edge pattern candidate varies from the width between the edges of the edge model. You can define a size scoring method to be absolute, in which case the raw score will be returned as an absolute size difference in pixels.

If you would like to consider the size difference relative to the size of the model, you can define a relative size scoring method. In this case the raw score will be normalized so that a value of 1.0 means that the size difference was equal to the size of the model.

Contrast Scoring Methods

You can score edge pattern candidates based on the contrast of the edge pattern candidates. The contrast of an edge is expressed in terms of the change in pixel values divided by the size of the edge in pixels. The raw score for a contrast scoring method is normalized so that a value of 1.0 is equal to a contrast of 256 (the maximum possible value for contrast). If you specify an edge pair model, the raw score is the average of the contrast for the two edges.

Straddle Scoring Methods

If you are using an edge pair model, you can score edge pair candidates based on whether or not the two edges lie on either side of the center of the projection region. This type of scoring method can be used to find objects defined by a pair of edges that are expected to lie under the center of the projection region. The raw score is returned as 1.0 if the center of the projection region is straddled by the edges, 0.0 if the center of the projection region is not straddled by the edges.

Scoring Functions

For each scoring method, the selected scoring method type produces a raw score. You control the effect that this raw score has on the overall score for an edge pattern candidate by defining a scoring function. A scoring function maps a raw score to a mapped score. The mapped scores for each scoring method for an edge pattern candidate are combined to form the overall score for that edge pattern candidate.

You define a scoring function by specifying low and high input and output values. Figure 20 shows a scoring function

 

posted @ 2024-12-19 16:12  哈库拉  阅读(42)  评论(0)    收藏  举报