Forum

Author Topic: [SOLVED] Errors exporting the data  (Read 7099 times)

nomino

  • Newbie
  • *
  • Posts: 11
    • View Profile
[SOLVED] Errors exporting the data
« on: April 03, 2015, 03:40:18 PM »
I am using Photoscan 1.1.4 64bit for windows.
I need to import the 3d model computed by photoscan into matlab. The model has been computed using pre-calibrated fix parameters.
I exported the model as an .obj file and the extrinsic parameters either in the format phi kappa omega .txt OR photoscan .xml. The extrinsic parameters in this two models differ by a rotation matrix, for instance, the rotation matrix exported in the .xml file is the R matrix of the .txt file rotated by 180° around the x axis.

Moreover, I get a "correct" reprojection of the points only when I use the phi kappa omega .txt file to obtain the parameters, and I multiply the x coordinate of the translation vector by -1 and invert the x-axis on the frame i.e. u = width - u. Or, in other words, when  I multiply the x coordinate of the translation vector and the x focal length by -1.

To reproject the 3D-points I followed the schema reported in the manual and I even tried to apply the function developed into the calibration toolbox from Caltech. The reprojection using these two methods are identical, but they are correct only when I apply that sort of patch.

EDIT: I checked with another model exported from the same set of photos and configuration, this time neither that patch works... This model is smaller and it is not centered in the z axis as the previous one.


Thank you in advance.
« Last Edit: April 22, 2015, 10:52:08 AM by nomino »

nomino

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Errors exporting the data
« Reply #1 on: April 07, 2015, 11:06:48 AM »
Does anyone ever tried to build a 3D model with photoscan and do a sanity-check projecting the 3D points in the oringinal frames? Did it work? How you exported the data?

EDIT: (SOLVED?) Using the parameters exported in the .xml file and multiplying the 3D points by -1, it makes the reprojection better but points still do not match, they are translated by an off-set...

EDIT: (SOLVED!) in another post the user William reported me that photoscan exports the inverse of the standard notation of the matrix P, i.e. the martix maps the coordinates from the camera frame to the world frame and not vice versa, as usual.
Thus, inverting the matrix P actually solved the problem!
« Last Edit: April 22, 2015, 10:55:43 AM by nomino »