Reading in image data


First, we need to load in the original image and the distorted image before we can compare their visible differences. For now we assume the image data are in RGB format, and will be viewed on a particular CRT screen. The RGB images can be in whatever format that Matlab can read in. Suppose we have them in TIFF format, then the Matlab calls to read them in are:

Under Matlab version 5:

[rgbHats] = imread('images/hats.tiff', 'tiff');
[rgbHatsc] = imread('images/hatsCompressed.tiff', 'tiff');
Under Matlab version 4:
[rHats gHats bHats] = tiffread('images/hats.tiff');
[rHatsc gHatsc bHatsc] = tiffread('images/hatsCompressed.tiff');
rgbHats = [rHats gHats bHats];
rgbHatsc = [rHatsc gHatsc bHatsc];
The variables "rgbHats" and "rgbHatsc" contain the R,G,and B information of the original and the compressed version of the image "hats".

hats images hatsCompressed image
hats hatsCompressed

After the above images are loaded, some calibration information needs to be prepared in the next step.


© Xuemei Zhang