Forum

Author Topic: Modify the capture distance in the chunk reference setting by python  (Read 1720 times)

howcanoewang

  • Newbie
  • *
  • Posts: 9
    • View Profile
Hello, I am writing scripts for batch processing, but hard to find the API to modify this value. Any ideas to implement this without manually changing chunks one by one?



Thanks for your help.
« Last Edit: June 19, 2022, 10:04:45 AM by howcanoewang »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Modify the capture distance in the chunk reference setting by python
« Reply #1 on: June 22, 2022, 07:27:15 PM »
Hello howcanoewang,

You can set this value as following:

Code: [Select]
chunk = Metashape.app.document.chunk
capture_distance = 10.5
chunk.meta['subject_distance'] = str(capture_distance)
Best regards,
Alexey Pasumansky,
Agisoft LLC

howcanoewang

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Modify the capture distance in the chunk reference setting by python
« Reply #2 on: July 06, 2022, 05:26:42 AM »
Dear Alexey,

Thank you for your reply, that works for me!

Sincerely,
Howcanoe

Seboon

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Modify the capture distance in the chunk reference setting by python
« Reply #3 on: March 09, 2024, 09:43:01 PM »
Hi,

I would like to set the capture distance for each camera in a python script. I'm using Metashape 2.1.0, and it seems there is no command for that in the API?

Any solutions or ideas ?

Thanks in advance!
« Last Edit: March 09, 2024, 09:47:19 PM by Seboon »
S.Poudroux
Archaeologist - Topographer - Drone remote pilot