Map colmap 3D points into target coordinate system

801 views
Skip to first unread message

Wayne Cochran

unread,
Nov 24, 2020, 10:38:05 PM11/24/20
to COLMAP
I need to map colmap's sparse reconstructed points into another  coordinate system. I will place fidicual markers into the scene that have known 3D geometry. My idea for how to do this is as follows:

  1. Run a sparse SfM reconstruction normally where 3D points end up in whatever coordinate system colmap chooses;
  2. Identify the fiducials in the images (either manually or otherwise) and project their image coordinates to colmap’s 3D coordinate system (via triangulation using multiple images and discovered camera parameters).
  3. Now I have the fiducials in both colmap’s coordinate system and in the desired target coordinate system. Construct an affine transformation (e.g., via linear least squares) that maps the fiducials from colmap’s coordinate system to the target coordinate system. Now I can map all the points from colmap’s coordinate system to the target coordinate system. In fact I can simply modify all of the camera extrinsic matrices to map directly to the target coordinate system.
  4. Now we can identify the points of interest in the images (again either manually or by hook or crook) and map them to their 3D coordinates (in the target coordinate system).
Is this a sane approach or is their another "best practices" approach I should be using?

Pierre-Olivier Agliati

unread,
Nov 25, 2020, 2:05:58 AM11/25/20
to col...@googlegroups.com
Hi Wayne,
Yes this is definitely a sane approach, this is actually the way it's performed when you use the georegistration command :
However it's limited to camera pose positions in this case, but the written code and the use of class SimilarityTransform3 can inspire you.

This assumes that the scene maps pretty good though because it's a rigid transformation  (with isotropic scaling).

When your scenes get larger, you'll need a more elaborate mechanism and to incorporate your GCP into a custom bundle adjustment so they can rectify the structure at a large scale. Photogrammetry is quite precise at short scales (relatively to your image field of view) but you always end up with a kind of error drift and scene distorsion while you register images.

I believe there were some posts in the past about the subject.

Cheers,
Pierre-Olivier 

--
You received this message because you are subscribed to the Google Groups "COLMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/7ed5882b-5c6e-440e-b296-fe631c5f1dfcn%40googlegroups.com.
Message has been deleted

Wayne Cochran

unread,
Nov 25, 2020, 1:26:33 PM11/25/20
to COLMAP
Great feedback! I will study the SimilarityTransform3 code.
Step 3b: Almost certainly we will need to perform bundle adjustment to refine 3D coords and camera matrices. Would it be easy to repurpose colmap's BA tools for this?

Pierre-Olivier Agliati

unread,
Nov 26, 2020, 5:03:35 AM11/26/20
to col...@googlegroups.com

Great feedback! I will study the SimilarityTransform3 code.
Step 3b: Almost certainly we will need to perform bundle adjustment to refine 3D coords and camera matrices. Would it be easy to repurpose colmap's BA tools for this?

You have to understand how CERES is used to perform the global minimization of errors and then to introduce your weighted reference points.
What is a little bit tricky is that you have to constantly juggle with the two coordinates systems to reinterpret your GCP real coordinates into the current SfM coordinate system which is always modified because of normalization.

 
Reply all
Reply to author
Forward
0 new messages