Created
June 2, 2019 18:38
-
-
Save StrikingLoo/52fce394dbc5f498bd1fed41b4316991 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
| import numpy as np | |
| np_im = pixels_from_path(file_path) #load the image as numpy matrix | |
| pixels = vector_of_pixels(np_im) #turn it into a single vector | |
| np.unique(pixels).shape # count unique pixel values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment