PIL handling;

This commit is contained in:
Johannes Stelzer 2024-01-06 17:19:00 +01:00
parent 76f02c15c6
commit 546867553f
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ def add_frames_linear_interp(
if nmb_frames_missing < 1:
return list_imgs
if type(list_imgs[0]) == PIL.Image.Image:
list_imgs = [np.asarray(l) for l in list_imgs]
list_imgs_float = [img.astype(np.float32) for img in list_imgs]
# Distribute missing frames, append nmb_frames_to_insert(i) frames for each frame
mean_nmb_frames_insert = nmb_frames_missing / nmb_frames_diff