First Assignment

Question #1: Decomposition into individual components:

Keep only the R component, setting the G and B components to zero.

Basic Image Processing

Image 1

Image 2


Question 2: Thresholding of grey-scale image

Convert the image to grey-level by averaging the R, G, B components. Threshold the grey-level image at grey level threshold=120.

Image 1

Image 2

Question 3: Linear correction

Apply a linear correction on the pixel values R, G, B: - Increase the contrast of the image by a scale=1.2, leaving intensity value center=128 unchanged - then lighten the image by offset=+30 intensity levels.

Image 1

Image 2

Question 4: Interactivity - Parameters

Add controls to modify interactively offset, scale, center and threshold.

GUI

Question 5: Interactivity - Mouse

  • Add mouse handling that enables the user to select a rectangular zone (x,y,w,h).
  • The output image should be a copy of the corresponding region from the input image.
  • Make sure the output canvas is resized according to this content.
  • First - Double click where you want to start your crop
  • Second - Just one click where you want to finish your crop
  • Last - crop();