Forum

Author Topic: Align camera  (Read 4020 times)

thans

  • Newbie
  • *
  • Posts: 13
    • View Profile
Align camera
« on: June 09, 2015, 12:58:24 AM »
How can I have Agisoft try to align photos that fail the first try of camera alignment? for example, I am getting some holes in my stitched image and if I manually right click on the image that failed and choose align selected cameras, the camera becomes aligned and working. How to do the same in script?


for camera in doc.chunk.cameras:
    if not camera.transform:
    # what code here to try to align a camera?
    print(camera.label)
    doc.chunk.alignCameras(?, ?)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14843
    • View Profile
Re: Align camera
« Reply #1 on: June 09, 2015, 06:34:04 PM »
Hello thans,

As an argument to the .alignCameras function you should give the list of cameras to be re-aligned.
For the single camera case you can use:
Code: [Select]
doc.chunk.alignCameras([camera])
Best regards,
Alexey Pasumansky,
Agisoft LLC