Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100509
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2015-12-16 06:21 -0800 |
| References | <b16c8f76-2ca7-4662-aec2-d0fcf3a0ec31@googlegroups.com> <n4rrl4$8o2$2@dont-email.me> |
| Message-ID | <424a0169-fe5b-4650-9673-46d265290c30@googlegroups.com> (permalink) |
| Subject | Re: Why my image is in bad quality ? |
| From | fsn761304@gmail.com |
On Wednesday, December 16, 2015 at 6:18:00 PM UTC+4, Denis McMahon wrote:
> On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote:
>
> > I'm trying to make OCR-recognition on a screenshot, after screenshot
> > taken it goes to pibxbuffer, which content goes to pytesseract.
> > But after using pixbuffer image quality is bad
>
> > image = image.resize((width*20,height*20), Image.ANTIALIAS)
>
> This appears to attempt to extrapolate 400 pixels from each pixel in the
> original image.
>
> That only works on TV crime dramas, you can't do it in real life.
>
> --
> Denis McMahon, denismfmcmahon@gmail.com
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))
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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