Digital Image Processing

Course Nos. ECE.09.452 and ECE.09.552


Introduction to the Matlab Image Processing Toolbox

Basics


Types of Images in Matlab

For this class, will use the following three image types:

  1. RGB or True-Color Images: There are three matrices associated with a true-color image of size M x N - the Red matrix, the Green Matrix and the Blue matrix, each of size M x N. Typically, each of these matrices contain values between 1 and 256; 1 indicating the least intensity and 256 the highest for each of the colors. The three matrices are combined into a single M x N x 3 multidimensional matrix with 3 planes - the R plane, the G plane and the B plane.
  2. Indexed Images: Although indexed images are used for displaying color images, we shall use them for displaying gray-level images. There are two matrices associated with an indexed image of size M x N to be diplayed using G gray levels:

An image matrix element with a value of, say 5, will be displayed with the graylevel corresponding to the 5th row of the colormap matrix.

  1. Intensity Images: These are the actual graylevel images. There is only one matrix, the image matrix, but the elements of the matrix must have values between zero and 1 only.
  2. Binary Images: Again, only one image matrix with elements being 1 or 0.

Importing and Exporting Image Files


>> [x,map] = imread('filename.fmt', 'fmt');
where fmt refers to an image file format such as jpeg, pcx, etc.
Then, matrix [x] will contain the intensity information and matrix [map] the colormap information.


>> imwrite(x, map, 'filename.fmt');


Conversions between Different Image Types




Displaying Different Types of Images


>> imshow(x, map);


>> imshow(x, G);


>> imshow(x, 2);


Pre-Lab Assignment

>> imread, >> imshow and >> imwrite commands.

>> rgb2gray, >> imshow and >> imwrite commands.

>> mat2gray, >> imshow and >> imwrite commands.

>> im2bw, >> imshow and >> imwrite commands.

>> mat2gray, >> imshow and >> imwrite commands.

>> mat2gray, >> imshow and >> save and >> load commands.

Instructor 

Schedule

Textbook 

Tutorials/Demos

Grading 

Homepage