# Confusion Scores And Confusion Thresholds

When you train an OCVMax tool, the tool creates a set of confusion scores for every character key you enable in the font you use. Confusion scores represent the amount of similarity between each pair of character keys, and are generated by comparing character keys at the same position, angle, and scale. An OCVMax tool stores the confusion scores in a confusion matrix, as shown in the following example:

The character keys across the top of the confusion matrix represent all the enabled character keys in the current font, while the character keys down the left-hand column represent all the character keys in the string you want to verify, in numerical order. For example, this confusion matrix could represent the string “322104” in a font where only numbers are enabled. If you configure an OCVMax tool to verify multiple paragraphs, each paragraph generates its own set of confusion scores.

To read the confusion score between any two character keys, start in the left-hand column. For the previous confusion matrix, comparing the character key “3” to the character key “5” reveals a confusion score of 0.45, while comparing the “3” to the “8” reveals a confusion score of 0.83. The table may not always contain symmetric values when comparing the value at (i, j) with the value at (j, i). For example, the confusion score comparing "0" to "3" is not the same as comparing "3" to "0".

Scores that appear in red represent confusion scores that exceed the current confusion threshold, and indicate pairs of character keys where the potential for confusion can be high. As the OCVMax tool attempts to verify each character key, the tool performs some extra processing to rule out potentially confusing character keys. Using the previous confusion matrix as an example, an OCVMax tool attempting to verify a character key in the string against the character key "0" will generate a matching score for the character key "0" as well as the character keys "6", "8", and "9". The matching score for "0" must exceed the matching score for the other potentially confusing character keys, and it must exceed these scores by a margin set by a new threshold, the confidence threshold. Typically, the confidence threshold is set to a low value, such as 0.1.

If the matching score a character key receives does not exceed all other potentially confusing scores by the margin set by the confidence threshold, the OCVMax tool does not verify the character key and instead reports the character key is Confused.

As you decrease the confusion threshold, the OCVMax tool generates matching scores for more potentially confusing character keys and compares them to the matching score of each character key it attempts to verify. This yields better verification results, but it requires more time for the tool to execute and it can increase the chance that character keys will be erroneously rejected due to confusion. As you increase the confusion threshold, the tool generates fewer matching scores for potentially confusing character keys, resulting in faster execution times but increasing the chance that the tool will verify a character key incorrectly.

The confidence threshold can also be adjusted from its default low value. Increase the confidence threshold if you become concerned that the OCVMax tool verifies character keys incorrectly, for example verifying that a character key is a “3” when it appears as an “8” in your acquired image.