Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.bio.vein
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.bio.vein
Commits
a8586e10
Commit
a8586e10
authored
Jul 03, 2017
by
André Anjos
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loading of fv3d fingers
parent
b6acc543
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
bob/bio/vein/database/fv3d.py
bob/bio/vein/database/fv3d.py
+6
-3
No files found.
bob/bio/vein/database/fv3d.py
View file @
a8586e10
...
@@ -8,6 +8,7 @@ import numpy
...
@@ -8,6 +8,7 @@ import numpy
from
bob.bio.base.database
import
BioFile
,
BioDatabase
from
bob.bio.base.database
import
BioFile
,
BioDatabase
from
.
import
AnnotatedArray
from
.
import
AnnotatedArray
from
..preprocessor.utils
import
poly_to_mask
class
File
(
BioFile
):
class
File
(
BioFile
):
...
@@ -38,13 +39,15 @@ class File(BioFile):
...
@@ -38,13 +39,15 @@ class File(BioFile):
"""(Overrides base method) Loads both image and mask"""
"""(Overrides base method) Loads both image and mask"""
image
=
super
(
File
,
self
).
load
(
*
args
,
**
kwargs
)
image
=
super
(
File
,
self
).
load
(
*
args
,
**
kwargs
)
image
=
numpy
.
rot90
(
image
,
3
)
roi
=
self
.
__f
.
roi
()
roi
=
self
.
__f
.
roi
()
# calculates the 90 degrees anti-clockwise rotated RoI points
# calculates the 90 degrees anti-clockwise rotated RoI points
h
,
w
=
image
.
shape
w
,
h
=
image
.
shape
roi
=
[(
x
,
-
y
+
h
)
for
k
in
roi
]
roi
=
[(
x
,
h
-
y
)
for
(
y
,
x
)
in
roi
]
mask
=
poly_to_mask
(
image
.
shape
,
roi
)
return
ImageWithAnnotation
(
numpy
.
rot90
(
image
),
metadata
=
dict
(
mask
=
roi
))
return
AnnotatedArray
(
image
,
metadata
=
dict
(
mask
=
mask
,
roi
=
roi
))
class
Database
(
BioDatabase
):
class
Database
(
BioDatabase
):
...
...
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