Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: pjenness on March 02, 2014, 11:53:28 PM

Title: Camera isAligned, isCalibrated?
Post by: pjenness on March 02, 2014, 11:53:28 PM
Hiya

Im looping thru cameras in my active chunk and want to test each one if they are aligned (maybe later if calibrated)

is there an attribute or function that I can acesss?

Something like:



Code: [Select]
import PhotoScan

doc = PhotoScan.app.document
myActiveChunk = doc.activeChunk
myCameras = myActiveChunk.cameras

for eachCamera in myCameras:
   
   if eachCamera.isAligned:
         
          print ('I am aligned ' )


Looking thru the api I cant find anything. Only an int for how many cameras aligned in a chunk.
 
Title: Re: Camera isAligned, isCalibrated?
Post by: Alexey Pasumansky on March 03, 2014, 02:51:51 AM
Hello pjenness,

you can check if camera.transform is None or not:

if camera.transform:
    print("I am aligned")