MathLab Plotting

  1. Take or find a digital image and save it to your local machine. Load the image in MATLAB/Octave by using the imread() function, ie: image = imread(‘pathToImage\selfie.jpg’); See the script on the Basic Image Processing page to see an example.

  2. Create a new image called “grayImage” and store in it a version of the original image, but in gray scale (black and white). To convert, use the command grayImage = rgb2gray(image);

  3. Create a cropped image called “croppedImage.” To perform the cropping, compute 10% of the original x and y dimensions and take that amount of pixels off the left, right, top and bottom. Remember, you should not be modifying your original image, but just copy over the desired pixels to croppedImage.

  4. Create a new image called “redRemoved” and store in it just the blue and green components of the original image.

  5. Create a subplot with all images properly labeled that contains the original image and all of your modified image. Organize your subplots into a 2×2 grid.

SAMPLE ASSIGNMENT
Powered by WordPress