0
votes

I am new to ceres (non-linear Least Square) solver and c++ template programming. I have successfully installed ceres solver and executed the bundle_adjuster.cc code on ubuntu by downloading the dataset posted on http://grail.cs.washington.edu/projects/bal/. I have to use Bundle Adjustment as a black-box in the project. I want to print the refined camera poses, three dimensional coordinate of the datasets. How to do this, what should I edit in the bundle_adjuster.cc to get new pose matrix and 3D coordinate.

Thanks.

1

1 Answers

1
votes

The refined camera poses and 3D object points are in the bal_problem struct:

double* points = bal_problem->mutable_points();
double* cameras = bal_problem->mutable_cameras();

They are just array with doubles, every 3D point takes 3 (X,Y,Z) and every camera takes 6 (Rodrigues angle-axis rotation plus translation) doubles.

So for the points array: X0 Y0 Z0 X1 Y1 Z1, ... and for the cameras: R00 R10 R20 X0 Y0 Z0 R01 R21 R31 X1 Y1 Z1, ...