I want to georeference photos using ground control points.
Everything is fine not using network mode.Script is like this.
#addPhotos
#import control points
chunk.updateTransform()
chunk.matchPhotos()
chunk.alignCameras()
chunk.exportPoints(objpath,PhotoScan.PointCloudData,format=PhotoScan.PointsFormatOBJ)
doc.save(psxpath,chunks=[chunk])
The exported points is georeferenced.I open the saved doc in interface.The control points are imported and pinned correctly.
But in network mode,I get wrong results.
#init client
#addPhotos
#import control points
chunk.updateTransform()
doc.save(psxpath,chunks=[chunk])
tasklist = []
task = PhotoScan.NetworkTask()
for c in doc.chunks:
task.frames.append((c.key,0))
task.name = "MatchPhotos"
task.params['network_distribute'] = True
tasklist.append(task)
task = PhotoScan.NetworkTask()
for c in doc.chunks:
task.chunks.append(c.key)
task.name = "AlignCameras"
task.params['network_distribute'] = True
tasklist.append(task)
task = PhotoScan.NetworkTask()
for c in doc.chunks:
task.frames.append((c.key,0))
task.name = "ExportPoints"
task.params['path'] = objpath
task.params['format'] = int(PhotoScan.PointsFormatOBJ)
task.params['data_source'] = int(PhotoScan.PointCloudData)
tasklist.append(task)
batch_id = client.createBatch(psxpath, tasklist)
client.resumeBatch(batch_id)
This script runs,but points are not georeferenced.
I think updateTransform() work the same as Update button in Reference page.In interface when I click Update button,the doc is modified,and need to be save.I wonder if it is because updateTransform() function is not saved in doc.If so,how can I solve this?
I'm using Photoscan pro 1.4.0,win10.Any advice would help, thank you.