Skip to content
Snippets Groups Projects
Commit fb7687a9 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[image extraction] added function to show NIR and depth images

parent 89b9eebd
Branches
Tags
No related merge requests found
......@@ -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):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment