Forum

Author Topic: Chunk Workflow Status  (Read 3429 times)

naren951

  • Newbie
  • *
  • Posts: 6
    • View Profile
Chunk Workflow Status
« on: August 17, 2021, 05:29:10 PM »
Is there a way to know what are all the operations that have been performed on the Chunk using the Python API?

For Example: Let's say we perform chunk.matchPhotos() and Chunk.alignPhotos(), is there a way to know these 2 operations were performed.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Chunk Workflow Status
« Reply #1 on: August 17, 2021, 08:49:00 PM »
Hello naren951,

You can check, if the corresponding assets exist in the chunk:
chunk.point_cloud, chunk.depth_maps, chunk.dense_cloud, chunk.model, chunk.elevation, chunk.orthomosaic, chunk.tiled_model.
then access it's meta information:
chunk.meta, chunk.point_cloud.meta, chunk.dense_cloud.meta and etc. it contains the information about the processing parameters used and time spent on the corresponding processing stage.
Best regards,
Alexey Pasumansky,
Agisoft LLC

naren951

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Chunk Workflow Status
« Reply #2 on: August 18, 2021, 03:43:55 PM »
Thank you so much Alexey Pasumansky, is there a way to know if alignCameras and matchPhoto has been executed before?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Chunk Workflow Status
« Reply #3 on: August 18, 2021, 04:06:42 PM »
Hello naren951,

If there's no tie point cloud in the chunk (chunk.point_cloud == None), then it means that image matching hasn't been performed. If it exists, you can check for the meta-information that I have previously mentioned.

In case camera alignment hasn't been performed, camera.transform for all cameras in the chunk should be None as well (i.e. all cameras are not aligned).
Best regards,
Alexey Pasumansky,
Agisoft LLC

naren951

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Chunk Workflow Status
« Reply #4 on: October 13, 2021, 09:03:51 AM »
Is there a way to know if build texture has been run?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: Chunk Workflow Status
« Reply #5 on: October 13, 2021, 12:27:03 PM »
Hello naren951,

The following code returns the types of the generated textured for the model, if at least one texture exists:

Code: [Select]
if chunk.model.textures:
    for texture in chunk.model.textures:
        print(texture.type)
else:
    print("no textures for model")
Best regards,
Alexey Pasumansky,
Agisoft LLC