Untitled
unknown
python
a year ago
694 B
4
Indexable
import matplotlib.pyplot as plt import matplotlib.image as mpimg import os from time import sleep # Path to the directory containing Ferrari 812 images image_dir = "/path/to/your/ferrari812/images" # List all image files in the directory image_files = [f for f in os.listdir(image_dir) if os.path.isfile(os.path.join(image_dir, f))] # Sort the image files image_files.sort() # Create a slideshow for image_file in image_files: # Load and display the image image_path = os.path.join(image_dir, image_file) img = mpimg.imread(image_path) plt.imshow(img) plt.axis('off') plt.show() # Pause for a few seconds sleep(2) # Clear the previous image plt.clf()
Editor is loading...
Leave a Comment