Created
April 20, 2020 09:10
-
-
Save prateekjoshi565/e11a5abcb28ff7b0a7a83f2dfd922c89 to your computer and use it in GitHub Desktop.
This file contains 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
# get file names of the frames | |
col_frames = os.listdir('frames/') | |
# sort file names | |
col_frames.sort(key=lambda f: int(re.sub('\D', '', f))) | |
# empty list to store the frames | |
col_images=[] | |
for i in col_frames: | |
# read the frames | |
img = cv2.imread('frames/'+i) | |
# append the frames to the list | |
col_images.append(img) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment