the difference between saving grayscale and RGB image in JPEG format

Say I have a three dimensional array 'A', contain an RGB image.
I 'imwrite' this array 'A' in JPG format, with quality = 100 (maximum), let's say it is saved in the name 'A.jpg'.
Then I 'imread' the picture 'A.jpg' and save it in 'A2' array.
If I 'imsubtract' array 'A' from 'A2', I can see from the result that their pixel's values are far different. Well not that far, but yeah they are different (in a range of 8 till 50 or so).

If I treat a grayscale image that way (from the 'imwrite' till the 'imsubtract' process) the difference won't be that far (just in a range of -1 til 1).

This does not happen in BMP, PNG, or TIF format. So I guess it's because of the JPEG compression effect.
But why the RGB image affected more?
Anybody can explain why?
Thank you very much...

Best regards
3/20/2010 3:20:05 PM
comp.soft-sys.matlab 211266 articles. 13 followers. lunamoonmoon (258) is leader. Post Follow

0 Replies

Similar Articles

[PageSpeed] 23