Image Processing

Assignment 1: Filters and edges

Use the provided framework and add the following functionality:
  1. Grayscale conversion: implement a function that takes a three-channel color image and outputs a single channel grayscale image. You can (1) select one of the color channels or (2) combine them (see book I-8.2.1). (10 points)
  2. Contrast adjustment: implement a function that takes an image and outputs the image with the full range of intensity values used. (10 points)
  3. Linear filtering: implement a function that takes an input image and a Gaussian kernel (or only the size/cut-off and sigma) and outputs the result after filtering with this kernel. (10 points)
  4. Nonlinear filtering: implement a function that takes an input image and a median filter size and outputs the result after applying the filter. (10 points)
  5. Edge detection: implement a function that takes an input image and an edge kernel and outputs an image with the edge strength per pixel. Choose which kernel you use. (10 points)
  6. Thresholding: implement a function that takes a real-valued image and outputs a binary image based on a threshold. (10 points)
Choose what happens with boundary pixels. Make sure your code works with square kernels of arbitrary size. When three-channel is not mentioned explicitly, you can assume that you can work with a (one-channel) grayscale image. Demonstrate your implementation by loading the test image, converting it to grayscale and adjusting the contrast. This is image A. Then:
  1. apply a Gaussian filter (size 5x5), apply edge detection and threshold the result (image B). Choose a suitable threshold.
  2. apply a median filter (size 5x5), apply edge detection and threshold the result (image C). Choose a suitable threshold.
Write a brief (2-page) report with:
  1. the images A, B and C. Compare images B and C. (10 points)
  2. a motivation for your choice of kernel and parameters (e.g., threshold) (10 points)

Submit (through, and select Image Processing Assignment 1):

  1. your code (NO binaries/libs)
  2. your 2-page report
Mark all deliverables clearly with your names and student numbers. The root of the archive should be a folder formated as follows: StudentNumber#1 - StudentNumber#2. To execute the program, make sure your code runs out-of-the-box. Handing in code with a batch or command file that starts a compilation is completely at your own risk. After a successful submission you should receive a confirmation email in your student email account. If not, contact Ronald Poppe (before the deadline). DO NOT submit your assignment by email.

Bonus points
You can earn bonus points by:

  1. implementing a function for histogram equalization. (10 points)
  2. implementing a function for edge sharpening. (10 points)

Deadline is Sunday September 24, 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.

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.