openMVG----linear programming

线性规划是最优化线性目标方程的技术,受限于线性等式个线性不等式:

openMVG提供LP容器,来配置线性规划;解决线性规划

openMVG linear program container
  • 一般的容器
// Dense LP
LP_Constraints
// Sparse LP
LP_Constraints_Sparse

允许包含:1,目标函数c和类型max or min;2,限制A, sign, b;3,关于x的限制<=,=,>=

openMVG linear program solvers

包括但不限于

  • OSI_CLP (COIN-OR) project,
  • MOSEK commercial, free in a research context.
使用

可用于

  • 经典的线性规划问题
  • 测试线性问题的可行性
  • 最优化可行问题的上界
// Setup the LP (fill A,b,c and the constraint over x)
LP_Constraints cstraint;
BuildLinearProblem(cstraint);

// Solve the LP with the solver of your choice
std::vector<double> vec_solution(2);
#if OPENMVG_HAVE_MOSEK
  MOSEK_SolveWrapper solver(2);
#else
  OSI_CLP_SolverWrapper solver(2);
#endif
// Send constraint to the LP solver
solver.setup(cstraint);

// If LP have a solution
if (solver.solve())
  // Get back estimated parameters
  solver.getSolution(vec_solution);
Require: gammaLow, gammUp (Low and upper bound of the parameter to optimize)
Require: the LP problem (cstraintBuilder)
Ensure: the optimal gamma value, or return infeasibility of the contraints set.

BisectionLP(
  LP_Solver & solver,
  ConstraintBuilder & cstraintBuilder,
  double gammaUp  = 1.0,  // Upper bound
  double gammaLow = 0.0,  // lower bound
  double eps      = 1e-8, // precision that stop dichotomy
  const int maxIteration = 20) // max number of iteration
{
  ConstraintType constraint;
  do
  {
    ++k; // One more iteration

    double gamma = (gammaLow + gammaUp) / 2.0;

    //-- Setup constraint and solver
    cstraintBuilder.Build(gamma, constraint);
    solver.setup( constraint );

    //-- Solving
    bool bFeasible = solver.solve();

    //-- According feasibility update the corresponding bound
    //-> Feasible, update the upper bound
    //-> Not feasible, update the lower bound
    (bFeasible) ? gammaUp = gamma; : gammaLow = gamma;

  } while (k < maxIteration && gammaUp - gammaLow > eps);
}
Multiple View Geometry solvers based on L-Infinity minimization
  • 多视图三角重构 [LinfNorm],
  • 估计P [LinfNorm],
  • 估计T和X:
    • the simple one [LinfNorm],
    • the robust based on slack variables [OlssonDuality].
  • Translation averaging: - Registration of relative translations to compute global translations [GlobalACSfM].
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值