Re: Detecting JPEG quantization/requantization.




"Pete Fraser" <pfraser@xxxxxxxxx> wrote in message
news:7d2f7$4644c2ba$436596d7$31472@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm looking for an application that will tell me if an
uncompressed image has been jpeg compressed
previously, or if a jpeg image had been previously
compressed with a different quantizing table.

It would be an added bonus if the application could
suggest what tables had been used.

Before I start cataloging holes in coefficient
histograms, I thought I'd check if somebody
has done this already.

Any ideas?


dunno about apps, but have a few algo ideas.

sadly, there is a problem:
jpeg encoders/decoders are not necissarily deterministic, and may thus have
slightly different rounding behavior.

unless one can make the app exactly match the rounding behavior of the
decoder, this may not be possible.

now, assuming this were done, we would simply go through the first few steps
of encoding (as close to possible re-creating, but inversing, the behavor of
the decoder).

then we look at the recreated blocks/coefficients, noting how much we can
divide any particular coefficient before we get any remainders (this likely
giving the quantization value in use).

likewise, if these steps are anything non-trivial, we can assume that the
image was compressed.


this fails though if the conversions are not sufficiently exact, in which
case, we will get noise in the low-bits of the coefficients, and thus no
usable divisors will be found.


another simpler and more robust also may be to implement a filter which
looks for JPEG-style artifacts (does not simulate encoding, instead working
on the pixels themselves).

a simple example would be to measure the average delta between any adjacent
intra-block pixels, and the average delta between pairs of pixels laying in
adjacent blocks.

if there is any significant difference, we can assume that the image was
compressed with jpeg (or similar). potentially this way we can detect
artifacting which is far lower than is normally perceptible to a human user.

potentially, using this difference, it may be possible to make a guess as to
the "quality" used when compressing the image.

(other hueristics could be employed as well, such as looking for certain
noise patterns, ...).

....


Thanks.



.



Relevant Pages

  • Re: Humans "unique" social
    ... > advantage of JPEG over GIF?". ... image into colored pixels before compressing the image." ...
    (sci.bio.evolution)
  • Re: Smith Micro granted lossless re-compression patent
    ...  Input is jpeg, output is a compressed JPEG - with no loss, ... Yeah, but you're not compressing a JPEG, you're partially decoding it, ... images provided you performed a DCT yourself. ... My point is you're basically a 80% JPEG codec with a different entropy ...
    (comp.compression)
  • Photo Story 3 Image quality
    ... I saved a PowerPoint presentation as jpeg. ... Then I added these images to a ... slide show. ... I tried compressing the pictures ...
    (microsoft.public.windowsxp.photos)
  • Re: 720 and 1080i?
    ... Real 1080/30i(1080 lines of 1920 pixels each delivered every 1/30th of a second, 540 at a time), takes more bps to deliver than 720P. ... If after compressing the hell out of both you come up with comparable bit rates, it is because you beat up 1080/30i a lot more than you would 720P. ... It is twice as hard to compress 1080i than 720P and you produce gobs more artifacts to fit it into 19.34 Mbps. ... In the context of delivering the best image within the constraints of a 19.34 Mbps channel it is a no brainer, ...
    (alt.tv.tech.hdtv)
  • Re: 720 and 1080i?
    ... Real 1080/30i(1080 lines of 1920 pixels each delivered every 1/30th of a second, 540 at a time), takes more bps to deliver than 720P. ... If after compressing the hell out of both you come up with comparable bit rates, it is because you beat up 1080/30i a lot more than you would 720P. ... It is twice as hard to compress 1080i than 720P and you produce gobs more artifacts to fit it into 19.34 Mbps. ... In the context of delivering the best image within the constraints of a 19.34 Mbps channel it is a no brainer, ...
    (alt.tv.tech.hdtv)