Re: Detecting JPEG quantization/requantization.
- From: "cr88192" <cr88192@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 12 May 2007 07:47:04 +1000
"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.
.
- References:
- Detecting JPEG quantization/requantization.
- From: Pete Fraser
- Detecting JPEG quantization/requantization.
- Prev by Date: Re: IJG Jpeglib Input format
- Next by Date: Re: Detecting JPEG quantization/requantization.
- Previous by thread: Detecting JPEG quantization/requantization.
- Next by thread: Re: Detecting JPEG quantization/requantization.
- Index(es):
Relevant Pages
|