Created
May 2, 2017 09:28
-
-
Save mstfldmr/45d6e47bb661800b982c39d30215bc88 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 matplotlib import pyplot as plt | |
import cv2 | |
img = cv2.imread('/Users/mustafa/test.jpg') | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
plt.imshow(gray) | |
plt.title('my picture') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a simple function based on the code above to display the image with an optional title.
Usage is simple: