Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2088

how to solve this opencv-program

$
0
0
http://jwlee2218.blogspot.com/2017/11/opencv-feature-matching.html i want to make a program that searches the wally. this is a code: import bumpy as np import cv2 import matplotlib.pyplot as pat img1=cv2.imread(‘icy.jpg’,0) img2=cv2.imread(‘wally.png’,0) sift=cv2.xfeatures2d.SIFT_create() kp1,des1=sift.detectAndCompute(img1,None) kp1,des2=sift.detectAndCompute(img2,None) bf=cv2.BFMatcher() matches=bf.knnMatch(des1,des2,k=2) good=[] for m,n in matches: if m.distance<0.75*n.distance: good.append([m]) img3=cv2.drawMatchesKnn(img1,kp1,img2,kp2,good,None,flags=2) plt.imshow(img3) plt.show() But i have another errors. this is a error: syntaxerror keyword can't be an expression I don't understand what they say

Viewing all articles
Browse latest Browse all 2088

Trending Articles