I am trying to generate multiple Orthomosiac by using script.
Staring point: I have refined Mesh.
m1 = getMarker(chunk, "ms1")
m2 = getMarker(chunk," ms2")
m3 = getMarker(chunk, "ms3")
horizontal = m2.position - m1.position
vertical = m3.position - m1.position
normal = cross(vertical, horizontal)
vertical = cross(horizontal, normal)
horizontal = horizontal.normalized()
R = Metashape.Matrix ([horizontal, vertical, -normal])
proj = Metashape.Matrix().Rotation(R)
print("proj =", proj )
#build orthomosaic
chunk.buildOrthomosaic(surface_type=Metashape.ModelData, blending = Metashape.MosaicBlending, fill_holes = True, projection = proj)
out:
proj = Matrix([[-0.9827276862695309, -0.120715591313001, 0.14026418164765703, 0.0],
[0.1424250150004323, -0.009418997985549706, 0.9897607779554991, 0.0],
[-0.1181584095249299, 0.9926424474557295, 0.02644923000085686, 0.0],
[0.0, 0.0, 0.0, 1.0]])
ValueError: Invalid argument value: projection
2020-01-23 10:21:47 Error: Invalid argument value: projection
This script was working with photoscan but not with Metashape 1.6.