The cost function to be used by a Lev-Marq minimization routine, compute the residuals for each correspondence. More...
#include <vpgl_camera_transform.h>

Public Types | |
| enum | UseGradient |
Public Member Functions | |
| vpgl_camera_transform_f (unsigned cnt_residuals, unsigned n_unknowns, const std::vector< vpgl_perspective_camera< double > > &input_cams, std::vector< std::vector< std::pair< vnl_vector_fixed< double, 2 >, unsigned > > > cam_ids_img_pts, std::vector< vnl_vector_fixed< double, 4 > > pts_3d, bool minimize_R=true) | |
| Constructor. The source image is mapped to the destination frame by dt. nbins is the number of histogram bins used to compute entropies. More... | |
| void | f (vnl_vector< double > const &x, vnl_vector< double > &fx) override |
| The main function. More... | |
| virtual vnl_matrix_fixed< double, 3, 3 > | rod_to_matrix (double r0, double r1, double r2) |
| Calculate the Jacobian, given the parameter vector x using forward differencing. More... | |
| virtual void | compute_cams (vnl_vector< double > const &x, std::vector< vpgl_perspective_camera< double > > &output_cams) |
| virtual void | compute_cams_selective (vnl_vector< double > const &x, std::vector< vpgl_perspective_camera< double > > &output_cams) |
| void | throw_failure () |
| void | clear_failure () |
| virtual void | gradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian) |
| void | fdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize) |
| void | ffdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize) |
| virtual void | trace (int iteration, vnl_vector< double > const &x, vnl_vector< double > const &fx) |
| double | rms (vnl_vector< double > const &x) |
| unsigned int | get_number_of_unknowns () const |
| unsigned int | get_number_of_residuals () const |
| bool | has_gradient () const |
| bool VNL_ALGO_EXPORT | vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
| bool VNL_ALGO_EXPORT | vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
| bool VNL_ALGO_EXPORT | vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_vector< double > const &y, vnl_matrix< double > &J) |
| bool VNL_ALGO_EXPORT | vnl_discrete_diff_sym (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
| bool VNL_ALGO_EXPORT | vnl_discrete_diff_sym (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J) |
Public Attributes | |
| std::vector< std::vector< std::pair< vnl_vector_fixed< double, 2 >, unsigned > > > | cam_ids_img_pts_ |
| std::vector< vnl_vector_fixed< double, 4 > > | pts_3d_ |
| std::vector< vpgl_calibration_matrix< double > > | Ks_ |
| std::vector< vnl_matrix_fixed< double, 3, 3 > > | Rs_ |
| std::vector< vgl_point_3d< double > > | Cs_ |
| std::vector< vpgl_perspective_camera< double > > | input_cams_ |
| bool | minimize_R_ |
| no_gradient | |
| use_gradient | |
| bool | failure |
Protected Member Functions | |
| void | init (unsigned int number_of_unknowns, unsigned int number_of_residuals) |
Protected Attributes | |
| unsigned int | p_ |
| unsigned int | n_ |
| bool | use_gradient_ |
The cost function to be used by a Lev-Marq minimization routine, compute the residuals for each correspondence.
6 dimensional param vector, x[0], x[1], x[2] constitute Rodriguez vector of rotation, x[3], x[4], x[5] constitute the translation of the camera
Definition at line 22 of file vpgl_camera_transform.h.
| vpgl_camera_transform_f::vpgl_camera_transform_f | ( | unsigned | cnt_residuals, |
| unsigned | n_unknowns, | ||
| const std::vector< vpgl_perspective_camera< double > > & | input_cams, | ||
| std::vector< std::vector< std::pair< vnl_vector_fixed< double, 2 >, unsigned > > > | cam_ids_img_pts, | ||
| std::vector< vnl_vector_fixed< double, 4 > > | pts_3d, | ||
| bool | minimize_R = true |
||
| ) |
Constructor. The source image is mapped to the destination frame by dt. nbins is the number of histogram bins used to compute entropies.
Definition at line 24 of file vpgl_camera_transform.cxx.
|
virtual |
Definition at line 131 of file vpgl_camera_transform.cxx.
|
virtual |
Definition at line 158 of file vpgl_camera_transform.cxx.
|
overridevirtual |
The main function.
Given the parameter vector x, compute the vector of residuals fx. Fx has been sized appropriately before the call.
Given the parameter vector x, compute the vector of residuals fx.
Implements vnl_least_squares_function.
Definition at line 48 of file vpgl_camera_transform.cxx.
|
virtual |
Calculate the Jacobian, given the parameter vector x using forward differencing.
Fast conversion of rotation from Rodrigues vector to matrix.
virtual void gradf(vnl_vector<double> const& x, vnl_matrix<double>& jacobian);conversion of rodriguez params to R.
Definition at line 97 of file vpgl_camera_transform.cxx.
| std::vector< std::vector< std::pair<vnl_vector_fixed<double, 2>, unsigned> > > vpgl_camera_transform_f::cam_ids_img_pts_ |
Definition at line 45 of file vpgl_camera_transform.h.
| std::vector<vgl_point_3d<double> > vpgl_camera_transform_f::Cs_ |
Definition at line 50 of file vpgl_camera_transform.h.
| std::vector<vpgl_perspective_camera<double> > vpgl_camera_transform_f::input_cams_ |
Definition at line 51 of file vpgl_camera_transform.h.
| std::vector<vpgl_calibration_matrix<double> > vpgl_camera_transform_f::Ks_ |
Definition at line 48 of file vpgl_camera_transform.h.
| bool vpgl_camera_transform_f::minimize_R_ |
Definition at line 53 of file vpgl_camera_transform.h.
| std::vector<vnl_vector_fixed<double, 4> > vpgl_camera_transform_f::pts_3d_ |
Definition at line 46 of file vpgl_camera_transform.h.
| std::vector<vnl_matrix_fixed<double, 3, 3> > vpgl_camera_transform_f::Rs_ |
Definition at line 49 of file vpgl_camera_transform.h.
1.8.15