Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100518

Re: Why my image is in bad quality ?

Newsgroups comp.lang.python
Date 2015-12-16 08:33 -0800
References <b16c8f76-2ca7-4662-aec2-d0fcf3a0ec31@googlegroups.com> <n4rrl4$8o2$2@dont-email.me> <424a0169-fe5b-4650-9673-46d265290c30@googlegroups.com> <mailman.10.1450276418.30845.python-list@python.org>
Message-ID <94c84373-db80-43cd-a705-a89e695e140a@googlegroups.com> (permalink)
Subject Re: Why my image is in bad quality ?
From fsn761304@gmail.com

Show all headers | View raw


On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote:
> On Thu, Dec 17, 2015 at 1:21 AM,  <fsn761304@gmail.com> wrote:
> > I tried also another code (see below) and without scaling by 20 quality of recognition was very bad.
> >
> > from pytesseract import image_to_string
> > from PIL import Image
> >
> > im = Image.open("screen.png")
> > print(im)
> > im = im.resize((214*20,26*20), Image.ANTIALIAS)
> > print(image_to_string(im))
> 
> If you need to scale by 20x20 to get the text recognition to work, I
> would recommend using something other than an anti-alias filter. Omit
> the second argument to use a simpler algorithm; you'll get a blocky
> result, which might parse more cleanly for you.
> 
> ChrisA

It didn't help to recognize words, the main problem is that image is inclined to the left, like backslash.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-16 06:04 -0800
  Re: Why my image is in bad quality ? Denis McMahon <denismfmcmahon@gmail.com> - 2015-12-16 14:15 +0000
    Re: Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-16 06:21 -0800
      Re: Why my image is in bad quality ? Chris Angelico <rosuav@gmail.com> - 2015-12-17 01:33 +1100
        Re: Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-16 08:33 -0800
          Re: Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-16 08:35 -0800
          Re: Why my image is in bad quality ? Chris Angelico <rosuav@gmail.com> - 2015-12-17 03:41 +1100
            Re: Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-16 09:01 -0800
              Re: Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-16 09:17 -0800
                Re: Why my image is in bad quality ? BartC <bc@freeuk.com> - 2015-12-16 21:36 +0000
                Re: Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-16 13:53 -0800
                Re: Why my image is in bad quality ? BartC <bc@freeuk.com> - 2015-12-16 23:20 +0000
  Re: Why my image is in bad quality ? Nobody <nobody@nowhere.invalid> - 2015-12-17 01:27 +0000
    Re: Why my image is in bad quality ? fsn761304@gmail.com - 2015-12-17 03:31 -0800

csiph-web