diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-12-18 23:41:47 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-12-18 23:41:47 +0100 |
| commit | ba4d18a2d20eed034ea7926d10e5f760d3809ba2 (patch) | |
| tree | f3fac5b831e4feb4261e089899fd7231f7a9787d /inversion/visualize.py | |
| parent | 4e4b8f6eac119ac6592aed8c5b67678d229e778f (diff) | |
live
Diffstat (limited to 'inversion/visualize.py')
| -rw-r--r-- | inversion/visualize.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/inversion/visualize.py b/inversion/visualize.py index d17fe13..2461458 100644 --- a/inversion/visualize.py +++ b/inversion/visualize.py @@ -36,6 +36,9 @@ def data2img(data): rescaled = np.clip(rescaled, 0, 255) return np.rint(rescaled).astype('uint8') +def data2pil(data); + return Image.fromarray(data2img(data), mode='RGB') + def interleave(a, b): res = np.empty([a.shape[0] + b.shape[0]] + list(a.shape[1:]), dtype=a.dtype) res[0::2] = a |
