Minimizing an optimization problem with different residuals

63 views
Skip to first unread message

Subodh Mishra

unread,
Jan 17, 2022, 3:13:03 PM1/17/22
to Ceres Solver
Hello,

My goal is to minimize a cost function which involves two different kind of residuals. The first kind is a residual from difference in feature measurements and predicted feature measurements (something like Bundle Adjustment) and the second kind is a residual from difference in measurement pose (from GPS) and predicted pose.

Lets say these two different kinds of residual result in cost functions P1 and P2 respectively. When I try to jointly minimize them, I see that the effect of 1 cost function overwhelms the other. For instance (just for the sake of an example). if the maximum squared error in pixel measurements is in the order of 10e4 , the maximum squared error in pose measurement is in the order of 10e1, this difference in order of the errors makes one cost function dominate the optimization process as if the other does not exist.

Is there a way to handle such scenarios?

Thank you,
Subodh.

Sameer Agarwal

unread,
Jan 17, 2022, 3:44:39 PM1/17/22
to ceres-...@googlegroups.com
You are approaching this in a purely algebraic manner. Consider writing down the likelihood function for your problem and that will help you come up with the tradeoff between these two parts of your objective function. It is really a matter of how much you believe the information the information in each of the residuals.
Sameer


--
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/68636d9d-a39c-4aa0-bff4-1c67474dca87n%40googlegroups.com.

AegeanSea Whu

unread,
Jan 23, 2022, 10:08:37 AM1/23/22
to ceres-...@googlegroups.com
For instance (just for the sake of an example). if the maximum squared error in pixel measurements is in the order of 10e4 , the maximum squared error in pose measurement is in the order of 10e1, this difference in order of the errors makes one cost function dominate the optimization process as if the other does not exist.
  1. Mahalanobis distance should be used in Least Square. If the observation vector satisfies the normalized Gaussian distribution, such as x~N(0,1), y = Ax + e, the cost function is x = argmin(y - Ax)^t * (y - Ax). Otherwise, if x~N(0, sigma2),  x = argmin(y - Ax)^t * sigma2^-1* (y - Ax), sigma2 is the covariance of x. In ceres, using a prior weight to scale the residuals makes sense.
  2. In other cases, if there are outliers in the observations, the larger outliers are guaranteed to be removed before performing the least squares optimization. 
  3. Use the loss function in the objective function for observations with outliers.


Subodh Mishra <subo...@tamu.edu> 于2022年1月18日周二 04:13写道:
Reply all
Reply to author
Forward
0 new messages