I am running the alignCameras() step on my imageset of 933 images using the python version of the software. For some reason, it is aligning only 127 out of the 933 images and the rest are not aligned (NA). The computer that I am using is a remote machine and does not have a user Interface.
I also ran the same set of images on a different computer with the user interface version of the software. Here all 933 images were aligned without any problem. I am wondering if I am making any mistake in the python code. The code is as follows.
import os
import Metashape
import numpy as np
# Use GPU
Metashape.app.gpu_mask=1
Metashape.app.cpu_enable=False
# End use GPU
#Load Images
pa='/home/nys09/'
pat='/home/nys09/Trial1Beamch_arc/'
b=[]
c=os.path.join(pa,"arc_imagelist_t1.txt")
images = open(c,"r+")
a = np.loadtxt(images,dtype=str)
for i in range(np.shape(a)[0]):
b.append(pat+str(a))
#Alignment
Metashape.app.settings.log_enable=True
Metashape.app.settings.log_path='/home/nys09/Trial1Beamch_arc/trial2logfile.txt'
doc = Metashape.Document()
doc.save(pat+"trial_alignment2.psz")
chunk = doc.addChunk()
chunk.addPhotos(b)
chunk.matchPhotos(accuracy=Metashape.HighAccuracy, generic_preselection=True,reference_preselection=False,keypoint_limit=40000, tiepoint_limit=4000)
chunk.alignCameras()
doc.save()
Also the log file is not being generated. I want all processing to be written to txt file as I am using the software without user interface.
Please help me with this issue.