Forum

Author Topic: how to use split_in_chunks.py in the python API  (Read 239 times)

ronan

  • Newbie
  • *
  • Posts: 10
    • View Profile
how to use split_in_chunks.py in the python API
« on: November 26, 2018, 06:36:07 PM »
Hi,
I like to buid the cloud and the model of my project using the python script split_in_chunk.py

This the is code of my single chunck config:

#########

doc = PhotoScan.Document()
doc.open(project_path)

chunk = doc.chunk
doc.save() # to check license

chunk.buildDenseCloud(quality=PhotoScan.UltraQuality, filter=PhotoScan.MildFiltering)
doc.save()

chunk.buildModel(surface       = PhotoScan.Arbitrary,
                 source        = PhotoScan.DenseCloudData,
                 face_count    = PhotoScan.HighFaceCount,
                 interpolation = PhotoScan.EnabledInterpolation)
chunk.model.closeHoles()
doc.save()

################

how can I do the same thing and use split_in_chunck.py ?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 9917
    • View Profile
Re: how to use split_in_chunks.py in the python API
« Reply #1 on: November 26, 2018, 07:04:22 PM »
Hello ronan,

In the sample script (https://github.com/agisoft-llc/photoscan-scripts/blob/master/src/split_in_chunks_dialog.py) the lines #239 - 318 represent the actions that are applied to the smaller chunks (duplicated source alignment with the smaller bounding box). If you are using the script as a reference, you can substitute the content inside the bottom level loop and use your dense cloud and mesh generation and close holes operation applied.
Best regards,
Alexey Pasumansky,
AgiSoft LLC