1
Python and Java API / ViewPoint Rotation Matrix
« on: August 08, 2017, 11:14:22 PM »
Hello,
I am trying to generate a matching camera rotation matrix to the viewpoint. I use the "look through" option of camera 0 to get the correct viewpoint in the model viewer. From there, I want to reproduce chunk.cameras[0].transform using only the PhotoScan.app.viewpoint datastructure in my script.
I figured out I could get the translation component using the viewpoint center as follows:
However I could not get the same process to work on the rotation component.
Any help would be appreciated, thanks!
I am trying to generate a matching camera rotation matrix to the viewpoint. I use the "look through" option of camera 0 to get the correct viewpoint in the model viewer. From there, I want to reproduce chunk.cameras[0].transform using only the PhotoScan.app.viewpoint datastructure in my script.
I figured out I could get the translation component using the viewpoint center as follows:
chunk.transform.inv().mulp(PhotoScan.app.viewpoint.center)
However I could not get the same process to work on the rotation component.
Any help would be appreciated, thanks!