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


Groups > comp.compression > #203

removing predictable crap from poor quality jpegs

From Phil Carmody <thefatphil_demunged@yahoo.co.uk>
Newsgroups comp.compression
Subject removing predictable crap from poor quality jpegs
Date 2011-05-03 13:32 +0300
Organization A noiseless patient Spider
Message-ID <877ha8xeex.fsf@bazspaz.fatphil.org> (permalink)

Show all headers | View raw


I have a bunch of images - mostly newspaper image scans - which have
been turned into noise by scanning/jpeg-compressing. Random noise I
don't care about, but these are showing horrific chess-boarding. 
Here's a zoomed example.

http://fatphil.org/images/crappyjpg.jpg

Is there any simple fix to remove the chessboarding? It seems obvious
that the chessboarding is the (8,8) coefficient in the DCT, so perhaps
I just need to strip all non-zero (8,8) coefficients from the file. Is
there a utility that can do that? One that otherwise doesn't change
the file would be best.

One idea was to use jpegtran -scale 7/8 | jpegtran -scale 8/7 to 
just remove all of the (x,8) and (8,y) coefficients. Which is more
than I need, but probably causes no losses of other frequencies that
I would object to. Can anyone see any downsides to that? (The results
look like an improvement to me.)

On an 'implementation' note, it does look like that noise is a
programmatic error in the original jpeg compression code (I have no
idea what created it) rather than some horrific scanner/scaling/aliasing 
artefact. I'm guessing that there was an unsigned integer underflow 
which tried to put -1 in the (8,8) coefficient and instead put 255 there,
so when it was scaled down in the quantizing step, it survived.
Have such bugs been known to exist in any common libraries?

Phil
-- 
"At least you know where you are with Microsoft."
"True. I just wish I'd brought a paddle." -- Matthew Vernon

Back to comp.compression | Previous | NextNext in thread | Find similar | Unroll thread


Thread

removing predictable crap from poor quality jpegs Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-03 13:32 +0300
  Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-03 13:53 +0200
    Re: removing predictable crap from poor quality jpegs Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-03 16:09 +0100
      Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-03 18:10 +0200
        Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-03 18:32 +0200
  Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-03 06:22 -0700
    Re: removing predictable crap from poor quality jpegs Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-03 18:03 +0300
      Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-05 04:18 -0700
        Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-05 13:35 +0200
          Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-06 00:23 -0700
            Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-06 14:24 +0200
              Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-06 20:33 +0200
                Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-08 09:52 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-08 15:27 +0200
                Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-08 17:55 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-08 07:56 -0700
                Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-08 18:44 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-08 10:21 -0700
                Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-09 10:51 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-09 11:49 +0200
                Re: removing predictable crap from poor quality jpegs human <noreply@elfavo.com> - 2011-05-09 12:06 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-09 15:29 +0200
                Re: removing predictable crap from poor quality jpegs Guido Vollbeding <gv@uc.ag> - 2011-05-09 16:03 +0200
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-09 22:01 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-09 23:24 +0200
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-10 16:45 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-09 04:15 -0700
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-09 14:26 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-09 15:51 +0200
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-09 21:09 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-09 22:28 +0200
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-09 23:06 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-10 17:34 +0200
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-12 15:01 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-09 09:40 -0700
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-09 20:23 +0200
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-09 22:37 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-10 02:27 -0700
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-10 05:01 -0700
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-12 15:51 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-13 05:07 -0700
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-13 14:39 +0200
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-13 15:39 +0200
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-13 16:36 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-13 08:52 -0700
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-13 19:00 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-13 10:07 -0700
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-13 17:25 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-13 10:06 -0700
                Re: removing predictable crap from poor quality jpegs Pete Fraser <pfraser@covad.net> - 2011-05-13 18:17 -0700
                Re: removing predictable crap from poor quality jpegs Guido Vollbeding <guido@jpegclub.org> - 2011-05-14 09:16 +0200
                Re: removing predictable crap from poor quality jpegs Guido Vollbeding <guido@jpegclub.org> - 2011-05-14 10:07 +0200
                Re: removing predictable crap from poor quality jpegs Guido Vollbeding <guido@jpegclub.org> - 2011-05-14 19:52 +0200
                Re: removing predictable crap from poor quality jpegs Guido Vollbeding <guido@jpegclub.org> - 2011-05-14 21:08 +0200
                Re: removing predictable crap from poor quality jpegs Guido Vollbeding <guido@jpegclub.org> - 2011-05-16 08:43 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-16 05:15 -0700
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-16 17:00 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-16 13:02 -0700
                Re: removing predictable crap from poor quality jpegs Thomas Richter <thor@math.tu-berlin.de> - 2011-05-17 09:43 +0200
                Re: removing predictable crap from poor quality jpegs Sebastian <s.gesemann@gmail.com> - 2011-05-19 02:55 -0700
                Re: removing predictable crap from poor quality jpegs Noob <root@127.0.0.1> - 2011-05-20 13:23 +0200
                Re: removing predictable crap from poor quality jpegs Pete Fraser <pfraser@covad.net> - 2011-05-20 05:38 -0700
                Re: removing predictable crap from poor quality jpegs human <noreplay@elfavo.com> - 2011-05-12 20:15 +0200

csiph-web