Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.db.fargo
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.db.fargo
Commits
fb7687a9
Commit
fb7687a9
authored
8 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
[image extraction] added function to show NIR and depth images
parent
89b9eebd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/db/fargo/scripts/extract_images.py
+17
-0
17 additions, 0 deletions
bob/db/fargo/scripts/extract_images.py
with
17 additions
and
0 deletions
bob/db/fargo/scripts/extract_images.py
+
17
−
0
View file @
fb7687a9
...
...
@@ -237,6 +237,23 @@ def check_if_recording_is_ok(images_dir, subject, session, condition, recording)
return
False
return
True
def
write_bindata_as_image
(
data
,
filename
,
ir
=
True
):
# rescale to 0-255
min_value
=
numpy
.
min
(
data
)
max_value
=
numpy
.
max
(
data
)
print
min_value
print
max_value
new_data
=
(
data
-
min_value
)
/
(
max_value
-
min_value
)
*
255.0
from
matplotlib
import
pyplot
if
ir
:
pyplot
.
imshow
(
data
,
cmap
=
'
gray
'
)
else
:
pyplot
.
imshow
(
data
,
cmap
=
'
bwr
'
)
pyplot
.
show
()
def
main
(
user_input
=
None
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment