Objectron icon indicating copy to clipboard operation
Objectron copied to clipboard

Loading poses into COLMAP

Open weders opened this issue 2 years ago • 3 comments

I need to load the poses obtained from this dataset into COLMAP. While I am aware of this thread, following it does not yield satisfactory results.

Given the convention, one would need to invert the y-axis and z-axis of the pose such that it aligns with the CV camera convention (x right, y down, z in camera viewing direction). However, this does not give correct results. Is any preprocessing happening between raw ARKit poses and the ones stored in the geometry.pbdata file?

Thanks!

weders avatar May 11 '22 11:05 weders

The geometry.pbdata contains the original ARKit camera poses.

@lzhang57 did this the other way around (bringing COLMAP camera poses to our coordinates without any problem. The result are written in sfm_arframe.pbdata file next to geometry.pbdata. The pose/point cloud in sfm_arframe.pbdata is computed using COLMAP then converted to our coordinate system.

ahmadyan avatar May 12 '22 16:05 ahmadyan

Thanks a lot for the answer! Is this code for the COLMAP conversion available?

weders avatar May 12 '22 17:05 weders

Hi weder,

When converting camera coordinates from COLMAP to our convention, we left multiplied the view_matrix with the below adjust_matrix, which swaps x and y and inverts z:

adjust_matrix = np.array(
    [[0.,   1.,   0.],
     [1.,   0.,   0.],
     [0.,   0.,  -1.] ])

You can just do it reversely.

lzhang57 avatar May 12 '22 18:05 lzhang57