Created
August 10, 2021 09:32
-
-
Save p-geon/34c7dc5e0f9e7760ef3d1c3c8dcc78a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from skimage import io | |
import matplotlib.pyplot as plt | |
def imshow(img, dpi=150): | |
if(len(img.shape)==2):#grayscale | |
plt.figure(dpi) | |
plt.imshow(img) | |
plt.gray() | |
plt.show() | |
else: | |
plt.figure(dpi) | |
plt.imshow(img) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment