From bbb263b4b8b99dcc567d9a7eb9266bbb32bb8a08 Mon Sep 17 00:00:00 2001 From: Bishwarup Bhattacharjee Date: Sun, 15 Dec 2019 10:55:14 +0530 Subject: [PATCH] Update convert.py save `image_depth` with `skimage.io.imsave` instead of `png.from_array(...).save(...)` which expects `np.uint8` datatype. --- scripts/NYU/convert.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/NYU/convert.py b/scripts/NYU/convert.py index ce28c80..0554e96 100644 --- a/scripts/NYU/convert.py +++ b/scripts/NYU/convert.py @@ -109,7 +109,9 @@ def convert_image(i, scene, img_depth, image, label): img_depth = img_depth * 1000.0 - png.from_array(img_depth, 'L;16').save("%s/%05d_depth.png" % (folder, i)) + #png.from_array(img_depth, 'L;16').save("%s/%05d_depth.png" % (folder, i)) + #png.from_array(...).save(...) expects np.uint8, resulting in `struct.error: required argument is not an integer` + imsave("%s/%05d_depth.png" % (folder, i), img_depth, plugin ="tifffile") depth_visualization = visualize_depth_image(img_depth)