Closed ridvanozdemir closed 3 years ago
Hello, how can I modify this code for gray scale images? def imShow(path): import cv2 import matplotlib.pyplot as plt %matplotlib inline
image = cv2.imread(path) height, width = image.shape[:2] resized_image = cv2.resize(image,(3width, 3height), interpolation = cv2.INTER_CUBIC)
fig = plt.gcf() fig.set_size_inches(18, 10) plt.axis("off") plt.imshow(cv2.cvtColor(resized_image, cv2.COLOR_BGR2RGB)) plt.show()
Hello, how can I modify this code for gray scale images? def imShow(path): import cv2 import matplotlib.pyplot as plt %matplotlib inline
image = cv2.imread(path) height, width = image.shape[:2] resized_image = cv2.resize(image,(3width, 3height), interpolation = cv2.INTER_CUBIC)
fig = plt.gcf() fig.set_size_inches(18, 10) plt.axis("off") plt.imshow(cv2.cvtColor(resized_image, cv2.COLOR_BGR2RGB)) plt.show()