Functions
vpgl_rational_adjust_multipt.cxx File Reference
#include <cmath>
#include <limits>
#include <utility>
#include "vpgl_rational_adjust_multipt.h"
#include <cassert>
#include <vgl/vgl_point_3d.h>
#include <vnl/vnl_numeric_traits.h>
#include <vnl/algo/vnl_levenberg_marquardt.h>
#include <vpgl/algo/vpgl_backproject.h>
#include <vpgl/algo/vpgl_ray_intersect.h>
#include <vpgl/algo/vpgl_rational_adjust_onept.h>

Go to the source code of this file.

Functions

double compute_projection_error (std::vector< vpgl_rational_camera< double > > const &cams, std::vector< vgl_point_2d< double > > const &corrs, vgl_point_3d< double > &intersection)
 
double error_corr (vpgl_rational_camera< double > const &cam, vgl_point_2d< double > const &corr, vgl_point_3d< double > const &intersection)
 
double re_projection_error (std::vector< vpgl_rational_camera< double > > const &cams, std::vector< float > const &cam_weights, std::vector< std::vector< vgl_point_2d< double > > > const &corrs, std::vector< vgl_point_3d< double > > const &intersections, std::vector< vgl_point_3d< double > > &finals)
 assumes an initial estimate for intersection values, only refines the intersection and computes a re-projection error. More...
 
void re_projection_error (std::vector< vpgl_rational_camera< double > > const &cams, std::vector< float > const &cam_weights, std::vector< std::vector< vgl_point_2d< double > > > const &corrs, std::vector< vgl_point_3d< double > > const &intersections, std::vector< vgl_point_3d< double > > &finals, vnl_vector< double > &errors)
 assumes an initial estimate for intersection values, only refines the intersection and computes a re-projection error for each corr separately. More...
 
void print_perm (std::vector< unsigned > &params_indices)
 
bool increment_perm (std::vector< unsigned > &params_indices, unsigned size)
 to generate the permutations, always increment the one at the very end by one; if it exceeds max, then increment the one before as well, etc. More...
 

Function Documentation

◆ compute_projection_error()

double compute_projection_error ( std::vector< vpgl_rational_camera< double > > const &  cams,
std::vector< vgl_point_2d< double > > const &  corrs,
vgl_point_3d< double > &  intersection 
)

Definition at line 19 of file vpgl_rational_adjust_multipt.cxx.

◆ error_corr()

double error_corr ( vpgl_rational_camera< double > const &  cam,
vgl_point_2d< double > const &  corr,
vgl_point_3d< double > const &  intersection 
)

Definition at line 35 of file vpgl_rational_adjust_multipt.cxx.

◆ increment_perm()

bool increment_perm ( std::vector< unsigned > &  params_indices,
unsigned  size 
)

to generate the permutations, always increment the one at the very end by one; if it exceeds max, then increment the one before as well, etc.

Definition at line 103 of file vpgl_rational_adjust_multipt.cxx.

◆ print_perm()

void print_perm ( std::vector< unsigned > &  params_indices)

Definition at line 95 of file vpgl_rational_adjust_multipt.cxx.

◆ re_projection_error() [1/2]

double re_projection_error ( std::vector< vpgl_rational_camera< double > > const &  cams,
std::vector< float > const &  cam_weights,
std::vector< std::vector< vgl_point_2d< double > > > const &  corrs,
std::vector< vgl_point_3d< double > > const &  intersections,
std::vector< vgl_point_3d< double > > &  finals 
)

assumes an initial estimate for intersection values, only refines the intersection and computes a re-projection error.

Definition at line 42 of file vpgl_rational_adjust_multipt.cxx.

◆ re_projection_error() [2/2]

void re_projection_error ( std::vector< vpgl_rational_camera< double > > const &  cams,
std::vector< float > const &  cam_weights,
std::vector< std::vector< vgl_point_2d< double > > > const &  corrs,
std::vector< vgl_point_3d< double > > const &  intersections,
std::vector< vgl_point_3d< double > > &  finals,
vnl_vector< double > &  errors 
)

assumes an initial estimate for intersection values, only refines the intersection and computes a re-projection error for each corr separately.

Definition at line 66 of file vpgl_rational_adjust_multipt.cxx.