16 const std::vector<std::vector<bool> >& mask)
21 Km_.push_back(i.get_matrix());
32 const std::vector<std::vector<bool> >& mask)
37 Km_.push_back(i.get_matrix());
97 return {bj[0], bj[1], bj[2]};
141 for (
unsigned int i=0; i<cameras.size(); ++i)
151 ai[0]=w[0]; ai[1]=w[1]; ai[2]=w[2];
152 ai[3]=c.
x(); ai[4]=c.
y(); ai[5]=c.
z();
163 for (
unsigned int j=0; j<world_points.size(); ++j){
166 bj[0]=point.
x(); bj[1]=point.
y(); bj[2]=point.
z();
vnl_matrix_ref< T > as_ref()
void jac_Aij(unsigned int i, unsigned int j, vnl_double_3x4 const &Pi, vnl_vector< double > const &ai, vnl_vector< double > const &bj, vnl_vector< double > const &c, vnl_matrix< double > &Aij) override
compute the Jacobian Aij.
static void jac_camera_rotation(vnl_double_3x3 const &K, vnl_vector< double > const &C, vnl_vector< double > const &r, vnl_vector< double > const &pt, vnl_matrix< double > &J)
compute the 2x3 Jacobian of camera projection with respect to camera rotation df/dr where $f(r) = K*r...
static vnl_double_3x3 rod_to_matrix(vnl_vector< double > const &r)
Fast conversion of rotation from Rodrigues vector to matrix.
static void jac_camera_center(vnl_double_3x3 const &M, vnl_vector< double > const &C, vnl_vector< double > const &pt, vnl_matrix< double > &J)
compute the 2x3 Jacobian of camera projection with respect to camera center df/dC where $f(C) = [M | ...
double const * data_block() const
vnl_vector_fixed< T, 3 > as_rodrigues() const
vnl_double_3x4 param_to_cam_matrix(int i, const double *ai, const vnl_vector< double > &c) const override
compute a 3x4 camera matrix of camera
std::vector< vpgl_calibration_matrix< double > > K_
The fixed internal camera calibration.
Bundle adjustment sparse least squares class for fixed intrinsics.
const vgl_rotation_3d< T > & get_rotation() const
vgl_homg_point_3d< double > param_to_point(int j, const double *bj, const vnl_vector< double > &c) const override
construct the
std::vector< vnl_double_3x3 > Km_
The fixed internal camera calibration in matrix form.
void jac_Bij(unsigned int i, unsigned int j, vnl_double_3x4 const &Pi, vnl_vector< double > const &ai, vnl_vector< double > const &bj, vnl_vector< double > const &c, vnl_matrix< double > &Bij) override
compute the Jacobian Bij.
base class bundle adjustment sparse least squares function.
vnl_matrix< T > extract(unsigned r, unsigned c, unsigned top=0, unsigned left=0) const
const vgl_point_3d< T > & get_camera_center() const
vnl_vector_fixed< double, 4 > param_to_pt_vector(int j, const double *bj, const vnl_vector< double > &c) const override
construct the
void jac_Cij(unsigned int i, unsigned int j, vnl_double_3x4 const &Pi, vnl_vector< double > const &ai, vnl_vector< double > const &bj, vnl_vector< double > const &c, vnl_matrix< double > &Cij) override
compute the Jacobian Cij.
static void jac_inhomg_3d_point(vnl_double_3x4 const &P, vnl_vector< double > const &pt, vnl_matrix< double > &J)
compute the 2x3 Jacobian of camera projection with respect to point location df/dpt where $f(pt) = P*...
This class implements the perspective camera class as described in Hartley & Zisserman as a finite ca...
vpgl_ba_fixed_k_lsqr(std::vector< vpgl_calibration_matrix< double > > K, const std::vector< vgl_point_2d< double > > &image_points, const std::vector< std::vector< bool > > &mask)
Constructor.
static vnl_vector< double > create_param_vector(const std::vector< vpgl_perspective_camera< double > > &cameras)
Create the parameter vector a from a vector of cameras.
vnl_matrix_fixed & set_column(unsigned i, T const *v)
vnl_matrix< double > & update(vnl_matrix< double > const &, unsigned top=0, unsigned left=0)
vpgl_perspective_camera< double > param_to_cam(int i, const double *ai, const vnl_vector< double > &c) const override
construct the
vnl_matrix_fixed & set_columns(unsigned starting_column, vnl_matrix< T > const &M)