- Erosion/dilation: implement two functions that take a grayscale image, a structuring element and a grayscale control image as input and output the geodesic eroded/dilated image with the mask as control image, respectively. You functions should also work for binary images. In this case, use only the values 0 and 1 in both image and control image. Check whether image and control image have the same size.(15 points)
- Opening/closing: implement two functions that take a grayscale image, a structuring element and a grayscale control image as input and output the image after geodesic morphological opening and closing, respectively. You functions should also work for binary images. In this case, use only the values 0 and 1 in both image and control image. Check whether image and control image have the same size. For geodesic opening, first perform a "normal" erosion (no control image), followed by a geodesic dilation. (15 points)
- Complement: implement a function that takes a (binary) grayscale image as input and outputs the complement of the image. (10 points)
- AND/OR: implement two functions that take two (binary) grayscale images as input and output the AND and the OR of both images. Check the input arguments but only perform the AND/OR when the sizes of both images are the same. (10 points)
- Value counting: implement a function that takes a grayscale image as input and outputs the number of distinct values. (10 points)
- dilate image W with a 3x3 square kernel. This is image X.
- erode image W with a 3x3 square kernel. This is image Y.
- take the AND of image X and the complement of Y. This is image Z.
- use image A from assignment 1, convert it to grayscale and perform a series of dilations with increasing structuring element size. Choose the shape of the element (e.g. plus, square), but keep it fixed. The resulting images are E1...En.
- for each image E1...En, count the number of distinct values F1..Fn.
- the images X, Y and Z. Explain what result Z is. (10 points)
- a graph with on the x-axis the size of the structuring element and on the y-axis the values F1...Fn. Explain what you see. How can this be explained? (10 points)
Submission Submit (through http://www.cs.uu.nl/docs/submit, and select Image Processing Assignment 2):
- your code (NO binaries/libs)
- your 2-page report
Bonus points You can earn bonus points by:
- implementing a function that performs geodesic reconstruction by erosion. Make sure your algorithm stops when the stable result is obtained. (10 points)
- demonstrate your reconstruction function using an example. So take an image, take a control image and show in your report the stable results of the reconstruction. (10 points)
Deadline Deadline is Wednesday October 18, 23:00. One full point will be deducted for submissions within one day of the deadline (you will have to email Ronald Poppe). No further extensions to the deadline will be given. There is NO re-take for the assignments.
Questions/Contact: The assistants for this course are available to answer your questions and to provide guidance about your project. Contact them through the INFOIBV2017 Slack team. There are walk-in sessions where the student assistants can help you.