Hi everyone,
I need to extract and store the scaled depth maps (exported after the mesh stage) for each image in my mosaics. For a given resolution, I am trying to find the smallest filesize to export, as they add up when there are tens of thousands of images.
The depth map needs to be a floating single channel image. Exporting as tiff (below) produces a single channel image with the actual values, so works great, but the file size is~20MB per the image resolution I need.
chunk = PhotoScan.app.document.chunk
for camera in chunk.cameras:
depth = chunk.model.renderDepth(camera.transform, camera.sensor.calibration)
depth = depth.convert(" ","F16")
depth.save("savepath" + camera.label + ".tif")
Exporting as .exr :
depth = depth.convert("RGB","F16")
depth.save("savepath" + camera.label + ".exr")
also works great and produces a 1.8 MB image for the same resolution - so huge improvement without much loss. But it makes a 3 channel image -- is there a way to export a single-channel exr from Metashape (or another format) that might even be smaller?
Thanks!