OpenCV Python:またはdrawMatchesknn関数
Opencv Python No Drawmatchesknn Function
二 反対票 | 関数 たとえば、 SIFT記述子と比率テストによるブルートフォースマッチング チュートリアルは次のように修正できます。 # BFMatcher with default params bf = cv2.BFMatcher() matches = bf.knnMatch(des1,des2, k=2) # Apply ratio test good = [] for m,n in matches: if m.distance < 0.75*n.distance: # Removed the brackets around m good.append(m) # Invoke @rayryeng's drawMatches alternative, note it requires grayscale images gray1 = cv2.cvtColor(img1,cv2.COLOR_BGR2GRAY) gray2 = cv2.cvtColor(img2,cv2.COLOR_BGR2GRAY) drawMatches(gray1,kp1,gray2,kp2,good) |
https://stackoverflow.com/questions/20172953/opencv-python-no-drawmatchesknn-functionリファレンスリンクから転送: