Questions tagged [ceres-solver]

ceres-solver is an open source C++ library for modeling and solving large, complicated optimization problems.

Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.

  • Non-linear Least Squares problems with bounds constraints.
  • General unconstrained optimization problems.
103 questions
59
votes
3 answers

Why don't C++ compilers do better constant folding?

I'm investigating ways to speed up a large section of C++ code, which has automatic derivatives for computing jacobians. This involves doing some amount of work in the actual residuals, but the majority of the work (based on profiled execution time)…
8
votes
2 answers

Ceres Solver: unable to disable logging (google glog)

I'm using ceres solver for a project, and when I call the ceres::Solve function, the library starts to output lines such as this one: iterative_schur_complement_solver.cc:88 No parameter blocks left in the schur complement. wall_time.cc:74…
Esparver
  • 1,515
  • 1
  • 15
  • 28
7
votes
1 answer

When to define multiple Residual blocks in Ceres?

I'm going through the Ceres Solver tutorial. Powell's Function Powell's function maps from R^4 -> R^4, so it seems intuitive to define one residual block that takes in a 4-element array x and fill in a 4-element array residual. Instead, the example…
3
votes
1 answer

How to Fix the Error One of CERES_USE_OPENMP, CERES_USE_CXX11_THREADS or CERES_NO_THREADS must be defined in Ceres Solver Android

I am integrating Ceres Solver Library in my Android Application. I have created the prebuilt shared library (.so files) for all the architecture using CMakeLists.txt in Android Studio. Now I want to implement the Bundle adjustment in Java/Kotlin…
Kumar M
  • 994
  • 6
  • 21
3
votes
2 answers

Make C++ automatically convert int to double

When I have a numeric type, which defines operator< for double, but not for int, comparision with int literals does not work. This is a problem, as parts of the standard library, i.e. std::complex contain int literals. Can I make the compiler treat…
allo
  • 3,955
  • 8
  • 40
  • 71
3
votes
1 answer

How to retrieve outliers from ceres solver result?

I try to compare images using method similar to Features2D + Homography to find a known object but replace findHomography() by self-writed findAffine() function. I use Ceres Solver to obtain optimal affine matrix considering outliers. double…
victor1234
  • 871
  • 3
  • 12
  • 28
3
votes
1 answer

Compiling Ceres Solver With Android and Eclipse

I am trying to use ceres solver with my android application, and there does not seem to be a lot of documentation about using them both together properly. I have followed the build instructions from the ceres solver website, as well as this helpful…
The4thIceman
  • 3,709
  • 2
  • 29
  • 36
2
votes
1 answer

google CERES: does ceres free allocated cost functions?

In the non-linear least squares tutorial of the ceres solver http://ceres-solver.org/nnls_tutorial.html the following example is given: int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); // The variable to solve for with its…
matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76
2
votes
1 answer

Why ceres covariance.Compute() seems run forever and not return?

I am trying to write a BA optimizer using Ceres and want to compute the covariances for my optimized results. But the program stuck at covariance.Compute(covariance_blocks, &problem)and it seems never stop computing and runs forever. I debugged deep…
Zhi Li
  • 31
  • 3
2
votes
1 answer

Suppress ceres logging on console

Below is a dummy snippet for computing covariance in ceres-solver ceres::Covariance::Options covarianceOptions; covarianceOptions.algorithm_type = ceres::SPARSE_QR; ceres::Covariance covarianceComputation(covarianceOptions); if(…
Sumit Dey
  • 324
  • 3
  • 12
2
votes
0 answers

Can I use ceres solver to fit a curve that is dynamically created?

I need to fit data to a curve that is chosen by the user as the sum of pre-defined functions. The idea is to create something similar to what peak-o-mat does to spectral data. Example: Fit some data to a function that is the sum of one linear…
2
votes
0 answers

How can I migrate from scipy.minimize to ceres-solver?

How can I rewrite the following code to ceres-solver? I tried to follow this tutorial but it looks a bit confusing. from scipy.optimize import minimize def target_func(point): total_mse = 0 for equation in equations: x, y, z =…
Alex
  • 579
  • 1
  • 6
  • 14
2
votes
1 answer

How to create different solver blocks for the same solution in ceres?

I want to use ceres to calculate triangle coordinates. For the problem I need to solve for mesh coordinates in a mesh. Each triangle has its own vertices, but structure like triangles (3 vertices) and edges (4 vertices) is available. Example data…
allo
  • 3,955
  • 8
  • 40
  • 71
2
votes
1 answer

Install ceres for iOS

I'm trying to install ceres for iOS (both for devices and the simulator, but I think I understand the concept of making them twice and link them with lipo) As the toolchain needs to be from the iOS SDK, the code should look like this: cmake…
Peter
  • 75
  • 1
  • 7
2
votes
0 answers

Trying to build OpenCV sfm on Windows: Ceres_DIR-NOTFOUND

I tried to build OpenCV with sfm module, following this tutorial: https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fqiita.com%2FChaoticActivity%2Fitems%2F3888e886925ef0f84926&sandbox=1. My operating system is Windows 7…
1
2 3 4 5 6 7