I want to read multiple images on a same folder using opencv (python). To do that do I need to use for loop or while loop with imread func
for
while
imread
This one has better time efficiency.
def read_img(img_list, img): n = cv2.imread(img, 0) img_list.append(n) return img_list path = glob.glob("*.bmp") #or jpg list_ = []` cv_image = [read_img(list_, img) for img in path]