Free Support Forum - aspose.com

Aspose.ocr Java not giving correct output


#1

Hi,

I was evaluating Aspose.ocr Java for extracting text from image. The output is incorrect. Please find the code and sample input and the output.

Code File :

PerformOCROnImage.java.zip (737 Bytes)

Sample image -

test1.jpg (340.9 KB)

Output :

T. avi= L-lMmmult
TT T----- –

  • nn nn nnn — nnn -n- n nnnn - n- --nn- -nn- – nnnn
  • n-- nn- nn n-- -nnn n n -nn- - n-nnnnnn n -n nn-
    – -nnn n nn-nn nM nTnnn n-n -nn nn mnn-nn n–n nn- nM -n
  • nnn-n- nn nnnn–n nn n-nnn nn n-n- nn
    mnn -n- nnn-n-n - n- =n -nn - nnnnnnn -n -n-nnnnnnnn mn
    –nnn nn -n-n w-nn n - n-n-- nM -n-n nn n–n nmnnn
    n-nn
    TT onnnnn-n - -n- -mn --n–
    n Tn – m -nn-n nnn- nnn-nn nn -=nnnn nnnn-mnn -n-
    nn-mnn- —nnn-n-- -nn-nn n-nn- -
    n Tn – nn -n-nnnnnnnn nn nn =nnn -n n- nn - =-n
    T Tn-nn =-nnn- -n-n-n-nnn-nnnnnm-nnnnn-nn mnM-n
    nnnnn nnn n- nn n-mnnnn
    n Tn -nn nn —n nn nn — nn nnnnn n- mn - -nnnn- m -n-n
    n Tn-nn nn-nn --nn nm-nn-M mn-nnnn- - nn n-n nn-nn
    nnnm nm nn nn-M m n-n nn- – --nn - nn nn nnn-n-n-
    n Tn -nn nn n -nnn- nnnn nn-nn- nn-m nn- -nn- – nnnn n nmn
    n- mn - nn nn-mm nn- n-n–
    n Tn nnnnn- n n- nn- nn nnn-nn -nn n-n -n-n -nn = nnn-n nn nn
    nm-n nn w - nn- =
    n Tn -n- n n- m–n nn nmnn nmnn–n-nnnnnnn nM nn - n-nnn
    nmnn- nn - n-n-- nn -nn n-nn
    T Tn -n- nnnn =nnn- n-nn mnn =–n nnnnn -nnnnn-nM --n
    nnnm n-n nn nn nnnnnnnn n nnn- T-
    TT mn----w-
    mnn-n- nnnn – -- - n=nnM nn- =-- nnnnnnn-
    n-mn m-nnnnnMnnnn -n–nn =n-n
    T- -nnnm nn-nmn
    mnn -n- nnnn m nnn-M - -nn n n n n nn-nn nmM - m --nnn-
  • m-m nn- m mn- nnnnn- -nnn -nn- nmnnn nnnnn- —
    n-n n nnn --n nnnnn -w m - nn–nn
    T- -n-nn–n
    -n nn- - m-m nn- -nnn - nnnnmnn =–n- mnnnnnn nn m
    -nmnn - mn-m nn m -nn -n-n

#2

@saurabh.arora

Thanks for contacting support.

We have checked the image file which you have shared and noticed that it was of 72DPI. Please note that in order to use API with better results, the source image should be of 300DPI minimum and font size should be 10pt to 12pt.

Furthermore, supported fonts by the API include Arial, Times New Roman, Courier New, Verdana, Tahoma and Calibri with regular, bold and italic font styles. Please try your scenario with larger DPI image and in case you still face any issue, feel free to contact us.