Tuesday, January 27, 2009

Precise compression?

This weekend, I raised a question to the Photoshop 3 students at the Art Center College of Design in Pasadena. I asked what the various compression setting meant when saving out JPEGs in Photoshop.

Just how much compression is a "12?" What about "10?" What do you do if you need a specific compression, like 95% or 75%?

Answer: MATLAB

FYI, the default compression quality in MATLAB is 75%. Writing a file out to an image using the imwrite command, specify ... 'compression', '95') or ... 'compression', '75') or any value for that matter. The cool thing about using MATLAB is that you can control the compression precisely. You can also use the 'resolution' variable to specify an output resolution. For example, ... 'resolution', '240').

When you really need control, you'll need MATLAB.

But we don't compress in forensics, right? Compression = loss. Loss is bad, right? Yes, that's right ... for the most part. Some readers have tried to duplicate Dr. Farid's "ghosting" technique (authentication / detection of forgeries) using just Photoshop ... and they can't pull it off. Why not? You need to control, precisely, the compression of the images that you generate as part of the process. In short, you'll need MATLAB.

What's more, you can control Photoshop directly from within the MATLAB interface.

Everything MATLAB and Photoshop need to work together has been installed with Photoshop. That MATLAB folder that sits quietly in your Photoshop folder contains a lot of hidden power. Get your hands on a copy of MATLAB and you'll see for yourself.

No comments: