evaluateOCR
Description
metrics = evaluateOCR(resultTxt,groundTruthTxt)resultTxt
        against the ground truth groundTruthTxt. The function evaluates the
        quality of the OCR results by computing the character error rate and word error rate metrics
        across images and the entire data set.
metrics = evaluateOCR(___,Name=Value)Metrics="word-error-rate"
        specifies to evaluate results using only the word error rate metric.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
- Error rates are a percentage of characters (words) in the input - groundTruthTxtthat have been incorrectly predicted in- resultTxt.
- To compute the number of incorrect predictions to use in the error rate calculation, the function uses the Levenshtein distance, which is defined as the minimum number of edits (such as insertions, deletions, or substitutions) required to change one word (or sentence) into another one. - Error rate = (S + D + I)/N where, - S — Number of substitutions 
- D — Number of deletions 
- I — Number of insertions 
- N — Maximum number of characters (words) between - groundTruthTxtor- resultTxt
 
Version History
Introduced in R2023a