Commit 35c60b19 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Implement frames

parent 9f413d92
from pkg_resources import resource_filename
from bob.dap.base.database import FileListPadDatabase, FileListPadFile
from bob.dap.face.database import VideoPadFile
from bob.dap.face.utils import frames
# documentation imports
import numpy
class File(FileListPadFile, VideoPadFile):
......@@ -21,3 +24,29 @@ class Database(FileListPadDatabase):
def frames(self, padfile):
"""Yields the number of frames and then the frames of the padfile one
by one.
padfile : :any:`File`
The high-level replay pad file
dir : str
The directory where the original data is.
ext : str
The original extension of the video files.
The number of frames. Then, it yields the frames.
A frame of the video. The size is (3, 240, 320).
vfilename = padfile.make_path(
for retval in frames(vfilename):
yield retval
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment