Forum

Author Topic: chunk.updateTransform() not working in networkclient  (Read 1401 times)

Nausicaa

  • Newbie
  • *
  • Posts: 1
    • View Profile
chunk.updateTransform() not working in networkclient
« on: June 07, 2018, 05:15:23 AM »
I want to georeference photos using ground control points.

Everything is fine not using network mode.Script is like this.
Code: [Select]
#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.
Code: [Select]
#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.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14855
    • View Profile
Re: chunk.updateTransform() not working in networkclient
« Reply #1 on: June 12, 2018, 03:53:59 PM »
Hello Nausicaa,

Update transform operation is applied to modify the exterior orientation of the model basing on the source values in the Reference pane. If there are no aligned cameras - there's nothing to align.

The reference information should be automatically applied during align cameras operation.

If you have both projects from the network processing and from the GUI processing - is there any difference in the Reference pane or in the Reference pane settings?
Best regards,
Alexey Pasumansky,
Agisoft LLC