| Customize Help

Score characteristics



As previously discussed, a marker is found according to its associated characteristics, which you can set with MmeasSetMarker() (essential characteristics) and MmeasSetScore() (score characteristics). Score characteristics apply only to markers that have all essential characteristics.

Unlike essential characteristics, which are either met or not (causing the marker to be kept or discarded), score characteristics allow you to specify a range of acceptable values; based on where the actual characteristic result falls within that range, MIL calculates its score. For example, with M_EDGE_CONTRAST_SCORE, you can set a range of valid contrast values, from the highest possible contrast to the lowest that you are willing to tolerate; the better (higher) the marker's contrast, the higher its contrast score.

MIL multiplies the scores of all score characteristics, specified for the marker, to calculate the final score of the marker (MmeasGetResult() with M_SCORE_TOTAL). The marker with the highest final score is the one found by MmeasFindMarker(). By default, MIL only calculates the score of the marker's edge strength (M_STRENGTH_SCORE). Therefore, if you do not call MmeasSetScore(), the marker that has the strongest edges (and all the essential characteristics) is found.

Although you can specify multiple score characteristics, doing so can cause results that are difficult to interpret. It is often sufficient, and simpler, to use one score characteristic with which to find the best marker. Since the marker with the highest (best) strength is found by default, you should therefore typically disable the strength score characteristic before setting another score characteristic.

After calling MmeasFindMarker(), you can use MmeasGetScore() with M_RESULT to retrieve the characteristic's score, as well as other related information, such as the actual value of the characteristic (for example, the contrast of the marker in the image). You can also use MmeasGetResult() to retrieve the actual value of the characteristic (for example, M_EDGE_CONTRAST), regardless of whether you call MmeasSetScore(). To inquire MmeasSetScore() settings, use MmeasGetScore() with M_MARKER.

Setting limits

You must use MmeasSetScore() with the Min, Low, High, and Max parameters to set the acceptable limits of a score characteristic. These limits represent a type of score function, f(x), where x is the calculated characteristic. If x is less than Low and greater than or equal to Min, or greater than High and less than or equal to Max, MIL calculates the characteristic's score (f(x)) to be above 0% and below 100%. If x is greater than or equal to Low and less than or equal to High, the characteristic is automatically given a score of 100%. Conversely, if x is less than Min or greater than Max, the characteristic is automatically given a score of 0% and is discarded.

For example, if you are using M_EDGE_CONTRAST_SCORE and set Min to 25 and Max to 225, any contrast value that is below 25 and over 225 will score 0%. If you also set Low to 50 and High to 200, then any contrast between 50 and 200 will score 100%, while contrasts between 25 and 50, or between 200 and 225, will score above 0% and below 100% ( f(x)).

You must specify a value for each limit parameter. All limits except Min can be set to M_MAX_POSSIBLE_VALUE, which represents a predetermined maximum established by MIL for that characteristic.

Using score characteristics

The variety of limits (Min, Low, High, and Max) provide you with great flexibility and control over score characteristics, which affect the marker that is ultimately found. The following examples illustrate how to set these limits to achieve the required results.

  • You want to specify one limit that a characteristic must be above; for example, you only want to find edge markers that have a strength that is higher than 20. To do so, use M_STRENGTH_SCORE, and set Min and Low to 20, and High and Max to M_MAX_POSSIBLE_VALUE. In this case, if the marker's strength (highest edgevalue) is greater than 20, the strength score will be 100%. If it is below 20, the strength score will be 0%.

  • You want to specify one limit that a characteristic must be under; for example, you only want to find edge markers that have a contrast that is below 80. To do so, use M_EDGE_CONTRAST_SCORE, and set Min and Low to 0, and High and Max to 80. In this case, if the contrast is less than 80, the contrast score will be 100%. If it is above 80, the contrast score will be 0%.

  • You want to specify two limits that a characteristic must be within; for example, you only want to find stripe markers that have a width between 40 and 60 pixels. To do so, use M_STRIPE_WIDTH_SCORE, and set Min and Low to 40, and High and Max to 60. In this case, if a stripe's width is greater than 40 pixels and less that 60 pixels the width score will be 100%. Otherwise, the width score will be 0%.

  • You want to specify two limits that a characteristic should ideally be within, and to allow some tolerance for each limit; for example, you prefer finding stripe markers that have a width between 40 and 60 pixels (if available), but if necessary you also want to accept widths that are closest to those limits by a maximum of 10 pixels. To do so, use M_STRIPE_WIDTH_SCORE, and set Min to 30, Low to 40, High to 60, and Max to 70. In this case, if a stripe's width is between 40 and 60 pixels, it will score 100%, while widths between 30 and 40, or between 60 and 70, will score above 0% and below 100%, depending on how close they are to the ideal limit. Widths below 30 and above 70 will score 0%.

  • You want to specify limits that favor characteristics with higher values; for example, you want to find the circle that has the biggest radius. To do so, use M_RADIUS_SCORE, and set Min to 0, and Low, High, and Max to M_MAX_POSSIBLE_VALUE.

  • You want to specify limits that favor characteristics with lower values; for example, you want to find the circle that has the smallest radius. To do so, use M_RADIUS_SCORE, and set Min, Low, and High to 0, and Max to M_MAX_POSSIBLE_VALUE.

  • You want to specify limits that cause the characteristic to be ignored (a flat mapping); for example, you want to ensure that the marker's edge strength score will not affect the marker that is found. To do so, use M_STRENGTH_SCORE and set Min and Low to 0, and High and Max to M_MAX_POSSIBLE_VALUE.

    A score characteristic that has its limits set to the specified flat mapping will always score 100%; therefore, it can never be a criterion by which to select the best marker. That is, since all possible characteristic values (having already been validated by the essential characteristics) always receive a perfect score, there can never be one that is better than another.

    As previously mentioned, this flat mapping is the default behavior of all score characteristics except M_STRENGTH_SCORE. Note that since the edge strength limits are set, by default, to find the marker with the highest strength characteristic score (that is, Min set to 0, and Low, High and Max set to M_MAX_POSSIBLE_VALUE), it might be useful to sometimes apply a flat mapping to M_STRENGTH_SCORE and ignore the strength, thereby allowing some other characteristic, such as the contrast, to find the best edge.

Final score

Since MIL multiplies the score (percentage) of all of the marker's characteristics to establish the marker's final score (M_SCORE_TOTAL), you should keep in mind the following potential effects of this calculation:

  • If a characteristic's score is 0%, the marker's final score will also result in 0%, thereby eliminating any possibility of obtaining a result. That is, multiplying any x by 0 always gives 0.

  • If a characteristic's score is 100%, the calculation of the marker's final score remains unaffected by that characteristic. That is, multiplying x by 100% always gives x. In this case, the score of the other characteristics (if any have been set) will determine the best marker among all possible markers. For example, if characteristic C has a score of 25% and all other characteristics have scores of 100%, then characteristic C determines the final score and whether the marker is found (the final score of such a marker would be 25%).

    If the range between the Low and High limits is too wide, many characteristics can score 100%, making it difficult to ascertain which is better. Therefore, if you are having difficulty distinguishing between markers, you can try narrowing these limits.

  • Once a characteristic's score is below 100%, the marker's final score can never be 100%. That is, if an element in a set is imperfect, the set as a whole can never attain perfection.

The following example illustrates how a marker's final score is computed according to the result of the specified score characteristics.

Marker

Contrast score result

Strength score result

Position score result

Marker's final score

A

70%

80%

100%

56% (0.7 x 0.8 x 1.0)

B

100%

100%

20%

20% (1.0 x 1.0 x 0.2)

C

100%

100%

0%

0% (1.0 x 1.0 x 0.0)

Lowest possible score and score-offset

When using multiple score characteristics, you can specify the importance of each, allowing you to affect a characteristic's influence on the marker's final score. To do this, MIL lets you adjust a characteristic's lowest-possible score, which is 0 by default. For example, by default, if a characteristic scores 5%, and MIL multiplies it with other characteristics, it will significantly affect the marker's final score (the lower a characteristic's score, the greater its multiplicative effect). However, if you set its lowest possible score to 93%, MIL remaps that same characteristic's score to 98%; this results in the characteristic's score having less influence on the final score. This allows you to potentially modify results (the marker found) without having to alter other settings.

To change the lowest possible score, use the ScoreOffset parameter and specify a value that MIL will then offset from a perfect score (100%). That is: 100% - ScoreOffset = LowestPossibleScore. Since the default lowest possible score is 0%, the default score-offset is 100% (calculated as, 100% - 100% = 0%).

Although the score-offset increases the lowest-possible score of a characteristic, it does not alter the range of acceptable characteristic values, as set with the limit parameters (Min, Low, High, and Max). For example, the following image shows two graphs with equivalent limits. However, the first graph has a score-offset of 100% (default), while the second graph has a score-offset of 70%. In each case, the pool of valid characteristic values is the same. The only difference is, in the first graph, the lowest-possible score of a characteristic (less than or equal to Min greater than or equal to Max) is greater than 0, while in the second graph the lowest-possible score of a valid characteristic (between the same ranges) is greater than 30.

As the graphs indicate, the score-offset essentially influences the slope of the characteristic's score function (f(x)). Note that since the angle of the function is slightly different in each graph, MIL plots the resulting scores for equivalent characteristic values within these ranges somewhat differently. For example, in the first graph, a characteristic value that scores 5% will score approximately 34% in the second graph. However, in either case, any characteristic value that is less than 10 or greater than 90 (that is, below Min or above Max) will score 0%. Note that characteristic values between 40 and 60 (Low and High) will always score 100%.