Forum

Author Topic: Exporting cameras as Rodrigues vector  (Read 3414 times)

grommit

  • Newbie
  • *
  • Posts: 32
    • View Profile
Exporting cameras as Rodrigues vector
« on: February 25, 2015, 11:15:30 PM »
Hi all,
I'm tasked with converting the Agisoft camera calibrations to OpenCV, and I'd like to write straight out from Photoscan a file that contains the xyz translation of a camera and a Rodrigues vector decribing its aim and rotation. Can anyone give a hint as to how to access the needed extrinsic data from AGI inside Python?

Guessing out loud:

import cv2
import PhotoScan
from cv2 import Rodrigues

doc = PhotoScan.app.document
camera=doc.chunk.cameras[0]
cv2.Rodrigues(camera.transform,myRod)
myStation=camera.center

...savesomething
« Last Edit: February 26, 2015, 03:51:05 AM by grommit »