Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import cv2
- FOLDER_WITH_IMAGES = './aligned-images/Alfred-E-Neuman/'
- files = [f for f in os.listdir(FOLDER_WITH_IMAGES) if f.endswith('.jpg')]
- for infile in files:
- print('Processing file %s ...' % (infile))
- full_path = os.path.join(FOLDER_WITH_IMAGES, infile)
- cv_image = cv2.imread(full_path)
- height, width = cv_image.shape[:2]
- print('\t(%s X %s)' % (width,height))
- print('Done')
Advertisement
Add Comment
Please, Sign In to add comment