Reference no: EM132401424
EECS138 MATLAB Programming Project Assignment -
AIM: Create a sample Photoshop-like Script in MATLAB for a User to select how to manipulate their Image.
INTRODUCTION: One of the secrets of removing noise in your old photograph is to smoothen the image. But how on earth would professional photographers do that in their lab? How do they get rid of those noisy pixels in the given digital image? Well brace yourself, this is what we will exactly do this in our project.
Let me guide you through some of the functions in MATLAB that are useful for implementing this project. Start with a beautiful color image of your choice. The following piece of code will load the image to your MATLAB environment. Make sure your MATLAB path is set to the directory where your image is.
Img = imread('BeautifulImage.jpg'); % Name of your image to the string name
MATLAB creates three dimensional vector to store a color image. This is because each pixel in an image has RED, GREEN, BLUE channel values. Hence, if the total size of the image is (row x columns) and each pixel has 3 values, the total size of the image would be (rows x columns x 3). To see the size of the image use MATLAB size function and to display the image in MATLAB use figure and imshow function as shown below.
[rows, columns, channels] = size(Img); figure(1); imshow(Img);
We are familiar with dealing with 2D matrices. So, convert the image to a gray scale image. MATLAB function to convert a color image to a gray scale image is rgb2gray. Also convert the image to double.
grayImg = rgb2gray(Img); grayImgDouble = im2double(grayImg); figure,
imshow(grayImgDouble);
Functions that will be useful in this project:
- Imrotate
- Entropyfilt
- Strel
- Imadjust
- Stretchlim
- Assert
- Isequal
- Imcomplement
- fliplr
YOUR TASK: Create a Script file that takes one input from a user & performs the Photoshop-like function to the image. If the user selects a choice that is not listed in the options, display "Not a valid option. Run Program again and choose between Options 1-5." Provide at least 5 options for the user to choose from. They do not have to be the same options that I have listed below. In fact, designing your own unique code is encouraged.
NOTE: The options should be complex options. NOT just flipping the photo on its side.
Attachment:- Programming Project Assignment File.rar