To recognize characters, EasyOCR2 uses a pretrained classifier or a classifier that you trained on your character database.
For each input character:
□
The classifier calculates a score for all candidate outputs.
□
It returns the candidate with the highest score as the recognition result.
Use the topology to pass information to the classifier about each character. This reduces the number of candidates and improves the recognition rate (see Set the Topology).
&
●
Use the method Read or Recognize to retrieve a string with the recognition results.
□
Call Read to detect and recognize the characters in one step.
□
Call Detect to extract the text from the image then Recognize to recognize the extracted text. This allows you to modify elements of the detected text before the recognition.
●
To access more information about the results, use the method ReadText that returns an EOCR2Text structure with:
□
The coordinates and the size of each textbox,
□
A bitmap image of each textbox,
□
A list of the recognition scores for each character.
Use Load to read the model (.o2m) file from your disk.
The model file contains:
□
All the detection parameters,
□
The topology,
□
The reference character database.
Overriding the classifier
●
Use SetClassifier with a symbol and a classifier to override the current classifier and assign another classifier (EOCR2Classifier) to a specific symbol or a combination.
A character is expected to be recognized in 4 ms, half of this with multithreading and even less with a GPU.
Multithreading
●
With pretrained classifiers, use Easy::GetMaxNumberOfProcessingThreads to multithread the recognition and to determine how many threads you can use for the recognition.
GPU acceleration
●
You can also use a compatible GPU to accelerate even more the recognition.