Python Forum
help with pytesseract.image_to_string(savedImage, config='--psm 11')iamge to string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with pytesseract.image_to_string(savedImage, config='--psm 11')iamge to string
#1
i didn;t understand something in the
pytesseract.image_to_string(savedImage, config='--psm 11')
in the config
what does
config='--psm 11'
mean?

I thought that its the max numbers it will "read"

but when I take a simple image with 4 numbers(1 2 3 4 )
when psm 5
I get N
when psm 9
I get Z
4,6-8,11-13 I get the numners
1 2 3 4
psm 14 - I get error no such file


what did I missing?



*** found this
maybe this will help someone

Page segmentation modes:
0 Orientation and script detection (OSD) only.
1 Automatic page segmentation with OSD.
2 Automatic page segmentation, but no OSD, or OCR.
3 Fully automatic page segmentation, but no OSD. (Default)
4 Assume a single column of text of variable sizes.
5 Assume a single uniform block of vertically aligned text.
6 Assume a single uniform block of text.
7 Treat the image as a single text line.
8 Treat the image as a single word.
9 Treat the image as a single word in a circle.
10 Treat the image as a single character.
11 Sparse text. Find as much text as possible in no particular order.
12 Sparse text with OSD.
13 Raw line. Treat the image as a single text line,
bypassing hacks that are Tesseract-specific.
Thanks,
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Updating a config file [solved] ebolisa 8 2,448 Nov-04-2021, 10:20 AM
Last Post: Gribouillis
  Is there a library for recursive object creation using config objects johsmi96 0 1,789 May-03-2021, 08:09 PM
Last Post: johsmi96
  Help with CV2 pytesseract detcet numbers korenron 0 1,423 Apr-29-2021, 02:48 PM
Last Post: korenron
  Config file update Olivier74 0 1,406 Aug-18-2020, 03:36 PM
Last Post: Olivier74
  What is the best way to set application-wide config values? ajorona 1 1,820 May-07-2020, 05:03 PM
Last Post: buran
  Config file entry as list versus string? taziuk 2 1,734 Apr-25-2020, 12:01 PM
Last Post: ndc85430
  PYTesseract Problem gw1500se 2 3,025 Mar-26-2020, 02:11 PM
Last Post: gw1500se
  Error when executing pytesseract to get the text from image bvdinesh 3 17,548 Oct-19-2019, 05:01 PM
Last Post: cwco00
  logging: child module unable to get parent config jerryxiao 3 3,227 Apr-09-2019, 04:17 AM
Last Post: jerryxiao
  Configure a logging.config ytigiev 0 1,804 Feb-15-2019, 06:06 AM
Last Post: ytigiev

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020