Bundle adjustment weighting with GCP variance information

194 views
Skip to first unread message

Niko Haaraniemi

unread,
Oct 19, 2021, 8:26:14 AM10/19/21
to Ceres Solver
Hello Ceres,

I'm wandering inside openMVG's bundle adjustment code and looking for advice how to add information about ground control point accuracy for the adjustment weighting.
At the moment openMVG calculates 2d pixel residuals from observed image coordinates and projected GCPs on the image plane and weights them with an arbitrary value of 20.

I know that my GCPs' tachymeter measurement standard deviations for XYZ are ~3mm. I was thinking if I could transform my 3d variance information to 2d pixel values and weight the residuals with this information. But then I need the block's Jacobian for this calculation (https://stackoverflow.com/questions/49239473/how-to-project-3d-covariance-matrix-to-a-given-image-plane-pose)? Is this possible to obtain some how from auto-differentiated cost function?

I was also thinking that maybe I need to change the whole cost function from dealing with pixels residuals to 3d by calculating the difference between GCPs and triangulated GCPs' image observations and then weighting them. Would this make more sense?

Sincerelly,
Niko

Sameer Agarwal

unread,
Oct 19, 2021, 2:19:35 PM10/19/21
to ceres-...@googlegroups.com
why not just add a cost function that measures distance in 3d space between the triangulated point and the GCP, weighted by the uncertainty in 3d space ?

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/212c0afd-492c-4ef6-aa87-2a39090138ffn%40googlegroups.com.

Niko Haaraniemi

unread,
Oct 26, 2021, 3:02:32 AM10/26/21
to Ceres Solver
Hey,

I did that and it seems to work.

I did the weighting of the residuals in the cost function with  C^-1/2. This is the correct way right?

Thank you for the support :)

Sameer Agarwal

unread,
Oct 26, 2021, 9:39:22 AM10/26/21
to ceres-...@googlegroups.com
yes that sounds right.

Zihao Yu

unread,
Oct 17, 2022, 11:20:40 PM10/17/22
to Ceres Solver
Hi, I had the same problem. If we use the uncertainty in 3D space to weight the measured distance in 3d space between the triangulated point and the GCP, only the 3D position of  the triangulated point has been constrained. We might still need to use the reprojection error cost funciton and the 3D position of the triangulated point  to constrain the pose of cameras. Then how to weight the reprojection error cost function? Thank you!

Sameer Agarwal

unread,
Oct 18, 2022, 1:12:58 PM10/18/22
to ceres-...@googlegroups.com
You can add weighting to any cost function. There is nothing special about this reprojection error.
Sameer


Niko Haaraniemi

unread,
Jan 2, 2023, 3:31:52 AM1/2/23
to Ceres Solver
Hey yzhyu,

I personally weighted also the GCPs' image observation residuals with the value of 20. This might me be too optimistic value (0.05px) depending how the points are recognized.

-Niko
Reply all
Reply to author
Forward
0 new messages