PSM error

124 views
Skip to first unread message

MATHANKUMAR m

unread,
Jan 9, 2020, 2:43:57 AM1/9/20
to tesseract-ocr
Hi,

    In tesserct-ocr config method i did used OEM & PSM for extract the text from image. But during process i got an exception like below mentioned

 Error : "Error, unknown command line argument '-psm'"  
 
 Method tried:
  • using threw config variable
                       config_var = '--oem 3 --psm 6',
                       out = pytesseract.image_to_string(image,lang='eng',config=
config_var)
  •  using directly to the line
                       out pytesseract.image_to_string(image,lang='eng',config= '--oem 3 --psm 6')

   And also tried by replacing --psm into -psm .But it is not resolved.

   The OEM is working in --oem 3 & --oem 1, but using 0,2  i get result as, 

                         
Failed loading language 'eng' , Tesseract couldn't load any languages! .





MATHANKUMAR m

unread,
Jan 9, 2020, 2:44:19 AM1/9/20
to tesseract-ocr

Hi, 
     I tried  to replace --psm into -psm still exception is not solved. 

Tesseract version :

tesseract 4.1.1-rc2-21-gf4ef
 leptonica-1.76.0
  libjpeg 8d (libjpeg-turbo 1.3.0) : libpng 1.2.50 : libtiff 4.0.3 : zlib 1.2.8 : libwebp 0.4.0 : libopenjp2 2.3.0
 Found AVX2
 Found AVX
 Found FMA
 Found SSE
 Found libarchive 3.1.2



Thanks


Zdenko Podobny

unread,
Jan 9, 2020, 2:52:37 AM1/9/20
to tesser...@googlegroups.com
Do you use model with legacy engine support?

Zdenko


št 9. 1. 2020 o 8:43 MATHANKUMAR m <mymai...@gmail.com> napísal(a):
--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/e87784bf-f688-42d4-a95a-1e55f6d91807%40googlegroups.com.

MATHANKUMAR m

unread,
Jan 9, 2020, 3:17:04 AM1/9/20
to tesseract-ocr
Actually,I do not know how to set up this legacy type. but in OEM 0 &1 got this error 

Error: Tesseract (legacy) engine requested, but components are not present in /usr/share/tesseract-ocr/4.00/tessdata/eng.traineddata!!


On Thursday, 9 January 2020 13:22:37 UTC+5:30, zdenop wrote:
Do you use model with legacy engine support?

Zdenko


št 9. 1. 2020 o 8:43 MATHANKUMAR m <mymai...@gmail.com> napísal(a):
Hi,

    In tesserct-ocr config method i did used OEM & PSM for extract the text from image. But during process i got an exception like below mentioned

 Error : "Error, unknown command line argument '-psm'"  
 
 Method tried:
  • using threw config variable
                       config_var = '--oem 3 --psm 6',
                       out = pytesseract.image_to_string(image,lang='eng',config=
config_var)
  •  using directly to the line
                       out pytesseract.image_to_string(image,lang='eng',config= '--oem 3 --psm 6')

   And also tried by replacing --psm into -psm .But it is not resolved.

   The OEM is working in --oem 3 & --oem 1, but using 0,2  i get result as, 

                         
Failed loading language 'eng' , Tesseract couldn't load any languages! .





--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesser...@googlegroups.com.

Zdenko Podobny

unread,
Jan 9, 2020, 3:39:32 AM1/9/20
to tesser...@googlegroups.com
Do you understand what it mean when you use --oem 0?

Zdenko


št 9. 1. 2020 o 9:17 MATHANKUMAR m <mymai...@gmail.com> napísal(a):
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/5afb9973-5b2f-4d4d-97f1-f44456d0d4ae%40googlegroups.com.

MATHANKUMAR m

unread,
Jan 9, 2020, 4:25:31 AM1/9/20
to tesseract-ocr
yeah i can see it from help command & understand the process little bit. but have any idea about legacy concepts. 

Zdenko Podobny

unread,
Jan 9, 2020, 5:46:33 AM1/9/20
to tesser...@googlegroups.com
So lets summarize it:
You asked tesseract to use legacy engine with some language model. tesseract failed.
Conclusion => you did not provided provided language model with legacy model.

Zdenko


št 9. 1. 2020 o 10:25 MATHANKUMAR m <mymai...@gmail.com> napísal(a):
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/479c80ed-6bad-422e-9820-a61bd49c3235%40googlegroups.com.

MATHANKUMAR m

unread,
Jan 13, 2020, 12:41:38 AM1/13/20
to tesser...@googlegroups.com
Sorry for the delay and yes i  did not provided provided language model with legacy model.And that is the matters i do need your help to know the legacy process methods.
Reply all
Reply to author
Forward
0 new messages