Forum

Author Topic: Camera Projection Matrix  (Read 2837 times)

mvol12

  • Newbie
  • *
  • Posts: 7
    • View Profile
Camera Projection Matrix
« on: May 16, 2016, 12:56:02 PM »
Using the python interface I have rendered the model from the viewpoint of each camera but I am unable to reproduce the same camera viewpoints though my OpenSceneGraph based visualisation tool.

From reading other forum posts my understanding is that the camera matrix transform consists of a 3x3 rotation matrix and a 3x1 translation vector as below:
[R  t
0 0 0 1]

I have changed from a right handed to a left handed coordinate system and the cameras appear to be in the correct position with respect to the model.

My question is how is Agisoft simulating the camera projection matrix from the camera intrinsics (the mapping from view space to screen coordinates) ?

I have used the following approach in the past to successfully simulate a pinhole camera but perharps this is the source of my problems,
M =
[fx 0 -cx 0
0 fy -cy 0
0 0    X  Y
0 0    -1  0]

X = near + far
Y = near * far
Projection Matrix = Ortho(0, width, height, 0, near, far)  * M

Taken from : https://sightations.wordpress.com/2010/08/03/simulating-calibrated-cameras-in-opengl/

Note: All distortion parameters from Agisoft were fixed to zero before aligning and exporting the camera calibration.


Kind Regards,
Marco
« Last Edit: May 16, 2016, 03:34:29 PM by mvol12 »