Forum

Author Topic: export point cloud formats  (Read 14891 times)

wrumm

  • Newbie
  • *
  • Posts: 7
    • View Profile
export point cloud formats
« on: June 24, 2011, 10:28:13 AM »
Hi,
there seems to be a bug in the point cloud export. I compared the bundler.out and the photoscan .xml and there seems to be a false sign in there. The values of the second and the third row of the rotation in the .out are negated/inverted. also y and z of the translation is affected, not x.

when I export a .out file and import it again, the point cloud is shifted and doesn't fit the cameras anymore. (or the cameras are shifted....)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: export point cloud formats
« Reply #1 on: June 24, 2011, 01:41:58 PM »
Hello wrumm,

There is a difference between PhotoScan xml and bundler formats. Bundler does not save all the intrinsic camera parameters, it keeps only one focal length and K1, K2 radial lens distortion coefficients. Thus, when you import bundler data out the information about principal point is lost and Cx, Cy in this case are counted as center of photo.

The signs of two rows in camera rotation matrix are different because bundler defines camera coordinate system differently from PhotoScan. The Z axis points forwards in PhotoScan, while in bundler its direction is inverted.

We haven't observed data coordinates shift during our experiments. Can you please provide the methodology you have used to figure that?
Best regards,
Alexey Pasumansky,
Agisoft LLC

wrumm

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: export point cloud formats
« Reply #2 on: June 24, 2011, 02:36:31 PM »
Thanks Alexey,
I still need to understand the matrix math behind it, but you have to be right, as I don't see any problems with the orientation.
but I still can't see why the y and z -ordinate of the translation is also inverted. it would explain the shift at least...

What I did is to align a couple of images, export points as a bundler.out, and import it again via import cameras.

have a look at the two screenshots.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: export point cloud formats
« Reply #3 on: June 24, 2011, 03:26:44 PM »
Hello wrumm,

Thank you for reporting. Now we've tracked the problem and it will be fixed in the next update.
Until that it is recommended to rebuild point cloud just after importing cameras (PhotoScan shows corresponding dialog box).

This problem is not connected with the inverted signs of translation and rotation matrix. The translation component of the camera projection matrix is not the same as camera center coordinates, but rather a transformed vector using the following equation: T = - R * O. Here R is the camera rotation matrix, O - camera center. As can be easily seen, inversion of the last 2 row signs in rotation matrix leads to inversion of the last 2 components of the translation vector.
Best regards,
Alexey Pasumansky,
Agisoft LLC