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


Groups > comp.lang.python > #100539

Re: Why my image is in bad quality ?

From BartC <bc@freeuk.com>
Newsgroups comp.lang.python
Subject Re: Why my image is in bad quality ?
Date 2015-12-16 23:20 +0000
Organization A noiseless patient Spider
Message-ID <n4srh1$kv$1@dont-email.me> (permalink)
References (5 earlier) <mailman.16.1450284070.30845.python-list@python.org> <0f56d024-0193-4d28-97ac-7d71c806f379@googlegroups.com> <f21c3910-11d4-4d22-88f8-55940141bbca@googlegroups.com> <n4slc7$6gp$1@dont-email.me> <2c67af3c-6954-4398-81c8-0459025bc5c7@googlegroups.com>

Show all headers | View raw


On 16/12/2015 21:53, fsn761304@gmail.com wrote:
> On Thursday, December 17, 2015 at 1:36:55 AM UTC+4, BartC wrote:

>> You need to test step by step to see at what point it goes wrong. You're
>> scaling by 20 (which is a massive amount); what happens when scaling by
>> 1? And anti-alias is turned off? (Which might let you see by how many
>> pixels each successive line is out and could give a clue.)
>>
>> It does seem as though something is going amiss with recognising the
>> image dimensions, or you've inadvertently applied a 'shear' or 'slant'
>> transformation. (Maybe you can apply a reverse transform to fix it!)
>>
>> --
>> Bartc
>
> Original size: 150x30
> Original image the same, but without skew (usual upright letters).
> When scaling by less than 20 recognition quality is bad (in another code, which doesn't use buffer, screenshot, but loads image from a directory).
> Antialias makes no difference.
> Shear, slant - ok, show me how.

I've played with a 150x30 reduced image. The best I can do is apply a 
shift that makes the letters slant the other way, but at only half the 
angle. Trying to get them upright makes them wobbly. (I did this with 
some code - not Python - that read each pixel and stored it at a shifted 
position. But this is because I'm not familiar with manipulation programs.)

So whatever's gone wrong might be more complex. You should forget about 
recognition quality, and find out what it is that's applying the skew 
(another name for shear or slant). That seems to be being applied before 
the scaling, which is giving the 'steps' in the sloping edges.

-- 
Bartc

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