1234567891011121314151617181920212223242526272829import osimport cv2def read_images(folder_path): images = [] for filename in os.listdir(folder_path): img_path = os.path.join(folder_path, filename) if os.path.isfile(img_path): img = cv2.imread(img_path) if img is not None: images.append(img) return imagesdef getfilepaths(folder_path): paths = [] for filename in os.listdir(folder_path): img_path = os.path.join(folder_path, filename) paths.append(img) return pathsdef main(): folder_path = '/path/to/folder' images = read_images(folder_path) paths = getfilepaths(folder_path)if __name__ == '__main__': main()