Re: Calculating JPEG compression ratio?



On 2008-04-18 02:28:29 -0400, Thomas Richter <thor@xxxxxxxxxxxxxxxxx> said:

James Sumners schrieb:
I'm working on a paper in which I want to compare compressing an image
with JPEG and with the Haar wavelet. My focus is on the Haar wavelet,
and to that end I have written an application to read a grayscale TIFF,
apply the DWT, and calculate the compression ratio. I calculate the
compression ratio by dividing the number of nonzero entries in the
original image matrix by the number of nonzero entries in the compressed
image matrix.

Hmm. That's a strange definition of compression factor. I would rather
define it as the number of bits spent on average per pixel, computed on
the compressed result.

Why is that strange? If each integer pixel representation is 1 byte, then the nonzero entries make up the actual data to be stored.


Since JPEG is not the focus of my paper, and I am only using it for
comparison, I want to be able to do the same thing with the JPEG
compressed image without writing my own JPEG encoder. Does anyone know
of an open source, or at least free for educational use, tool for doing
this?

Sure enough. The IJG offers free C code.

http://www.ijg.org/

So long,
Thomas

Thank you.

I finally heard back from the DCT Lab toolbox author and can now export the compressed image matrix from the toolbox to the general Matlab workspace. This lets me perform the same calculation as I do with my wavelet program.


.



Relevant Pages

  • Re: Calculating JPEG compression ratio?
    ... with JPEG and with the Haar wavelet. ... and calculate the compression ratio. ... original image matrix by the number of nonzero entries in the compressed ... I wouldn't have even bothered with the JPEG portion if my advisor didn't insist on it. ...
    (comp.compression)
  • Re: Calculating JPEG compression ratio?
    ... with JPEG and with the Haar wavelet. ... and calculate the compression ratio. ... original image matrix by the number of nonzero entries in the compressed ... I want to be able to do the same thing with the JPEG ...
    (comp.compression)
  • Re: Calculating JPEG compression ratio?
    ... with JPEG and with the Haar wavelet. ... and calculate the compression ratio. ... original image matrix by the number of nonzero entries in the compressed ...
    (comp.compression)
  • Calculating JPEG compression ratio?
    ... I'm working on a paper in which I want to compare compressing an image with JPEG and with the Haar wavelet. ... My focus is on the Haar wavelet, and to that end I have written an application to read a grayscale TIFF, apply the DWT, and calculate the compression ratio. ... Since JPEG is not the focus of my paper, and I am only using it for comparison, I want to be able to do the same thing with the JPEG compressed image without writing my own JPEG encoder. ...
    (comp.compression)
  • Re: OT: Early Fall
    ... Since you are not processing the jpg and then saving the file, the compression and decompression will not introduce noise into the photo. ... TIFF pictures store a single raster image at any color depth. ... Not all TIFF files are compatible with all programs that support the baseline TIFF standard. ... JPEG pictures store a single raster image in 24-bit color. ...
    (rec.boats)