Challenge - 5 Problems
Harris Corner Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What does the Harris corner detector primarily measure?
The Harris corner detector is used in computer vision to find corners in images. What is the main quantity it measures to detect corners?
Attempts:
2 left
💡 Hint
Think about what makes a corner different from an edge or flat area.
✗ Incorrect
The Harris corner detector measures how much the intensity changes in all directions around a pixel. Corners have large changes in intensity in multiple directions.
❓ Predict Output
intermediate2:00remaining
Output of Harris response matrix calculation
Given the following code snippet that computes the Harris response matrix R for a pixel, what is the value of R?
Computer Vision
import numpy as np Ix = 2 Iy = 3 Ixx = Ix * Ix Iyy = Iy * Iy Ixy = Ix * Iy k = 0.04 M = np.array([[Ixx, Ixy], [Ixy, Iyy]]) R = np.linalg.det(M) - k * (np.trace(M) ** 2) print(round(R, 2))
Attempts:
2 left
💡 Hint
Calculate determinant and trace carefully.
✗ Incorrect
M = [[4,6],[6,9]]; det(M) = 4*9 - 6*6 = 36 - 36 = 0; trace(M) = 4 + 9 = 13; R = 0 - 0.04*(13**2) = -6.76; round(-6.76, 2) = -6.76.
❓ Model Choice
advanced1:30remaining
Choosing parameters for Harris corner detection
Which parameter adjustment will increase the sensitivity of the Harris corner detector to detect more corners in an image?
Attempts:
2 left
💡 Hint
Think about how window size affects local detail detection.
✗ Incorrect
A smaller window size focuses on smaller neighborhoods, making the detector more sensitive to small corners and details.
❓ Metrics
advanced1:30remaining
Evaluating Harris corner detection results
After running Harris corner detection, you get a set of corner points. Which metric best describes the quality of detected corners compared to ground truth corners?
Attempts:
2 left
💡 Hint
Consider how many detected corners are actually correct.
✗ Incorrect
Precision measures how many detected corners are true corners, reflecting detection quality.
🔧 Debug
expert2:30remaining
Debugging incorrect Harris corner detection output
You implemented Harris corner detection but the output shows no corners detected. Which of the following code mistakes would cause this issue?
Computer Vision
import cv2 import numpy as np img = cv2.imread('image.jpg', 0) Ix = cv2.Sobel(img, cv2.CV_64F, 1, 0, ksize=3) Iy = cv2.Sobel(img, cv2.CV_64F, 0, 1, ksize=3) Ixx = Ix * Ix Iyy = Iy * Iy Ixy = Ix * Iy k = 0.04 window_size = 3 height, width = img.shape R = np.zeros((height, width)) for y in range(window_size, height - window_size): for x in range(window_size, width - window_size): Sxx = np.sum(Ixx[y - window_size:y + window_size + 1, x - window_size:x + window_size + 1]) Syy = np.sum(Iyy[y - window_size:y + window_size + 1, x - window_size:x + window_size + 1]) Sxy = np.sum(Ixy[y - window_size:y + window_size + 1, x - window_size:x + window_size + 1]) M = np.array([[Sxx, Sxy], [Sxy, Syy]]) R[y, x] = np.linalg.det(M) - k * (np.trace(M) ** 2) threshold = 0.01 * R.max() corners = np.where(R > threshold) print(len(corners[0]))
Attempts:
2 left
💡 Hint
Check the threshold relative to the maximum R value.
✗ Incorrect
If the threshold is too high, no R values exceed it, so no corners are detected.