Hi to everybody!
I am doing some personal research on image forensics and I implemented a small program to extract JPEG Quantization Tables and estimate the image quality using standard libjpeg reference (in a way similar to Forensically webapp [https://29a.ch/2017/02/05/jpeg-forensics-in-forensically/ (https://29a.ch/2017/02/05/jpeg-forensics-in-forensically/)]).
I successfully used -htmldump to inspect header structure, but I am wondering if EXIFTOOL has an option to directly recover Luminance and Chrominance QT from a JPEG file... is there an option that I am missing?
Thanks,
best regards
Hi Guido,
There are a couple of Extra tags (https://exiftool.org/TagNames/Extra.html) which may interest you. Take a look at JPEGQualityEstimate and maybe JPEGDigest.
- Phil
Ok, I did not know about them!
JPEGQualityEstimate is working fine, the quality level is almost identical to the output of my test program, however JPEGDigest only computes an MD5 digest, but does not extract actual QTs. If you plan to insert this feature into future ExifTool version, please let me know and I can provide you my C code for QT extraction, is pretty fast and overcomes some bugs in the original HackerFactor code ;)
Thanks for the informations,
Best regards
Hi Guido,
Exactly how/why would you want to extract the QT's. The JPEGDigest computes a digest of them to allow some sort of identification, but beyond that I don't know what would be useful.
- Phil
Hi Phil,
I'm working for a digital image forensic project and I'm implementing some algorithms for detecting forgeries.
Some methods rely on identifying image source by comparing QTs with a knowledge base (in that case JPEGDigest is very useful), but sometimes JPEG images are not compressed with standard QT (base JPEG values scaled with a fixed factor), but they have non-standard values resulting from ad-hoc optimization tailored for the actual image content.
Some example are
JPEGmini,
TinyPNG,
MozJpeg and
DCTune, that analyze perceptual quality to find QTs with best compromise between visual distortion and file size. The resulting QTs are almost unique and it is difficult to find exact correspondence in a database or previous examples.
Here are some links to scientific papers on this matter:
- http://spie.org/Publications/Proceedings/Paper/10.1117/12.872230 (http://spie.org/Publications/Proceedings/Paper/10.1117/12.872230)
- http://spie.org/Publications/Proceedings/Paper/10.1117/12.872231 (http://spie.org/Publications/Proceedings/Paper/10.1117/12.872231)
- http://ieeexplore.ieee.org/document/6189990/ (http://ieeexplore.ieee.org/document/6189990/)
Cheers