Hello,
i have captured a building with my drone and wanted to generate orthomosaics of all its facades. I transformed it to a local coordinate system so the building is parallel to XY.
Now i realized i do not have the options for front XY etc. when batch processing orthomosaics. Is there a solution for this?
I have found the following code in an old thread:
import PhotoScan
front = PhotoScan.Matrix([[1, 0, 0, 0],[0, 0, 1, 0],[0, -1, 0, 0],[0, 0, 0, 1]])
back = PhotoScan.Matrix([[-1, -0, -0, 0],[0, 0, 1, 0],[0, 1, 0, 0],[0, 0, 0, 1]])
left = PhotoScan.Matrix([[-0, -1, -0, 0],[0, 0, 1, 0],[-1, 0, 0, 0],[0, 0, 0, 1]])
right = PhotoScan.Matrix([[0, 1, 0, 0],[0, 0, 1, 0],[1, 0, 0, 0],[0, 0, 0, 1]])
doc = PhotoScan.app.document
for chunk in doc.chunks:
if chunk.label.endswith("East"):
proj = right
elif chunk.label.endswith("South"):
proj = front
elif chunk.label.endswith("West"):
proj = left
else:
proj = back
chunk.buildOrthomosaic(surface=PhotoScan.DataSource.ModelData,blending=PhotoScan.BlendingMode.MosaicBlending,color_correction=False,projection=proj)
Would this code still work, do i just have to replace photoscan with metashape? Would it actually do what i described above? Sadly, im not very well versed in python or how to utilize metashapes API.
Thanks in advance!
Niklas