필터 지우기
필터 지우기

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

조회 수: 22 (최근 30일)
Artyom Archiyan
Artyom Archiyan 2017년 11월 10일
댓글: H LIU 2020년 12월 8일
I trained the our function using a data set, but I don't know how to actually load in the data for use.

채택된 답변

Nick Choi
Nick Choi 2017년 11월 13일
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
MUHAMMED IRFAN
MUHAMMED IRFAN 2017년 12월 11일
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 2020년 12월 8일
txt = ocr(Card,'Language',{'E:\irfan\OCR\tessdata\mal.traineddata'});
have a try !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by