Back to posts Edit this post
Copy content

11 Dec 16:59

ZadanieA
#load images, check dimensions and data type boats = imageio.imread('boats.png') lena = imageio.imread('lena.png') face = imageio.imread('happy-face.png') #displayImages function def displayImages(Image1, Image2, Title1="img1", Title2="img2") : #display images # Check dimensions and data type print(f"Lena dimensions: {Image1.shape}, dtype: {Image1.dtype}") print(f"Boats dimensions: {Image2.shape}, dtype: {Image2.dtype}") # Display images fig, axs = plt.subplots(1, 2, figsize=default_figsize_1x2) axs[0].imshow(Image1, cmap='gray', vmin=0, vmax=255) axs[0].set_title('Lena') axs[1].imshow(Image2, cmap='gray', vmin=0, vmax=255) axs[1].set_title('Boats') fig.tight_layout() #fig.show() return displayImages(boats, lena)

No files