CSE/EE 485:  Digital Image Processing I

Computer Project Report # : Project 0

Effects of Spatial Resolution Changes on Quantization on Gray Level Images

Group #4: Isaac Gerg, Pushkar Durve

Date: September 18, 2003


A.  Objectives:
  1. Become familiar with commonly used Matlab Image Processing Tools in the image processing toolbox.
  2. Implementing the reading and writing of images in different file formats.
  3. Resize images using the IMRESIZE function.
  4. Study the effects of spatial resolution changes on gray level images.
  5. Study the effects of quantization on gray level images.
  6. Become familiar with colormaps and their affects on gray level images. (via COLORMAP function)

 

B. Methods:
There are five parts to the program, project0.m

1. Reading in lenna.gif using the IMREAD function.
2. Resizing lenna.gif to 512 X 512 via IMRESIZE function.
3. Experimentation of COLORMAP function via IMAGE function.
4. Spatial resolution changes performed on lenna.gif utilizing the IMRESIZE function.
5. Effects of quantization utilizing the GRAY2IND and IND2GRAY functions as well as a color map.

All image objects were written using the IMWRITE function.

Executing project0.m from Matlab

At the command prompt enter:

>>project0

 

C. Results:

Image file names in parentheses.


Outlined following program format described in the Methods section


Figure 1: Original image (lenna.gif)

Part 2

lenna.gif is a 256 x 256 8-bit intensity image. It was resized to 512 x 512. This resulted in a slightly chattery image that was twice as large as the original. This extra noise is a result of changing the spatial resolution to one greater than the original image without providing extra information to correctly interpolate the pixel intensities of the larger image.


Figure 2: lenna.gif scaled to 512x512 (gerg_durve.jpg)

 

Part 3

The image object was outputted using the IMAGE command. Then, the color space was changed to a predefined color space contained in Matlab called 'gray'. By inspection, we could determine that this image function was performed correctly.

Execute Matlab Code to View Outputted Image Object

Part 4

The created images have a physical resolution of 256x256. However they only contain information for 128x128, 64x64, & 32x32 physical images. As the spatial resolution decreased, the ability to distinguish detail in the image also decreased. This was expected because as the number of data points in the image matrix decrease we loose information about the image.

Figure 3: lenna.gif resolved to 128x128 (gerg_durve_128.jpg)

Figure 4: lenna.gif resolved to 64x64 (gerg_durve_64.jpg)

Figure 5: lenna.gif resolved to 32x32 (gerg_durve_32.jpg)

Part 5

Different quantization levels were utilized. They were 8, 6, 4, 2, & 1 bits. These quantization transformations yielded false contouring of the outputted images. This was exceptionally noticeable in the 4 bit and lower quantifications. This was expected as the number of quantization levels decrease we expect to see a decrease in the number of represented intensities able to be produced.

Figure 6: lenna.gif with 2^8 levels of quantization. (lenna_8.jpg) Figure 7: lenna.gif with 2^6 levels of quantization. (lenna_6.jpg)
Figure 8: lenna.gif with 2^4 levels of quantization. (lenna_4.jpg) Figure 9: lenna.gif with 2^2 levels of quantization. (lenna_2.jpg)
Figure 10: lenna.gif with 2^1 levels of quantization. (lenna_1.jpg)

All results were as expected in the experiment. No human noticeable clock time was realized in performing the above operations.

 

D. Conclusions:
Spatial resolution changes affect the amount of visible detail available to humans from an image. When a source image's spatial resolution is made larger than the original image and no further information is provided to interpolate pixel value, detail is lost.

Quantization level changes affect the amount of represented intensities visible to humans. When a source image's quantization level's are decreased, the number of represented light intensities is decreased. When a source image's quantization level is increased from the original no noticeable changes will result as the original color space is now a subset of the new, larger color space.

Matlab is an excellent tool to perform high level operations on intensity and indexed images. Matlab is preferred over C, C++ because of the portable and tractable image manipulation toolbox and vector operations.
   
E. Appendix:

project0.m source code.