Starting from version 1.8 Agisoft Metashape Professional supports data processing of smart cameras with a depth sensor.


Depth sensor is installed on the range of Apple devices with TrueDepth camera, that is the selfie camera of iPhone starting from the 10th version (except SE) and the front camera of iPad pro. 


Depth maps provided by the iPhone rear camera (with LiDAR as well) are not suitable for surface reconstruction.

Also the depth format is embedded by the Google Camera application in portrait mode. The list of smartphones is limited to the devices that are supported by the Google Camera application. 


For TrueDepth camera and for Google Camera application format the depth information is recorded as an additional attribute of the captured images. For this data format the images are to be imported in Metashape Pro with File>Import>Import laser scans command. In the Import Laser scans dialog select the desired photos and the directory to which the preprocessed photos will be saved:



Starting from Metashape Professional 2.0.0, the Import Depth Maps command will be added (File > Import > Import Depth Images). The Import Depth Images command is intended to be used only for RGBD images from smartphones equipped with TOF depth sensor or similar devices. 


In a separate case when depth information is saved by the camera as a separate image file it is recommended to use a script to import data. The dataset from such camera would include two subsets of images: color photos and images with depth maps. Use the script outlined below to import the depth information to Metashape Pro


Metashape.app.document.chunk.importLaserScans(filenames = ["/path/to/depth/image-1"], color_filenames = ["/path/to/corresponding/color/image-1"], image_path = "/path/to/destination/folder/{filename}.tif");


Where: 

  • filenames - array of depth map paths;
  • color_filenames - array of color photo paths;
  • image_path - path template for preprocessed photos.


If multiple images are used, then their paths should be separated by commas. Example: 
filenames = ["//example/IMG_0860_depth.tif", "//example/IMG_0861_depth.tif", "//example/IMG_0862_depth.tif"]



Or you can use the following commands and select all TIFF files from each folder (with depth map, and folder with RGB images):


import Metashape
filenames = Metashape.app.getOpenFileNames() #select all TIFF files from "Depth maps" folder
color_filenames = Metashape.app.getOpenFileNames() #select all JPEG files from "RGB" folder
Metashape.app.document.chunk.importLaserScans(filenames=filenames , color_filenames=color_filenames , image_path = "D:/New Folder/{filename}.tif") #command for import in Metashape 1.8
#Metashape.app.document.chunk.importDepthImages(filenames=filenames , color_filenames=color_filenames , image_path = "D:/New Folder/{filename}.tif") #command for Metashape 2.0


After running the script the images with depth maps will be added to the project: