Created
December 2, 2018 07:34
-
-
Save Jojozzc/4a75cb2a2bf95b747aed9bad8bd533d4 to your computer and use it in GitHub Desktop.
Simple rgb2gray
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 rgb2gray(img): | |
assert np.ndim(img) == 3 | |
img = color.rgb2gray(img) * 255 | |
img = np.uint8(img) | |
return img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment