Error in ocr function

조회 수: 12 (최근 30일)
Giovanni Gonzalez
Giovanni Gonzalez 2017년 12월 22일
댓글: Muhammad Adil 2020년 10월 10일
I'm trying to use the orc function in this way
"ocrRes = ocr(businessCard,'Language','C:\Users\Gio\Desktop\OCR\tessdata\spa.traineddata');" and have this error
Error using tesseractWrapper Internal error using Tesseract
"ocrRes = ocr(businessCard,'Spanish','C:\Users\Gio\Desktop\OCR\tessdata\spa.traineddata');"
Error using ocr>parseInputs (line 209) The argument 'Spanish' is a string scalar or character vector and does not match any parameter names. It failed validation for the argument 'ROI'.
Could you help me Please....
  댓글 수: 7
Walter Roberson
Walter Roberson 2020년 10월 10일
At the command line give the command
dbstop if caught error
then run your code. MATLAB will detect some processing error or other, and in the command window it will tell you what the error was and where the error occurred. You should copy that information and paste it here.
For example it might complain about an index our of range, or about array dimensions mismatch.

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

답변 (1개)

Walter Roberson
Walter Roberson 2017년 12월 22일
ocrRes = ocr(businessCard, 'Language', {'Spanish', 'C:\Users\Gio\Desktop\OCR\tessdata\spa.traineddata'});
However it is not clear if it is possible to use both a language name and a path at the same time. You might need
ocrRes = ocr(businessCard, 'Language', 'C:\Users\Gio\Desktop\OCR\tessdata\spa.traineddata');
  댓글 수: 2
Giovanni Gonzalez
Giovanni Gonzalez 2017년 12월 26일
Thanks but, I found another mistake, I need the OCR to look only for words in Spanish.
Muhammad Adil
Muhammad Adil 2020년 9월 24일
편집: Walter Roberson 2020년 9월 24일
Error using ocr>parseInputs (line 215)
The argument 'PRO' is a string scalar or character vector and does not match any parameter names. It failed validation for
the argument 'ROI'.
Error in ocr (line 119)
[roi, hasROI, params] = parseInputs(I,varargin{:});
Error in Untitled (line 9)
b=ocr(a,'PRO','C:\Users\mian adil\Desktop\PRO\tessdata\PRO.traineddata')
i need your help to solve this

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

Community Treasure Hunt

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

Start Hunting!

Translated by