HW3

Due on Apr 1 (30 points)

  1. You are asked to implement Harris corner detector from scratch in this problem

    1. (7 points) Compute the cornerness score \(C = det(M)-\alpha tr(M)^2 = g(I_x\circ I_x) g(I_y\circ I_y) - g(Ix \circ I_y)^2 -\alpha [g(I_x\circ I_x)+g(I_y\circ I_y)]^2\) for every pixel of the input image. You can assume \(\alpha = 0.04\) and use a Gaussian filter for \(g(\cdot)\).

    2. (3 points) Display your result by marking any pixel with cornerness score larger than a threshold in red. Please use \(0.1 C_{max}\) as the threshold.

    3. (Extra credit/5 points) Implement non-maximum supression to keep only local maximum for your detected corner pixels. Display your result again.

  2. In this problem, you will implement functions to stitch two images. Please download the assignment from this git repository

    1. (10 points) The homography to warp the first image to align with the second image is given. You are asked to implement a function to stitch the two images given the homography. That is, implement a function that warps img1 by h1 and img2 by h2 and then blend the resulting images together.

    2. (Extra credit/5 points) Implement a method to determine the size of the stitch image and output a translation matrix if shift is needed.

    3. (10 points) Implement (from first principle) to compute homography to warp given matched points. Note that you will only get half of the points if you use cv2.findhomography. Please use your own images to test your implementation.

    4. (Extra credit/5 points) Implement RANSAC to improve your homography estimate.

  • Please convert any jupyter notebooks into pdf before submission. Please make sure your code is legible.