Forum

Author Topic: network matchPhoto  (Read 1435 times)

togne

  • Newbie
  • *
  • Posts: 4
    • View Profile
network matchPhoto
« on: February 21, 2019, 07:13:34 PM »
Hello
I want to make a network matchPhoto with several PCs with the following python code.
When I run my script the server generates a spot whereas if I run by the build point cloud command the server generates 16 spots
thank you

import Metashape

path = "B:/TEST_JANVIER_2019/Togne_NetWork/Match_NetWork.psx"

doc = Metashape.Document()
doc.open(path)
chunk = doc.chunk
client = Metashape.NetworkClient()

tasks = list()

task = Metashape.Tasks.MatchPhotos()
task.downscale = 2
task.keypoint_limit = 10000
network_task = Metashape.NetworkTask()
network_task.name = task.name
network_task.params = task.encode()
network_task.frames.append((chunk.key, 0))
tasks.append(network_task)

client.connect("192.168.0.193") #server ip
batch_id = client.createBatch(path, tasks)
client.resumeBatch(batch_id)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: network matchPhoto
« Reply #1 on: February 21, 2019, 07:48:57 PM »
Hello togne,

Have you tried to perform a similar operation in local mode? After defining the task parameters use task.apply(chunk) call. Is the result the same?

Also are you running the operation in the chunk that already contain the tie point cloud or not?
Best regards,
Alexey Pasumansky,
Agisoft LLC

togne

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: network matchPhoto
« Reply #2 on: February 21, 2019, 08:51:38 PM »
Thanks Alexey
I thought, just add 'Tasks.network_distribute = True'
cordially
togne