The error is for the following line in the code:- plt.imshow(img3), plt.show()
1 | initial version |
The error is for the following line in the code:- plt.imshow(img3), plt.show()
2 | retagged |
The error is for the following line in the code:- plt.imshow(img3), plt.show()
3 | No.3 Revision |
The error is for the following line in the code:-
plt.imshow(img3), plt.show()plt.show()
Please find the attachments.
One of the two attachments contains the source code, whereas the second contains the Traceback Error.
BFMatchingthree.png BFMatching_three.png
4 | No.4 Revision |
The error is for the following line in the code:-
plt.imshow(img3), plt.show()
Please find the attachments.
One of the two attachments contains the source code, whereas the second contains the Traceback Error.
Error.
import numpy as np import cv2 from matplotlib import pyplot as plt
img1 = cv2.imread('../CarData/TestImages/test-0.pgm',0)# queryImage img2 = cv2.imread('../CarData/TestImages/test-1.pgm',0) # trainImage
orb = cv2.ORB_create()
kp1, des1 = orb.detectAndCompute(img1,None) kp2, des2 = orb.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])
img_temp = np.zeros((1,1)) img3 = cv2.drawMatchesKnn(img1,kp1,img2,kp2,good,img_temp,flags=2)
plt.imshow(img3),plt.show() BFMatchingthree.png BFMatching_three.png
5 | No.5 Revision |
The error is for the following line in the code:- plt.imshow(img3), plt.show() Please find the attachments. One of the two attachments contains the source code, whereas the second contains the Traceback Error.
import numpy as np
import cv2
from matplotlib import pyplot as plt.imshow(img3),plt.show()
BFMatchingthree.png BFMatching_three.png