Introduction to MATLAB Image Processing Tool Box
MATLAB Image Processing ToolboxTM provides a comprehensive set of reference-standard algorithms, functions, and apps for image processing, analysis, visualization, and algorithm development.
Group 1: imcrop; imresize; imrotate; imadd; imdivide; immultiply; imsubtract
Group 2: imclose; imdilate; imerode; imfill; imopen; bwmorph; imadjust
1. In the ‘Introduction’ section, you need to write:
a. What is image processing? Why are image processing techniques used?
b. Give an example of the image processing used in an industrial/daily life application.
Details are required with minimum 100 words.
2. Use at least FOUR functions listed above ( two from Group 1 and two from Group 2) to process ONE image from Test Images and create an artwork. You can use extra functions or add other images with proper reference.
The assessment is based on report writing and the complexity of using the functions. An example is shown below.
(Example images attached)
MATLAB Help, [login to view URL]
Next task: questions
Q1: Write MATLAB code to achieve the results shown on the class screen. Follow the instructions:
1. Create lab1.m file on your desktop.
2. Read [login to view URL] into variable LenaGray and read [login to view URL] into variable LenaTrue.
3. Display in subplots.
4. Write LenaGray and LenaTrue into JPG format and store in the same folder as the original files.
Q2:Continue Q1, type whos in command window, explain each column.
Q3: How many image types are used by MATLAB? Use your own words to explain how these image types
are stored in MATLAB.
Q4: Explain the differences (advantages and disadvantages) among imshow, image and imtool for
Q5: Continue Q1, convert LenaGray and LenaTrue into indexed images and show the converted images
using only one figure (use the subplot utility). List your MATLAB code.
Q6: Explain why images cannot be displayed correctly in Q5.
Q7: Explain the use of the function imopen and imsubstract in the following code:
rice = imread('[login to view URL]');
background = imopen(rice, strel('disk', 15));
rice2 = imsubtract(rice, background);
Q8: Write a function to enlarge the image size by a factor of power of 2 using pixel replication. The
function should use image filename and resizing factor as input parameters. For example, factor = 2;
imenlarge('filename', factor). Do not use MATLAB function imresize.
Q9: List your MATLAB code for diagonal flipping of LenaGray.
Q10: List your MATLAB code for diagonal flipping of LenaGray using a method different from Q9.