Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: Alexis on May 07, 2021, 10:39:15 PM

Title: Reset camera alignment on list of Cameras
Post by: Alexis on May 07, 2021, 10:39:15 PM
Hello,

I'm working with drone data, and after aligning the cameras, I want to go back and reset the alignment on a list of 'badCameras' which are causing tie points to fly off in space.

I'm just looking to replicate right clicking an image in the GUI and running 'Reset Camera Alignment' for the list of cameras I've already identified.

Thanks!
Title: Re: Reset camera alignment on list of Cameras
Post by: Paulo on May 08, 2021, 04:21:36 AM
Hi Alexis,

you can just create BadCameras list and populate it with your bad cameras and then just use following:

Code: [Select]
for c in BadCameras:
      c.transform = None

Hope this can help,
Title: Re: Reset camera alignment on list of Cameras
Post by: Alexis on May 10, 2021, 10:15:59 PM
...
Title: Re: Reset camera alignment on list of Cameras
Post by: Alexis on May 10, 2021, 10:16:49 PM
Code: [Select]
for c in BadCameras:
      c.transform = None

Thanks Paulo, that worked!  :D