Ceres-Solver求解非線性最小二乘問題

ceres::Problem problem;
ceres::Solver::Options options;
ceres::Solver::Summary summary;

problem和option
定義問題+優化選項, summary爲優化過程的verbose

  ResidualBlockId AddResidualBlock(
      CostFunction* cost_function,  # 代價函數
      LossFunction* loss_function,  # 損失函數
      const std::vector<double*>& parameter_blocks);  # 參數列表

loss_function can be nullptr, in which case the cost of the term is just the squared norm of the residuals.
loss_function在未指定(nullptr)的情況下,即爲residual的平方範數

cost_function和loss_function和Problem類(或實例化的對象)進行鏈接

loss_function通常用於減少outlier對cost_function的影響

BA優化:http://ceres-solver.org/nnls_tutorial.html#bundle-adjustment
.bz2文件解壓:https://blog.51cto.com/u_11451275/5288808

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章