error: (-215:Assertion failed) trainDescCollection[iIdx].rows < IMGIDX_ONE in function 'knnMatchImpl'. For the first few images it worked perfectly

175 views Asked by At

For the first few iterations it worked perfectly but later on it throw out the same error not sure what exactly is happening..

im1_new=cv2.cvtColor(im1, cv2.COLOR_BGR2RGB)

im2_new=cv2.cvtColor(im2, cv2.COLOR_BGR2RGB)

sift=cv2.xfeatures2d.SIFT_create()

kp1,des1=sift.detectAndCompute(im1_new,None)
kp2,des2=sift.detectAndCompute(im2_new,None)

matcher = cv2.BFMatcher()
matches=matcher.knnMatch(des1,des2,k=2)
0

There are 0 answers