Assignment 12

Problems

  1. (10 marks) Write a function called range_set(im, (lo, hi)) that will return a modified version of im whose dynamic range is [lo, hi].

    Don't forget to include a main section that will demonstrate the function on an image, e.g. dkpenguins.png.

  2. (10 marks) Write a function called median_filter(im) that will apply a 3×3 median filter to im and return the modified image.

    For testing you should allow the user to apply salt and pepper noise to an image at a desired percentage level, output the noisy image, i.e. save it to a file, and display the RMSE between the noisy image and the original in the IDLE shell. (So yes, I'm really asking you to write two aditional functions, salt_and_pepper(im, percent) and rmse(im1, im2), as well as median_filter.)

  3. (10 marks) Write a function called sharpen(im) that implements Laplacian-based image sharpening as described in the notes. Here's the original moon image.

    Your main section should of course test it on an image.

  4. (30 marks) Write the name to email matching program described in this week's notes.

Logistics