In terms of uniqueness and invariance, discuss why single pixels, described using their RGB values, do not make good features for image matching.
Compute the structure tensor for each of the following image patches. I have it on good authority that these images are noise-free, so we can safely skip the Sobel filter and compute gradients using 3x1 and 1x3 centered finite difference filters and repeat
padding. [222222000][022022000][222022002]
Using software of your choice (e.g., np.linalg.eigvals
, or use the formula described here), compute the smallest eigenvalue of each of the structure tensors you computed in the prior problem.
def harris_score(img):
""" Returns the smaller eigenvalue of the structure tensor for each pixel in img.
Pre: img is grayscale, float, [0,1]. """