Forum

Author Topic: detect image on chunk NOT algined after alignCameras  (Read 2517 times)

nopaixx

  • Newbie
  • *
  • Posts: 7
    • View Profile
detect image on chunk NOT algined after alignCameras
« on: July 20, 2018, 01:50:38 PM »
Hello, im try after run aligncameras, need detect not aligned cameras:

chunk.alignCameras();

numalgined(chunk)-->return num unaligned cameras...


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15177
    • View Profile
Re: detect image on chunk NOT algined after alignCameras
« Reply #1 on: July 20, 2018, 03:18:50 PM »
Hello nopaixx,

I think you can use something like the following to get the number of aligned cameras in the chunk:
Code: [Select]
def numaligned(chunk):
    num_aligned = 0
    for camera in chunk.cameras:
        if camera.transform:
            num_aligned += 1
    num_not_aligned = len(chunk.cameras) - num_aligned
    return num_aligned
Best regards,
Alexey Pasumansky,
Agisoft LLC