I've been working on a short script to process a batch of photo sets taken with a small camera rig (15 cameras). Manually, the process works fine, but I'm noticing a difference when writing the script. First, the manual process:
1) Add Photos
2) Import markers (exported from a photoset of a calibration object with a set of known markers)
3) Align photos
The process continues, but at this point I have a sparse point butt of the subject, aligned to my coordinate system and scaled appropriately.
The code that I'm using to replicate this process (I've set the cwd to the directory with the pics in it already):
pics = ["1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7.jpg","8.jpg","9.jpg","10.jpg","11.jpg","12.jpg","13.jpg","14.jpg","15.jpg"]
chunk = doc.addChunk()
chunk.importMarkers(markerPath)
chunk.addPhotos(pics)
chunk.matchPhotos(accuracy=Metashape.HighAccuracy, generic_preselection=True,reference_preselection=False)
chunk.alignCameras()
When running the script, I get a sparse butt and the targets exist, but are not where I'd expect them to be (relative to the cameras) based on the manual process. I've attached a pair of screenshots showing the different results from manual vs. script. As a side note - manually, it does not matter if markers are imported before or after cameras are aligned, it works either way. Neither way works in the script.