Commit e71ad8f9 authored by Niels-Oliver Walkowski's avatar Niels-Oliver Walkowski
Browse files

adapt fps and frame/time functions to the new default 5 fps

not all methods and paramters were controlled
parent 645ada20
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -37,7 +37,7 @@ import math
# return hc
# TODO fps muss noch implementiert werden
def time2framenr(time, fps=1):
def time2framenr(time, fps=5):
"""counts the frame index for a given timestamp
time : timestamp needs to have the form [HH:]MM:SS
......@@ -53,7 +53,7 @@ def time2framenr(time, fps=1):
in_sec += int(timestmp[-2]) * 60
in_sec += int(timestmp[-1])
return in_sec
return in_sec * fps
def timelabels(val, pos):
......
......@@ -16,7 +16,18 @@ from . import helpers
# numpy gibt beim Versuch zB. size zu schreiben auch ein AttributeError() aus.
class Movie(object):
"""main class to interact with the colorspace of movieframes"""
def __init__(self, prefix, folder='./', fps=1): # TODO platform independent
def __init__(self, prefix, folder='./', fps=5):
"""creates an video object holding the frames of the video
Arguments:
object {self} -- the video object itself
prefix {str} -- part of the frames filenames representing the movie
Keyword Arguments:
folder {str} -- folder containing the frames (default: {'./'})
fps {int} -- number of frames per second that were extracted from the movie (default: {5}) # before this were 1
"""
self._frames = Frames(folder, prefix)
self.fps = fps
self.fsize = self._frames.frm_cnt
......@@ -303,6 +314,11 @@ class Frames(object):
self.__frm_cnt = count
def get_frame_list(self):
"""returns the list of paths for all frame files in the current folder
Returns:
list -- returns the list of paths for all frame files in the current folder
"""
frm_path = Path(self.folder)
return list(sorted(frm_path.glob('*.png')))
......
#
#### Requirements for itten ####
#
absl-py==0.4.1
astor==0.7.1
astroid==2.0.4
backcall==0.1.0
beautifulsoup4==4.6.0
bleach==2.1.3
bokeh==0.13.0
Cartopy==0.16.0
certifi==2018.4.16
cftime==1.0.1
chardet==3.0.4
cloudpickle==0.5.5
colorcet==0.9.1
colorlover==0.2.1
cufflinks==0.13.0
cycler==0.10.0
cymem==1.31.2
Cython==0.28.5
cytoolz==0.9.0.1
dask==0.19.0
datashader==0.6.6
datashape==0.5.2
decorator==4.3.0
dill==0.2.8.2
entrypoints==0.2.3
et-xmlfile==1.0.1
gast==0.2.0
geoviews==1.5.3
grpcio==1.14.2
holoviews==1.10.7
html5lib==1.0.1
hvplot==0.2.1
idna==2.7
IMDbPY==6.5
ipykernel==4.8.2
ipython==6.3.1
ipython-genutils==0.2.0
ipywidgets==7.2.1
isort==4.3.4
jdcal==1.4
jedi==0.12.0
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0
jupyterlab==0.32.1
jupyterlab-launcher==0.10.5
kiwisolver==1.0.1
lazy-object-proxy==1.3.1
llvmlite==0.24.0
locket==0.2.0
lxml==4.2.1
Markdown==2.6.11
MarkupSafe==1.0
matplotlib==2.2.2
mccabe==0.6.1
mistune==0.8.3
msgpack==0.5.6
msgpack-numpy==0.4.3.1
multipledispatch==0.6.0
murmurhash==0.28.0
nbconvert==5.3.1
nbformat==4.4.0
nbopen==0.6
netCDF4==1.4.1
networkx==2.1
notebook==5.4.1
numba==0.39.0
numpy==1.14.2
opencv-contrib-python==3.4.2.17
openpyxl==2.5.4
packaging==17.1
pandas==0.23.0
pandas-datareader==0.6.0
pandocfilters==1.4.2
param==1.7.0
parso==0.2.0
partd==0.3.8
PeakUtils==1.3.0
pexpect==4.5.0
pickleshare==0.7.4
Pillow==5.1.0
plac==0.9.6
plotly==2.7.0
preshed==1.0.1
prompt-toolkit==1.0.15
protobuf==3.6.1
ptyprocess==0.5.2
pyct==0.4.5
Pygments==2.2.0
pylint==2.1.1
pyparsing==2.2.0
pyshp==1.2.12
python-dateutil==2.7.2
pytz==2018.4
pyviz-comms==0.6.0
PyWavelets==0.5.2
PyYAML==3.12
pyzmq==17.0.0
qtconsole==4.3.1
regex==2017.4.5
requests==2.19.1
requests-file==1.4.3
requests-ftp==0.3.1
scikit-image==0.13.1
scikit-learn==0.19.1
scipy==1.0.1
seaborn==0.8.1
selenium==3.14.0
Send2Trash==1.5.0
Shapely==1.6.4.post2
simplegeneric==0.8.1
six==1.11.0
spacy==2.0.12
SQLAlchemy==1.2.8
tensorboard==1.10.0
tensorflow==1.10.0
termcolor==1.1.0
terminado==0.8.1
testpath==0.3.1
thinc==6.10.3
toolz==0.9.0
tornado==5.0.2
tqdm==4.25.0
traitlets==4.3.2
typed-ast==1.1.0
ujson==1.35
urllib3==1.23
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
widgetsnbextension==3.2.1
wrapt==1.10.11
xarray==0.10.8
xlrd==1.1.0
XlsxWriter==1.0.5
Markdown is supported
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