Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.vein
Commits
05980774
Commit
05980774
authored
Oct 06, 2017
by
André Anjos
💬
Browse files
Set better defaults and use them on stock configuration
parent
ccf7e54c
Changes
5
Hide whitespace changes
Inline
Side-by-side
bob/bio/vein/algorithm/MiuraMatch.py
View file @
05980774
...
...
@@ -47,8 +47,8 @@ class MiuraMatch (Algorithm):
"""
def
__init__
(
self
,
ch
=
8
,
# Maximum search displacement in y-direction
cw
=
5
,
# Maximum search displacement in x-direction
ch
=
8
0
,
# Maximum search displacement in y-direction
cw
=
90
,
# Maximum search displacement in x-direction
):
# call base class constructor
...
...
bob/bio/vein/configurations/maximum_curvature.py
View file @
05980774
...
...
@@ -20,30 +20,20 @@ or the attribute ``sub_directory`` in a configuration file loaded **after**
this resource.
"""
from
..preprocessor
import
NoCrop
,
Padder
,
TomesLeeMask
,
\
HuangNormalization
,
NoFilter
,
Preprocessor
# Filter sizes for the vertical "high-pass" filter
FILTER_HEIGHT
=
4
FILTER_WIDTH
=
40
# Padding (to create a buffer during normalization)
PAD_WIDTH
=
5
PAD_CONST
=
51
from
..preprocessor
import
NoCrop
,
TomesLeeMask
,
HuangNormalization
,
\
NoFilter
,
Preprocessor
preprocessor
=
Preprocessor
(
crop
=
NoCrop
(),
mask
=
TomesLeeMask
(
filter_height
=
FILTER_HEIGHT
,
filter_width
=
FILTER_WIDTH
,
padder
=
Padder
(
padding_width
=
PAD_WIDTH
,
padding_constant
=
PAD_CONST
)),
normalize
=
HuangNormalization
(
padding_width
=
PAD_WIDTH
,
padding_constant
=
PAD_CONST
),
mask
=
TomesLeeMask
(),
normalize
=
HuangNormalization
(),
filter
=
NoFilter
(),
)
"""Preprocessing using gray-level based finger cropping and no post-processing
"""
from
..extractor
import
MaximumCurvature
extractor
=
MaximumCurvature
(
sigma
=
5
)
extractor
=
MaximumCurvature
()
"""Features are the output of the maximum curvature algorithm, as described on
[MNM05]_.
...
...
@@ -53,7 +43,7 @@ Defaults taken from [TV13]_.
# Notice the values of ch and cw are different than those from the
# repeated-line tracking baseline.
from
..algorithm
import
MiuraMatch
algorithm
=
MiuraMatch
(
ch
=
80
,
cw
=
90
)
algorithm
=
MiuraMatch
()
"""Miura-matching algorithm with specific settings for search displacement
Defaults taken from [TV13]_.
...
...
bob/bio/vein/configurations/repeated_line_tracking.py
View file @
05980774
...
...
@@ -20,23 +20,13 @@ or the attribute ``sub_directory`` in a configuration file loaded **after**
this resource.
"""
from
..preprocessor
import
NoCrop
,
Padder
,
TomesLeeMask
,
\
HuangNormalization
,
NoFilter
,
Preprocessor
# Filter sizes for the vertical "high-pass" filter
FILTER_HEIGHT
=
4
FILTER_WIDTH
=
40
# Padding (to create a buffer during normalization)
PAD_WIDTH
=
5
PAD_CONST
=
51
from
..preprocessor
import
NoCrop
,
TomesLeeMask
,
HuangNormalization
,
\
NoFilter
,
Preprocessor
preprocessor
=
Preprocessor
(
crop
=
NoCrop
(),
mask
=
TomesLeeMask
(
filter_height
=
FILTER_HEIGHT
,
filter_width
=
FILTER_WIDTH
,
padder
=
Padder
(
padding_width
=
PAD_WIDTH
,
padding_constant
=
PAD_CONST
)),
normalize
=
HuangNormalization
(
padding_width
=
PAD_WIDTH
,
padding_constant
=
PAD_CONST
),
mask
=
TomesLeeMask
(),
normalize
=
HuangNormalization
(),
filter
=
NoFilter
(),
)
"""Preprocessing using gray-level based finger cropping and no post-processing
...
...
@@ -44,21 +34,7 @@ preprocessor = Preprocessor(
from
..extractor
import
RepeatedLineTracking
# Maximum number of iterations
NUMBER_ITERATIONS
=
3000
# Distance between tracking point and cross section of profile
DISTANCE_R
=
1
# Width of profile
PROFILE_WIDTH
=
21
extractor
=
RepeatedLineTracking
(
iterations
=
NUMBER_ITERATIONS
,
r
=
DISTANCE_R
,
profile_w
=
PROFILE_WIDTH
,
seed
=
0
,
#Sets numpy.random.seed() to this value
)
extractor
=
RepeatedLineTracking
()
"""Features are the output of repeated-line tracking, as described on [MNM04]_.
Defaults taken from [TV13]_.
...
...
bob/bio/vein/configurations/wide_line_detector.py
View file @
05980774
...
...
@@ -20,23 +20,13 @@ or the attribute ``sub_directory`` in a configuration file loaded **after**
this resource.
"""
from
..preprocessor
import
NoCrop
,
Padder
,
TomesLeeMask
,
\
HuangNormalization
,
NoFilter
,
Preprocessor
# Filter sizes for the vertical "high-pass" filter
FILTER_HEIGHT
=
4
FILTER_WIDTH
=
40
# Padding (to create a buffer during normalization)
PAD_WIDTH
=
5
PAD_CONST
=
51
from
..preprocessor
import
NoCrop
,
TomesLeeMask
,
HuangNormalization
,
\
NoFilter
,
Preprocessor
preprocessor
=
Preprocessor
(
crop
=
NoCrop
(),
mask
=
TomesLeeMask
(
filter_height
=
FILTER_HEIGHT
,
filter_width
=
FILTER_WIDTH
,
padder
=
Padder
(
padding_width
=
PAD_WIDTH
,
padding_constant
=
PAD_CONST
)),
normalize
=
HuangNormalization
(
padding_width
=
PAD_WIDTH
,
padding_constant
=
PAD_CONST
),
mask
=
TomesLeeMask
(),
normalize
=
HuangNormalization
(),
filter
=
NoFilter
(),
)
"""Preprocessing using gray-level based finger cropping and no post-processing
...
...
@@ -44,20 +34,7 @@ preprocessor = Preprocessor(
from
..extractor
import
WideLineDetector
# Radius of the circular neighbourhood region
RADIUS_NEIGHBOURHOOD_REGION
=
5
NEIGHBOURHOOD_THRESHOLD
=
1
#Sum of neigbourhood threshold
SUM_NEIGHBOURHOOD
=
41
RESCALE
=
True
extractor
=
WideLineDetector
(
radius
=
RADIUS_NEIGHBOURHOOD_REGION
,
threshold
=
NEIGHBOURHOOD_THRESHOLD
,
g
=
SUM_NEIGHBOURHOOD
,
rescale
=
RESCALE
)
extractor
=
WideLineDetector
()
"""Features are the output of the maximum curvature algorithm, as described on
[HDLTL10]_.
...
...
bob/bio/vein/preprocessor/mask.py
View file @
05980774
...
...
@@ -213,7 +213,7 @@ class KonoMask(Masker):
"""
def
__init__
(
self
,
sigma
=
5
,
padder
=
None
):
def
__init__
(
self
,
sigma
=
5
,
padder
=
Padder
()
):
self
.
sigma
=
sigma
self
.
padder
=
padder
...
...
@@ -314,7 +314,7 @@ class LeeMask(Masker):
"""
def
__init__
(
self
,
filter_height
=
4
,
filter_width
=
40
,
padder
=
None
):
def
__init__
(
self
,
filter_height
=
4
,
filter_width
=
40
,
padder
=
Padder
()
):
self
.
filter_height
=
filter_height
self
.
filter_width
=
filter_width
self
.
padder
=
padder
...
...
@@ -403,7 +403,7 @@ class TomesLeeMask(Masker):
"""
def
__init__
(
self
,
filter_height
=
4
,
filter_width
=
40
,
padder
=
None
):
def
__init__
(
self
,
filter_height
=
4
,
filter_width
=
40
,
padder
=
Padder
()
):
self
.
filter_height
=
filter_height
self
.
filter_width
=
filter_width
self
.
padder
=
padder
...
...
Write
Preview
Supports
Markdown
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