Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

this is more a python / numpy problem, you simply cannot index an empty array, same as:

A = []
A[3] = 17 # error

rather, start with empty lists, and append :

kp = [] 
dsc = []
for imagesFiles in range(0, len(imagesCoast)):
     sift = cv2.xfeatures2d.SIFT_create()
     k,d = sift.detectAndCompute(imagesCoast[imagesFiles], None)
     kp.append(k)
     dsc.append(d)