0
0
Computer Visionml~10 mins

Feature matching between images in Computer Vision - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a SIFT feature detector.

Computer Vision
import cv2
sift = cv2.[1]()
Drag options to blanks, or click blank then click option'
ABRISK_create
BFeatureDetector_create
CORB_create
DSIFT_create
Attempts:
3 left
💡 Hint
Common Mistakes
Using ORB or BRISK instead of SIFT.
Trying to use a generic FeatureDetector_create method.
2fill in blank
medium

Complete the code to detect keypoints and compute descriptors from an image using SIFT.

Computer Vision
keypoints, descriptors = sift.[1](image, None)
Drag options to blanks, or click blank then click option'
AdetectAndCompute
Bdetect
Ccompute
DfindKeypoints
Attempts:
3 left
💡 Hint
Common Mistakes
Using only detect or compute separately.
Using a non-existent method like findKeypoints.
3fill in blank
hard

Fix the error in the code to create a BFMatcher with L2 norm for SIFT descriptors.

Computer Vision
bf = cv2.BFMatcher([1], crossCheck=True)
Drag options to blanks, or click blank then click option'
Acv2.NORM_INF
Bcv2.NORM_HAMMING
Ccv2.NORM_L2
Dcv2.NORM_MINMAX
Attempts:
3 left
💡 Hint
Common Mistakes
Using NORM_HAMMING which is for binary descriptors like ORB.
Using incorrect norm types.
4fill in blank
hard

Fill both blanks to filter matches using Lowe's ratio test.

Computer Vision
good_matches = []
for m, n in matches:
    if m.[1] < [2] * n.distance:
        good_matches.append(m)
Drag options to blanks, or click blank then click option'
Adistance
B0.75
C0.5
DqueryIdx
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong attributes like queryIdx.
Using incorrect ratio values.
5fill in blank
hard

Fill all three blanks to draw matches between two images.

Computer Vision
img_matches = cv2.drawMatches(img1, kp1, img2, kp2, [1], None, flags=[2])
cv2.imshow('Matches', img_matches)
cv2.waitKey([3])
Drag options to blanks, or click blank then click option'
Agood_matches
Bcv2.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS
C0
Dmatches
Attempts:
3 left
💡 Hint
Common Mistakes
Using all matches instead of good matches.
Not using the correct flag.
Using a non-zero waitKey value.