Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
vpgl_adjust_lsqr Class Reference

The 3-d offset and scale parameters of rational cameras typically must be adjusted to compensate for errors in geographic alignment. More...

#include <vpgl_rational_adjust.h>

Inheritance diagram for vpgl_adjust_lsqr:
Inheritance graph
[legend]

Public Types

enum  UseGradient
 

Public Member Functions

 vpgl_adjust_lsqr (vpgl_rational_camera< double > const &rcam, std::vector< vgl_point_2d< double > > const &img_pts, std::vector< vgl_point_3d< double > > geo_pts, unsigned num_unknowns, unsigned num_residuals)
 Constructor. More...
 
 ~vpgl_adjust_lsqr () override=default
 Destructor. More...
 
void f (vnl_vector< double > const &x, vnl_vector< double > &fx) override
 The main function. More...
 
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

 no_gradient
 
 use_gradient
 
bool failure
 

Protected Member Functions

void init (unsigned int number_of_unknowns, unsigned int number_of_residuals)
 

Protected Attributes

unsigned num_corrs_
 
vpgl_rational_camera< double > rcam_
 
std::vector< vgl_point_2d< double > > img_pts_
 
std::vector< vgl_point_3d< double > > geo_pts_
 
unsigned int p_
 
unsigned int n_
 
bool use_gradient_
 

Detailed Description

The 3-d offset and scale parameters of rational cameras typically must be adjusted to compensate for errors in geographic alignment.

This algorithm adjusts these parameters to give the smallest projection error. That is, the error between the true image location and the projected 3-d world point corresponding to that location.

Definition at line 27 of file vpgl_rational_adjust.h.

Constructor & Destructor Documentation

◆ vpgl_adjust_lsqr()

vpgl_adjust_lsqr::vpgl_adjust_lsqr ( vpgl_rational_camera< double > const &  rcam,
std::vector< vgl_point_2d< double > > const &  img_pts,
std::vector< vgl_point_3d< double > >  geo_pts,
unsigned  num_unknowns,
unsigned  num_residuals 
)

Constructor.

Note
image points are not homogeneous because require finite points to measure projection error

Definition at line 19 of file vpgl_rational_adjust.cxx.

◆ ~vpgl_adjust_lsqr()

vpgl_adjust_lsqr::~vpgl_adjust_lsqr ( )
overridedefault

Destructor.

Member Function Documentation

◆ f()

void vpgl_adjust_lsqr::f ( vnl_vector< double > const &  x,
vnl_vector< double > &  fx 
)
overridevirtual

The main function.

Given the parameter vector x, compute the vector of residuals fx. fx has been sized appropriately before the call.

Implements vnl_least_squares_function.

Definition at line 32 of file vpgl_rational_adjust.cxx.

Member Data Documentation

◆ geo_pts_

std::vector<vgl_point_3d<double> > vpgl_adjust_lsqr::geo_pts_
protected

Definition at line 54 of file vpgl_rational_adjust.h.

◆ img_pts_

std::vector<vgl_point_2d<double> > vpgl_adjust_lsqr::img_pts_
protected

Definition at line 53 of file vpgl_rational_adjust.h.

◆ num_corrs_

unsigned vpgl_adjust_lsqr::num_corrs_
protected

Definition at line 51 of file vpgl_rational_adjust.h.

◆ rcam_

vpgl_rational_camera<double> vpgl_adjust_lsqr::rcam_
protected

Definition at line 52 of file vpgl_rational_adjust.h.


The documentation for this class was generated from the following files: