colmap / glomap

GLOMAP - Global Structured-from-Motion Revisited
BSD 3-Clause "New" or "Revised" License
1.3k stars 77 forks source link

Definition of PosePrior misalignment with colmap database. #34

Closed sephyli closed 1 month ago

sephyli commented 1 month ago

I'm working on the data loader for the pose prior. I found some code here in fuction ConvertDatabaseToGlomap.

const colmap::PosePrior prior = database.ReadPosePrior(image_id);
if (prior.IsValid()) {
  ite.first->second.cam_from_world = Rigid3d(
      colmap::Rigid3d(Eigen::Quaterniond::Identity(), prior.position));
} else {
  ite.first->second.cam_from_world = Rigid3d();
}

Should the pose prior be the camera projection center (T for cam_to_world matirx), rather than T for cam_from_world matrix?

ahojnnes commented 1 month ago

Thanks, this is a bug, it should be the projection centers, so there is a - missing given no prior orientation. @lpanaf FYI.