Text verification with templates (OCV)

When the expected text is known (batch, date, reference), ONXOCV verifies it instead of reading it: each character is compared with its template, trained on the real marking. About 20 ms per line, compared with half a second for a full OCR reading.

Text verification with templates (OCV)
ONXOCVText mask with variable characters.ocv library≈ 20 ms per line
1

A template

The list on the left gives each template with the number of samples trained, its contrast and the character that most resembles it (orange or red bar if the resemblance is strong). The “Gabarit” (template) tab shows the enlarged template, the value of each pixel and its closest neighbours.

On the right: the verified text mask (the Xs are variable characters) and the result, score, expected and found characters, character pitch.

A template and its closest neighbours.
2

The whole library

The “Tous les gabarits” (all templates) tab shows the library at a glance. Twins (0 and O, 1 and I…) are declared so that they are not counted as errors. The window works on a copy: nothing changes for the cycle before OK.

The complete library.

Good to know

  • The library is trained with the ONNX OCR model.
  • Results: score in %, expected and found characters, text position, correlation, character pitch; one object per character.
  • Instruction help: ONXOCV.