Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
vpgl_orientation_lsqr Class Reference

this class optimizes the rotation of a perspective camera given an initial estimate and a known internal calibration and position. More...

#include <vpgl_optimize_camera.h>

Inheritance diagram for vpgl_orientation_lsqr:
Inheritance graph
[legend]

List of all members.

Public Types

enum  UseGradient

Public Member Functions

 vpgl_orientation_lsqr (const vpgl_calibration_matrix< double > &K, const vgl_point_3d< double > &c, const vcl_vector< vgl_homg_point_3d< double > > &world_points, const vcl_vector< vgl_point_2d< double > > &image_points)
 Constructor.
virtual ~vpgl_orientation_lsqr ()
 Destructor.
virtual void f (vnl_vector< double > const &x, vnl_vector< double > &fx)
 The main function.
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_discrete_diff_fwd (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool 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_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_discrete_diff_sym (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool 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

vpgl_calibration_matrix< double > K_
 The fixed internal camera calibration.
vgl_point_3d< double > c_
 The fixed camera center.
vcl_vector< vgl_homg_point_3d
< double > > 
world_points_
 The known points in the world.
vcl_vector< vgl_point_2d
< double > > 
image_points_
 The corresponding points in the image.
unsigned int p_
unsigned int n_
bool use_gradient_

Detailed Description

this class optimizes the rotation of a perspective camera given an initial estimate and a known internal calibration and position.

Definition at line 17 of file vpgl_optimize_camera.h.


Constructor & Destructor Documentation

vpgl_orientation_lsqr::vpgl_orientation_lsqr ( const vpgl_calibration_matrix< double > &  K,
const vgl_point_3d< double > &  c,
const vcl_vector< vgl_homg_point_3d< double > > &  world_points,
const vcl_vector< vgl_point_2d< double > > &  image_points 
)

Constructor.

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

Definition at line 18 of file vpgl_optimize_camera.cxx.

virtual vpgl_orientation_lsqr::~vpgl_orientation_lsqr ( ) [inline, virtual]

Destructor.

Definition at line 27 of file vpgl_optimize_camera.h.


Member Function Documentation

void vpgl_orientation_lsqr::f ( vnl_vector< double > const &  x,
vnl_vector< double > &  fx 
) [virtual]

The main function.

Given the parameter vector x, compute the vector of residuals fx. Fx has been sized appropriately before the call. The parameters in x are the {wx, wy, wz} where w is the Rodrigues vector of the rotation.

Implements vnl_least_squares_function.

Definition at line 38 of file vpgl_optimize_camera.cxx.


Member Data Documentation

The fixed camera center.

Definition at line 45 of file vpgl_optimize_camera.h.

vcl_vector<vgl_point_2d<double> > vpgl_orientation_lsqr::image_points_ [protected]

The corresponding points in the image.

Definition at line 49 of file vpgl_optimize_camera.h.

The fixed internal camera calibration.

Definition at line 43 of file vpgl_optimize_camera.h.

vcl_vector<vgl_homg_point_3d<double> > vpgl_orientation_lsqr::world_points_ [protected]

The known points in the world.

Definition at line 47 of file vpgl_optimize_camera.h.


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