Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Importing multiple images using cv2

Hello

After importing multiple images into python using cv2.imread(), I have stored the path corresponding to each image as a list using glob as below import glob files=glob.glob("D:\ML\Image processing\Cats and Dogs\\.jpg",recursive=True)

Now I would like to create a list to store the folder names corresponding to each image, like 'Cats', 'Dogs' by splitting the path, please help me with that.