OpenCV(3.4.1)错误:在cv :: batchDistance中断言失败(类型== src2.type()&& src1.cols == src2.cols &&(类型== 5 ||类型== 0)),

时间:2018-06-28 06:32:14

标签: python opencv sift

这是什么? 谁能告诉我? 拜托了吗?

# create BFMatcher object
bf = cv2.BFMatcher(cv2.NORM_HAMMING,crossCheck=False)

# Match descriptors.
matches = bf.match(des1,des2)

# Sort them in the order of their distance.
matches = sorted(matches, key = lambda x:x.distance)

# Draw first 10 matches.
img3 = cv2.drawMatches(img1,kp1,img2,kp2,matches[:10],None, flags=2)

0 个答案:

没有答案