Hi there, I had this script which worked well back in version 1.4, and which i have to tried to update to work with 1.7.
Here is the minimal version, which simply tries to buildOrthomosaic using a front projection, instead of the 'standard' top projection:
>>> import Metashape
>>> app = Metashape.app
>>> myProjection = Metashape.OrthoProjection()
>>> myProjection.type = Metashape.OrthoProjection.Type.Planar
>>> myProjection.matrix = Metashape.Matrix([[1, 0, 0, 0],[0, 0, 1, 0],[0, -1, 0, 0],[0, 0, 0, 1]])
>>> chunk = app.document.chunks[25]
>>> chunk.buildOrthomosaic(projection=myProjection,surface_data=Metashape.DataSource.ModelData,blending_mode=Metashape.BlendingMode.MosaicBlending)
whatever I plug in to the projection.matrix seems to have no effect on the generated orthomosaic.
There is a difference in the console output if i do this through the python console/script or though the GUI, which is that my script always generates console output like this:
2021-10-20 12:16:18 BuildOrthomosaic: surface = Mesh, blending mode = Mosaic, refine seamlines = 0, ghosting filter = 0, resolution = 0
2021-10-20 12:16:18 initializing...
2021-10-20 12:16:18 Generating orthomosaic...
2021-10-20 12:16:18 Analyzing mesh...
Whereas using the GUI command to build orthomosaic i get output which explicitly declares that it is using a planar projection:
2021-10-20 12:19:14 BuildOrthomosaic: projection = Planar, surface = Mesh, blending mode = Mosaic, refine seamlines = 0, ghosting filter = 0, pixel size = 0.0010505 x 0.0010505
2021-10-20 12:19:14 Generating orthomosaic...
2021-10-20 12:19:14 initializing...
2021-10-20 12:19:14 Analyzing mesh...
I'd be so happy if i could just set my projection plane in the batch command window and not deal with python!