Complete the code to create a SIFT detector using OpenCV.
import cv2 sift = cv2.[1]()
The correct function to create a SIFT detector in OpenCV is SIFT_create().
Complete the code to detect keypoints and descriptors from an image using SIFT.
keypoints, descriptors = sift.[1](image, None)
The method detectAndCompute() detects keypoints and computes descriptors in one step.
Fix the error in the code to draw keypoints on the image using OpenCV.
output_image = cv2.drawKeypoints(image, keypoints, [1], flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)The third argument to drawKeypoints should be None to create a new output image.
Fill both blanks to create a dictionary of keypoint coordinates and their sizes.
kp_dict = {kp.pt: kp.{{BLANK_2}} for kp in keypoints}The dictionary comprehension starts with {kp.pt and uses the size attribute of keypoints.
Fill all three blanks to filter keypoints by their response and create a list of their coordinates.
filtered_points = [kp.[1] for kp in keypoints if kp.[2] > [3]]
We want the point coordinates kp.pt for keypoints with response greater than 0.01.