Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cittena
cittena
Commits
4bdbb136
Commit
4bdbb136
authored
Dec 22, 2016
by
Niels-Oliver Walkowski
Browse files
correct naming of MultivariateSequence
parent
b98764c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
itten/views.py
View file @
4bdbb136
...
...
@@ -101,7 +101,7 @@ class View(np.ndarray):
# subclassing subclass of numpy http://stackoverflow.com/questions/7342637/how-to-subclass-a-subclass-of-numpy-ndarray
# TODO es gibt noch das Problem, dass numpy nach mehreren Berechnungen von drive eine max recursion Warnung ausgiebt, warum? Brauche ich __del__
class
Un
ivariateSequence
(
View
):
class
Mult
ivariateSequence
(
View
):
def
__new__
(
cls
,
frames
,
input_array
=
None
):
"""Represents a movie contrast in terms of stacked histograms
...
...
@@ -113,7 +113,7 @@ class UnivariateSequence(View):
Returns
-------
Object :
Un
ivariateSequence
Object :
Mult
ivariateSequence
VHistStack is a 2-dimensional numpy array which contains
the frame number, the bin number and a quantifier which
represents the relative weight of the bin in the frame
...
...
@@ -128,8 +128,6 @@ class UnivariateSequence(View):
View
.
__array_finalize__
(
self
,
obj
)
self
.
_threshold
=
getattr
(
obj
,
'_threshold'
,
None
)
# TODO jetzt ausschließlich mit self numpy rechnen statt mit contrast_points liste
def
populate
(
self
,
ctrst
=
'light_dark'
,
method
=
'luminance'
,
frm_stp
=
10
,
bins
=
16
,
thrsh
=
60000
,
start
=
1
,
end
=
0
):
"""doc (aus __new__ zusammentragen)
"""
...
...
@@ -152,11 +150,6 @@ class UnivariateSequence(View):
img
=
cv2
.
imread
(
pwd
)
# BGR
# TODO Dictionary um Parameter auf Kontrast Funktion zu mappen
# so wie hier für 2 das ist die Referznimplementierung
# luminances gibt ein Bild mit den luminanz werten in der
# 3. Dimension zurück
ctrst_cls
=
self
.
_get_ctrst_cls_name
(
self
.
_contrast
)
ctrst_img
=
ctrst_cls
(
img
).
ctrst
...
...
@@ -220,9 +213,7 @@ class BivariateSequence(View):
# getters und setters in movie.frames definiert werden
# self._frames.start = start
# self._frames.end = end
self
.
_channel
=
2
# TODO! Durch Klasse ersetzen
# TODO change mins and maxs to (0,2) np.array
contrast_points
=
np
.
empty
((
0
,
2
),
dtype
=
np
.
uint8
)
# sofern kein oder nur ein Peak gefunden wird, man könnte dann auch
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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