Scale raw depth by 65535 (0xFFFF) to utilize full 16-bit png range

#5
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -202,7 +202,7 @@ with gr.Blocks(css=css) as demo:
202
  pf_prediction_colored = colorize_depth(pf_prediction, cmap=color_map)
203
  coarse_predictioncolored = colorize_depth(coarse_prediction, cmap=color_map)
204
 
205
- raw_depth = Image.fromarray((pf_prediction*256).astype('uint16'))
206
  tmp = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
207
  raw_depth.save(tmp.name)
208
 
 
202
  pf_prediction_colored = colorize_depth(pf_prediction, cmap=color_map)
203
  coarse_predictioncolored = colorize_depth(coarse_prediction, cmap=color_map)
204
 
205
+ raw_depth = Image.fromarray((pf_prediction*65535).astype('uint16'))
206
  tmp = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
207
  raw_depth.save(tmp.name)
208