Hello,
I'm working on a script to build a DEM. But after running it, I get "Error: Empty frame path" and see the message "Please save project in PSX format before processing".
What is wrong in my script?
import os, Metashape
doc = Metashape.app.document
chunk = doc.addChunk()
Pfad1 = "C:/Users/Desktop/TIFF"
Liste = os.listdir(Pfad1)
Fotos = list()
for Foto in Liste:
Fotos.append("/".join([Pfad1, Foto]))
chunk.addPhotos(Fotos)
Pfad2 = "C:/Users/Desktop/Referenz.csv"
chunk.importReference(Pfad2, format = Metashape.ReferenceFormatCSV, columns = 'nxyz', delimiter = ';', skip_rows = 1)
chunk.matchPhotos(downscale = 4, generic_preselection = True, reference_preselection = True)
chunk.alignCameras()
chunk.buildDepthMaps(downscale = 4, filter_mode = Metashape.MildFiltering, reuse_depth = False)
chunk.buildDenseCloud()
doc.save("C:/Users/Desktop/Das Erste.psx")
chunk.buildDem(source_data = Metashape.DenseCloudData, interpolation = Metashape.EnabledInterpolation)
Best Regards
Mojtaba Goudarzi