Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cittena
cittena
Commits
d7db668c
Commit
d7db668c
authored
Oct 10, 2018
by
Niels-Oliver Walkowski
Browse files
redit docstring of analyze function
and change param name dtype to view for better consistency with class names
parent
3cd855a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
itten/movie.py
View file @
d7db668c
...
...
@@ -112,20 +112,32 @@ class Movie(object):
ctrst
+
' - '
+
desc
vis
.
saveplt
(
fname
=
filename
,
title
=
header
)
def
analyze
(
self
,
ctrst
,
meth
,
dtype
,
start
=
1
,
end
=
0
,
stp
=
5
):
def
analyze
(
self
,
ctrst
,
meth
,
view
,
start
=
1
,
end
=
0
,
stp
=
5
):
"""Calculates contrast data for a specific contrast in the movie
Parameters
----------
ctrst: the contrast to be plotted
method: the method which should be used by the contrast class in order
to calculate the contrast
dtype: type of the visualization (distribution, seqmean, seqmad, etc)
possible values are: monochromatic, saturation, hue, cold-warm,
complementary
method: the method by which the peculiar contrast is calculated.
Possible values depend on the contrast type and include:
luminance, value, lightness, redniss_lab (monochromatic)
saturation, colourfulness (saturation)
hsV, labHcl (hue)
view: the way contrast is modeled in the data
possible values are: distribution, seqmean, seqmad, seqvar, seqper
start: Int which defines the start frame for the description
end: Int which defines the end frame for the description (0 defines
the unknown end frame)
stp: the frequency in sec by which frames are used to calculate the
contrast
stp: the frequency in frame number by which frames are used to calculate
the contrast
Returns
-------
...
...
@@ -136,7 +148,7 @@ class Movie(object):
self
.
_frames
.
start
=
start
self
.
_frames
.
end
=
end
if
dtype
==
'distribution'
:
if
view
==
'distribution'
:
# CTRL funktioniert start/end hier wenn ich es nicht noch einmal
# mit übergebe ?
data
=
views
.
MultivariateSequence
(
self
.
_frames
,)
...
...
@@ -144,9 +156,9 @@ class Movie(object):
frm_stp
=
stp
)
return
data
elif
dtype
in
[
'seqmean'
,
'seqmad'
,
'seqvar'
,
'seqper'
]:
elif
view
in
[
'seqmean'
,
'seqmad'
,
'seqvar'
,
'seqper'
]:
data
=
views
.
UnivariateSequence
(
self
.
_frames
,)
getattr
(
data
,
dtype
)(
ctrst
=
ctrst
,
method
=
meth
,
frm_stp
=
stp
)
getattr
(
data
,
view
)(
ctrst
=
ctrst
,
method
=
meth
,
frm_stp
=
stp
)
return
data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment