MCPcopy
hub / github.com/zju3dv/4K4D / write_depth_img

Function write_depth_img

easyvolcap/utils/fusion_utils.py:341–352  ·  view source on GitHub ↗
(filename, depth, depth_min, depth_max)

Source from the content-addressed store, hash-verified

339
340
341def write_depth_img(filename, depth, depth_min, depth_max):
342
343 if not os.path.exists(os.path.dirname(filename)):
344 # try:
345 os.makedirs(os.path.dirname(filename))
346 # except OSError as exc: # Guard against race condition
347 # if exc.errno != errno.EEXIST:
348 # raise
349
350 image = Image.fromarray((depth - depth_min) / (depth_max - depth_min) * 255).convert("L")
351 image.save(filename)
352 return 1
353
354
355# project the reference point cloud into the source view, then project back

Callers

nothing calls this directly

Calls 2

saveMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected