where can I find the processing log file, as when it got killed, the UI is closed , so I can not see the log from "console"
and here is the script:
import glob
import os
from time import time
import PhotoScan
def build3D():
start = time()
index_id = 0
prefix = []
prefix.append("/home/Documents/wangyuqing2/1")
for dirs in os.listdir(str(prefix[0])):
dir_sub = dirs
if dir_sub[-4:].lower() != ".psz" and dir_sub != "." and dir_sub != ".." :
dir = glob.glob(str(prefix[0]) + '/' + dir_sub + '/*.JPG')
dir_choice = []
count = 0
num = len(dir)
for dir_sub in dir:
count = count + 1
fout.write("count:" + str(count) + '\n')
dir_choice.append(dir_sub)
fout.write("Image file:" + dir_sub + '\n')
if count > num:
break
if count == num:
index_id = index_id + 1
PhotoScan.app.gpu_mask = 3
doc = PhotoScan.app.document
chunk = doc.addChunk()
chunk.addPhotos(dir_choice)
camera = chunk.cameras[0]
camera.photo.meta["Exif/FocalLength"]
for frame in chunk.frames:
frame.matchPhotos(accuracy = PhotoScan.HighAccuracy,preselection=PhotoScan.GenericPreselection)
chunk.alignCameras()
stop1 = time()
fout.write("Finish read and alignment: " + str(stop1 - start) + "s\n")
chunk.buildDenseCloud(quality = PhotoScan.HighQuality,filter=PhotoScan.FilterMode.AggressiveFiltering)
stop2 = time()
fout.write("Finish build dense cloud: " + str(stop2 - stop1) + "s\n")
chunk.buildModel(surface = PhotoScan.Arbitrary, interpolation = PhotoScan.EnabledInterpolation)
stop3 = time()
fout.write("Finish build model: " + str(stop3 - stop2) + "s\n")
chunk.buildUV(mapping = PhotoScan.GenericMapping)
stop4 = time()
fout.write("Finish build UV: " + str(stop4 - stop3) + "s\n")
chunk.buildTexture(blending = PhotoScan.MosaicBlending,size = 4096)
stop5 = time()
fout.write("Finish build texture: " + str(stop5 - stop4) + "s\n")
stop = time()
fout.write("Finish all: " + str(stop-start) + "s\n")
chunk.exportModel("/home/Documents/wangyuqing2/result_1/",texture_format='jpg')
project_path = ("/home/Documents/wangyuqing2/result_1/"+str(index_id)+".psz")
if project_path[-4:].lower() != ".psz":
project_path += ".psz"
print(project_path)
fout.write("Saving to:" + project_path + '\n')
try:
doc.save(project_path)
except:
PhotoScan.app.messageBox("Can't save project")
doc.clear()
def main():
build3D()
if __name__ == '__main__':
main()