2022-04-21 15:10:35 +02:00

26 lines
517 B
Python

import cv2
from matplotlib import pyplot as plt
def show_mpl(image):
fig, ax = plt.subplots(1, 1)
fig.set_size_inches(20, 20)
ax.imshow(image, cmap="gray")
plt.show()
def save_mpl(image, path):
# fig, ax = plt.subplots(1, 1)
# figure = plt.gcf()
# figure.set_size_inches(16,12)
fig, ax = plt.subplots(1, 1)
fig.set_size_inches(20, 20)
ax.imshow(image, cmap="gray")
# plt.close()
plt.savefig(path)
def show_cv2(image):
cv2.imshow("", image)
cv2.waitKey(0)