未验证 提交 5500675d 编写于 作者: L lijianshe02 提交者: GitHub

Merge pull request #35 from lijianshe02/master

add adaptive frames interpolation after deduplicate frames
...@@ -139,8 +139,14 @@ class VideoFrameInterp(object): ...@@ -139,8 +139,14 @@ class VideoFrameInterp(object):
end = time.time() end = time.time()
frames = sorted(glob.glob(os.path.join(out_path, '*.png'))) frames = sorted(glob.glob(os.path.join(out_path, '*.png')))
orig_frames = len(frames)
need_frames = orig_frames * times_interp
if remove_duplicates: if remove_duplicates:
frames = remove_duplicates(out_path) frames = remove_duplicates(out_path)
left_frames = len(frames)
timestep = left_frames / need_frames
num_frames = int(1.0 / timestep) - 1
img = imread(frames[0]) img = imread(frames[0])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册