Why the same data yielding different values?

Code:
abc=reshape( rate, size(CoverImage));
imageasbytes = typecast(abc(:), 'uint8');
imwrite(abc, 'exchan.jpg');
ss=imread('exchan.jpg');
imageasbytes2 = typecast(ss(:), 'uint8');
Both
imageasbytes2 and imageasbytes are giving different values inspite of the fact that I wrote that data ;
when i read the same file, values changed.
Why are they giving different values??

Antworten (1)

Walter Roberson
Walter Roberson am 21 Apr. 2013

1 Stimme

The JPEG image format uses lossy compression unless you specifically ask for lossless compression.

Kategorien

Mehr zu Denoising and Compression finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 21 Apr. 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by