Last active
August 29, 2015 14:01
-
-
Save cancan101/aca55ff569cb790d7757 to your computer and use it in GitHub Desktop.
OpenCV Image Utilities
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
def get_bw(src): | |
return cv2.cvtColor(src, cv2.COLOR_BGR2GRAY) | |
def show_color(src): | |
plt.imshow(cv2.cvtColor(src, cv2.COLOR_BGR2RGB)) | |
_ = plt.xticks([]), plt.yticks([]) | |
def show_bw(bw): | |
plt.imshow(bw, cmap='gray') | |
_ = plt.xticks([]), plt.yticks([]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment