EE384 Lab 5 Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

Rate this product

Problem 1: Basic read and write images using Matlab

  1. Read and show the image lena.bmp (copy your code and the plot into your report).
  2. Convert the image into gray-scale using the Matlab’s built-in function rgb2gray.
  3. Write your own function my_rgb2gray to convert a RGB image to grayscale and test it on the lena.bmp image (show the image after being converted). Given that, for each pixel we have

𝑔𝑟𝑎𝑦 𝑠𝑐𝑎𝑙𝑒 𝑖𝑛𝑡𝑒𝑛𝑠𝑖𝑡𝑦 = 30% ∗ 𝑅 + 60% ∗ 𝐺 + 10% ∗ 𝐵

  1. Save the above gray-scale image to a file named lena_gray.jpg.

 

Problem 2: Histogram equalization (enhance the contrast of an image)

  1. Read and show the image lowcontrast.jpg.
  2. Show the histogram of the image using the function imhist.
  3. Using the function histeq to enhance contrast using histogram equalization, show the histogram and the image after enhancing.

 

Problem 3: Salt and pepper noise, median filter

  1. Add salt-and-pepper noise to the lena’s gray-scale image using the function imnoise. Assume that the noise density is 0.05 (read the function’s documentation for more information). Show the noisy image.
  2. Filter the noise using the function medfilt2 with the 3×3 window, show the filtered image.
  3. Filter the noise with the 5×5 window and show the filtered image; compare the filtered image to that of 3b). What happen when we increase the window size in the median filter?
  • lab5-ersluz.zip