Effacer les filtres
Effacer les filtres

How to use the .traineddata file with the ocr function after training?

13 vues (au cours des 30 derniers jours)
Artyom Archiyan
Artyom Archiyan le 10 Nov 2017
Commenté : H LIU le 8 Déc 2020
I trained the our function using a data set, but I don't know how to actually load in the data for use.

Réponse acceptée

Nick Choi
Nick Choi le 13 Nov 2017
You can use the path to the trained data file as part of the 'Language' name-value pair. One thing to note is that the trained data file must be located in a folder named 'tessdata'. An example function call would look like this:
txt = ocr(img,'Language','path/to/tessdata/eng.traineddata');
The following documentation link provides some additional information on how to use .traineddata files with the 'ocr' function: https://www.mathworks.com/help/vision/ref/ocr.html#input_argument_namevalue_d119e140075
  2 commentaires
MUHAMMED IRFAN
MUHAMMED IRFAN le 11 Déc 2017
Hello, I used this simple code.I have trained data for malayalam language in the mentioned location.But the matlab crashes as shown in the figure. What's wrong with my code?
Card = imread('sam.png');
txt = ocr(Card,'Lang','E:\irfan\OCR\tessdata\mal.traineddata');
H LIU
H LIU le 8 Déc 2020
txt = ocr(Card,'Language',{'E:\irfan\OCR\tessdata\mal.traineddata'});
have a try !

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by