Created
June 25, 2018 01:44
-
-
Save okdolly-001/4c744edc9f2fb49e4a4447e9ccacda23 to your computer and use it in GitHub Desktop.
load image from a directory #matplotlib #image #cv
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 matplotlib.image as mpimg | |
| import glob | |
| import os | |
| def load_data(dir_name = 'plates'): | |
| """ Your implementation """ | |
| data_path = os.path.join(dir_name, '*g') | |
| files = glob.glob(data_path) | |
| data = [mpimg.imread(img) for img in files] | |
| return data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment