DSPRelated.com
Forums

Quality of a compression.

Started by rukmanimohan04 March 28, 2005
Hi,
I want to know how are the images qualified after compression ?
That is, How are they given 100% ,90% 80% and so on.... as quality?
When we consider the 2d dct image compression in matlab image
processing toolbox demo is it right to consider the quality of the
compressed images based on the number of coefficients included?
KIndly clear my doubt...
waiting for reply,
regds,
rukmani.



Hi Rukmani,

you can determine the quality of your images when you are writing them...
For example;

IMG is your image matrix...
example.* is your file name FOR JPG FILES
imwrite(IMG,'example.jpg','jpg','Quality',100);

FOR TIFF FILES
imwrite(IMG,'example.jpg','tiff','Compression','none');

I'm not sure but you can't determine compression in other formats I think...
U can find more info in help, or in web site of Mathworks...

_________________________________________________________________
Spam filtresi ile virlere karsi en genilir koruma, MSN PC Koruma'dan
ger. http://www.msn.com.tr/security/



Rukmani,

There are many different ways in which we can quantify the quality of
the image. When I used to play with images, I remember using MSE (mean
quare error) as one of the criteria. I am quite rusty on the method ..
all I remember is that we used to reconstruct the image back after
taking 2D DCT.. and then sum the square of difference between original
image and reconstructed image (pixel wise). Then convert it to dB and
say that is the total loss in quality. I am not sure whether this is a
standard procedure or not.

And compression is simply the ratio of size of the two images.

For more info .. and certain mathematical equations u can refer to
http://www-ee.uta.edu/dip/Courses/EE5356/project4.pdf Hope this helps
Tarang On Mon, 28 Mar 2005 15:51:53 -0000, rukmanimohan04
<rukmanimohan04@rukm...> wrote:
> Hi,
> I want to know how are the images qualified after compression ?
> That is, How are they given 100% ,90% 80% and so on.... as quality?
> When we consider the 2d dct image compression in matlab image
> processing toolbox demo is it right to consider the quality of the
> compressed images based on the number of coefficients included?
> KIndly clear my doubt...
> waiting for reply,
> regds,
> rukmani. > To