You need to complete the following steps:
- Import the necessary modules:
import cv2import matplotlib.pyplot as plt
- Load the test image:
img = cv2.imread('../data/Lena.png', cv2.IMREAD_GRAYSCALE)
- Find good keypoints:
corners = cv2.goodFeaturesToTrack(img, 100, 0.05, 10)
- Visualize the results:
for c in corners: x, y = c[0] cv2.circle(img, (x, y), 5, 255, -1)plt.figure(figsize=(10, 10))plt.imshow(img, cmap='gray')plt.tight_layout()plt.show()