def folder_descriptors(folder):files = glob.glob(folder + "/*.jpg")print("Calculating descriptos. Number of images is", len(files))return np.concatenate([image_descriptors(file) for file in files])
this error is showing at last line i.e.
return np.concatenate([image_descriptors(file) for file in files])
def image_descriptors(file):
img = cv2.imread(file, 0)
img = cv2.resize(img, (256, 256))
_ , descriptors = cv2.SIFT().detectAndCompute(img, None)
return descriptors
def folder_descriptors(folder):
files = glob.glob(folder + "/*.jpg")
print("Calculating descriptos. Number of images is", len(files))
return np.concatenate([image_descriptors(file) for file in files])
this error is showing at last line i.e.
return np.concatenate([image_descriptors(file) for file in files])