#include <rgrl_est_proj_rad_func.h>
Public Types | |
typedef rgrl_est_proj_func < Tdim, Fdim > | base_type |
enum | UseGradient |
Public Member Functions | |
rgrl_est_proj_rad_func (rgrl_set_of< rgrl_match_set_sptr > const &matches, unsigned int camera_dof, bool with_grad=true) | |
ctor. | |
rgrl_est_proj_rad_func (unsigned int camera_dof, bool with_grad=true) | |
ctor without matches. | |
bool | projective_estimate (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > &proj, vcl_vector< double > &rad_dist, vnl_matrix< double > &full_covar, vnl_vector_fixed< double, Fdim > &from_centre, vnl_vector_fixed< double, Tdim > &to_centre, vnl_vector_fixed< double, Tdim > const &camera_centre) |
estimate the projective transformation and the associated covariance. | |
void | f (vnl_vector< double > const &x, vnl_vector< double > &fx) |
obj func value. | |
void | gradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian) |
Jacobian. | |
void | set_image_centre (vnl_vector_fixed< double, Tdim > const &image_centre) |
set image centre. | |
void | set_centres (vnl_vector_fixed< double, Fdim > const &from_centre, vnl_vector_fixed< double, Tdim > const &to_centre, vnl_vector_fixed< double, Tdim > const &image_centre) |
set from, to, and image centres. | |
double | centre_mag_norm_const () const |
get centred coordinate normalization constant. | |
void | map_loc (vnl_vector_fixed< double, Tdim > &mapped, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
map a location. | |
void | set_centres (vnl_vector_fixed< double, Fdim > const &fc, vnl_vector_fixed< double, Tdim > const &tc) |
void | set_max_num_iter (int max) |
set max number of iterations. | |
int | max_num_iter () const |
return max number of iterations. | |
void | set_rel_thres (double thres) |
set relative threshold for parameters change. | |
double | rel_thres () const |
relative threshold. | |
void | set_zero_svd_thres (double thres) |
set zero singular value threshold for SVD. | |
double | zero_svd_thres () const |
zero singular value threshold. | |
bool | projective_estimate (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > &proj, vnl_matrix< double > &full_covar, vnl_vector_fixed< double, Fdim > &from_centre, vnl_vector_fixed< double, Tdim > &to_centre) |
estimate the projective transformation and the associated covariance. | |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > | uncentre_proj (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj) const |
uncentre projection matrix. | |
void | map_loc (vnl_vector_fixed< double, Tdim > &mapped, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
map a location. | |
void | throw_failure () |
void | clear_failure () |
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 | reduced_proj_rad_jacobian (vnl_matrix< double > &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian. | |
void | full_proj_rad_jacobian (vnl_matrix< double > &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
compute the full jacobian. | |
void | proj_jac_wrt_loc (vnl_matrix_fixed< double, Tdim, Fdim > &jac_loc, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vcl_vector< double > const &rad_k, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian w.r.t. location. | |
void | convert_parameters (vnl_vector< double > ¶ms, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj_matrix, vcl_vector< double > const &rad_dist, vnl_vector_fixed< double, Fdim > const &fc, vnl_vector_fixed< double, Tdim > const &tc, vnl_vector_fixed< double, Tdim > const &camera_centre) |
convert parameters. | |
void | apply_radial_distortion (vnl_vector_fixed< double, Tdim > &mapped, vnl_vector_fixed< double, Tdim > const &p, vcl_vector< double > const &rad_k) const |
convert parameters. | |
void | transfer_radial_params_into_temp_storage (vnl_vector< double > const ¶ms) const |
transfer parameters into the temp vector. | |
void | reduced_proj_jacobian (vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)-1 > &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian. | |
void | full_proj_jacobian (vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)> &base_jac, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian. | |
void | proj_jac_wrt_loc (vnl_matrix_fixed< double, Tdim, Fdim > &jac_loc, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const &proj, vnl_vector_fixed< double, Fdim > const &from) const |
compute jacobian w.r.t. location. | |
void | convert_parameters (vnl_vector< double > ¶ms, vnl_matrix_fixed< double, Tdim+1, Fdim+1 > proj_matrix, vnl_vector_fixed< double, Fdim > const &fc, vnl_vector_fixed< double, Tdim > const &tc) |
convert parameters. | |
void | restored_centered_proj (vnl_matrix_fixed< double, Tdim+1, Fdim+1 > &proj_matrix, vnl_vector< double > const ¶ms) const |
convert parameters. | |
void | init (unsigned int number_of_unknowns, unsigned int number_of_residuals) |
Protected Attributes | |
unsigned int | camera_dof_ |
vnl_vector_fixed< double, Tdim > | image_centre_ |
double | centre_mag_norm_const_ |
vcl_vector< double > | temp_rad_k_ |
rgrl_set_of < rgrl_match_set_sptr > const * | matches_ptr_ |
vnl_vector_fixed< double, Fdim > | from_centre_ |
vnl_vector_fixed< double, Tdim > | to_centre_ |
unsigned int | index_row_ |
unsigned int | index_col_ |
int | max_num_iterations_ |
specify the maximum number of iterations for this estimator. | |
double | relative_threshold_ |
The threshold for relative parameter change before termination. | |
double | zero_svd_thres_ |
zero singular value threshold. | |
unsigned int | p_ |
unsigned int | n_ |
bool | use_gradient_ |
Static Protected Attributes | |
static const unsigned int | proj_size_ = (Tdim+1)*(Fdim+1) |
Definition at line 17 of file rgrl_est_proj_rad_func.h.
typedef rgrl_est_proj_func<Tdim, Fdim> rgrl_est_proj_rad_func< Tdim, Fdim >::base_type |
Definition at line 21 of file rgrl_est_proj_rad_func.h.
rgrl_est_proj_rad_func< Tdim, Fdim >::rgrl_est_proj_rad_func | ( | rgrl_set_of< rgrl_match_set_sptr > const & | matches, |
unsigned int | camera_dof, | ||
bool | with_grad = true |
||
) |
ctor.
Definition at line 28 of file rgrl_est_proj_rad_func.txx.
rgrl_est_proj_rad_func< Tdim, Fdim >::rgrl_est_proj_rad_func | ( | unsigned int | camera_dof, |
bool | with_grad = true |
||
) |
ctor without matches.
Definition at line 46 of file rgrl_est_proj_rad_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::apply_radial_distortion | ( | vnl_vector_fixed< double, Tdim > & | mapped, |
vnl_vector_fixed< double, Tdim > const & | p, | ||
vcl_vector< double > const & | rad_k | ||
) | const [inline, protected] |
convert parameters.
Definition at line 106 of file rgrl_est_proj_rad_func.txx.
double rgrl_est_proj_rad_func< Tdim, Fdim >::centre_mag_norm_const | ( | ) | const [inline] |
get centred coordinate normalization constant.
Definition at line 74 of file rgrl_est_proj_rad_func.h.
void rgrl_est_proj_rad_func< Tdim, Fdim >::convert_parameters | ( | vnl_vector< double > & | params, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj_matrix, | ||
vcl_vector< double > const & | rad_dist, | ||
vnl_vector_fixed< double, Fdim > const & | fc, | ||
vnl_vector_fixed< double, Tdim > const & | tc, | ||
vnl_vector_fixed< double, Tdim > const & | camera_centre | ||
) | [protected] |
convert parameters.
Definition at line 65 of file rgrl_est_proj_rad_func.txx.
void rgrl_est_proj_func< Tdim, Fdim >::convert_parameters | ( | vnl_vector< double > & | params, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > | proj_matrix, | ||
vnl_vector_fixed< double, Fdim > const & | fc, | ||
vnl_vector_fixed< double, Tdim > const & | tc | ||
) | [protected, inherited] |
convert parameters.
Definition at line 62 of file rgrl_est_proj_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::f | ( | vnl_vector< double > const & | x, |
vnl_vector< double > & | fx | ||
) | [virtual] |
obj func value.
Reimplemented from rgrl_est_proj_func< Tdim, Fdim >.
Definition at line 350 of file rgrl_est_proj_rad_func.txx.
void rgrl_est_proj_func< Tdim, Fdim >::full_proj_jacobian | ( | vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)> & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian.
Definition at line 151 of file rgrl_est_proj_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::full_proj_rad_jacobian | ( | vnl_matrix< double > & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected] |
compute the full jacobian.
Definition at line 209 of file rgrl_est_proj_rad_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::gradf | ( | vnl_vector< double > const & | x, |
vnl_matrix< double > & | jacobian | ||
) | [virtual] |
Jacobian.
Reimplemented from rgrl_est_proj_func< Tdim, Fdim >.
Definition at line 397 of file rgrl_est_proj_rad_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::map_loc | ( | vnl_vector_fixed< double, Tdim > & | mapped, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [inline] |
map a location.
Definition at line 80 of file rgrl_est_proj_rad_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::map_loc | ( | vnl_vector_fixed< double, Tdim > & | mapped, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [inline, inherited] |
map a location.
Definition at line 120 of file rgrl_est_proj_func.h.
int rgrl_est_proj_func< Tdim, Fdim >::max_num_iter | ( | ) | const [inline, inherited] |
return max number of iterations.
Definition at line 81 of file rgrl_est_proj_func.h.
void rgrl_est_proj_rad_func< Tdim, Fdim >::proj_jac_wrt_loc | ( | vnl_matrix_fixed< double, Tdim, Fdim > & | jac_loc, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected] |
compute jacobian w.r.t. location.
Definition at line 291 of file rgrl_est_proj_rad_func.txx.
void rgrl_est_proj_func< Tdim, Fdim >::proj_jac_wrt_loc | ( | vnl_matrix_fixed< double, Tdim, Fdim > & | jac_loc, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian w.r.t. location.
Definition at line 211 of file rgrl_est_proj_func.txx.
bool rgrl_est_proj_rad_func< Tdim, Fdim >::projective_estimate | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > & | proj, |
vcl_vector< double > & | rad_dist, | ||
vnl_matrix< double > & | full_covar, | ||
vnl_vector_fixed< double, Fdim > & | from_centre, | ||
vnl_vector_fixed< double, Tdim > & | to_centre, | ||
vnl_vector_fixed< double, Tdim > const & | camera_centre | ||
) |
estimate the projective transformation and the associated covariance.
Definition at line 450 of file rgrl_est_proj_rad_func.txx.
bool rgrl_est_proj_func< Tdim, Fdim >::projective_estimate | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > & | proj, |
vnl_matrix< double > & | full_covar, | ||
vnl_vector_fixed< double, Fdim > & | from_centre, | ||
vnl_vector_fixed< double, Tdim > & | to_centre | ||
) | [inherited] |
estimate the projective transformation and the associated covariance.
Definition at line 351 of file rgrl_est_proj_func.txx.
void rgrl_est_proj_func< Tdim, Fdim >::reduced_proj_jacobian | ( | vnl_matrix_fixed< double, Tdim,(Fdim+1)*(Tdim+1)-1 > & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected, inherited] |
compute jacobian.
Definition at line 191 of file rgrl_est_proj_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::reduced_proj_rad_jacobian | ( | vnl_matrix< double > & | base_jac, |
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj, | ||
vcl_vector< double > const & | rad_k, | ||
vnl_vector_fixed< double, Fdim > const & | from | ||
) | const [protected] |
compute jacobian.
Definition at line 127 of file rgrl_est_proj_rad_func.txx.
double rgrl_est_proj_func< Tdim, Fdim >::rel_thres | ( | ) | const [inline, inherited] |
relative threshold.
Definition at line 89 of file rgrl_est_proj_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::restored_centered_proj | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > & | proj_matrix, |
vnl_vector< double > const & | params | ||
) | const [protected, inherited] |
convert parameters.
Definition at line 242 of file rgrl_est_proj_func.txx.
void rgrl_est_proj_rad_func< Tdim, Fdim >::set_centres | ( | vnl_vector_fixed< double, Fdim > const & | from_centre, |
vnl_vector_fixed< double, Tdim > const & | to_centre, | ||
vnl_vector_fixed< double, Tdim > const & | image_centre | ||
) | [inline] |
set from, to, and image centres.
Definition at line 60 of file rgrl_est_proj_rad_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::set_centres | ( | vnl_vector_fixed< double, Fdim > const & | fc, |
vnl_vector_fixed< double, Tdim > const & | tc | ||
) | [inline, inherited] |
Definition at line 69 of file rgrl_est_proj_func.h.
void rgrl_est_proj_rad_func< Tdim, Fdim >::set_image_centre | ( | vnl_vector_fixed< double, Tdim > const & | image_centre | ) | [inline] |
set image centre.
Definition at line 49 of file rgrl_est_proj_rad_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::set_max_num_iter | ( | int | max | ) | [inline, inherited] |
set max number of iterations.
Definition at line 77 of file rgrl_est_proj_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::set_rel_thres | ( | double | thres | ) | [inline, inherited] |
set relative threshold for parameters change.
Definition at line 85 of file rgrl_est_proj_func.h.
void rgrl_est_proj_func< Tdim, Fdim >::set_zero_svd_thres | ( | double | thres | ) | [inline, inherited] |
set zero singular value threshold for SVD.
Definition at line 93 of file rgrl_est_proj_func.h.
void rgrl_est_proj_rad_func< Tdim, Fdim >::transfer_radial_params_into_temp_storage | ( | vnl_vector< double > const & | params | ) | const [protected] |
transfer parameters into the temp vector.
Definition at line 93 of file rgrl_est_proj_rad_func.txx.
vnl_matrix_fixed< double, Tdim+1, Fdim+1 > rgrl_est_proj_func< Tdim, Fdim >::uncentre_proj | ( | vnl_matrix_fixed< double, Tdim+1, Fdim+1 > const & | proj | ) | const [inherited] |
uncentre projection matrix.
uncenter projection matrix.
Definition at line 123 of file rgrl_est_proj_func.txx.
double rgrl_est_proj_func< Tdim, Fdim >::zero_svd_thres | ( | ) | const [inline, inherited] |
zero singular value threshold.
Definition at line 97 of file rgrl_est_proj_func.h.
unsigned int rgrl_est_proj_rad_func< Tdim, Fdim >::camera_dof_ [protected] |
Definition at line 137 of file rgrl_est_proj_rad_func.h.
double rgrl_est_proj_rad_func< Tdim, Fdim >::centre_mag_norm_const_ [protected] |
Definition at line 139 of file rgrl_est_proj_rad_func.h.
vnl_vector_fixed<double, Fdim> rgrl_est_proj_func< Tdim, Fdim >::from_centre_ [protected, inherited] |
Definition at line 160 of file rgrl_est_proj_func.h.
vnl_vector_fixed<double, Tdim> rgrl_est_proj_rad_func< Tdim, Fdim >::image_centre_ [protected] |
Definition at line 138 of file rgrl_est_proj_rad_func.h.
unsigned int rgrl_est_proj_func< Tdim, Fdim >::index_col_ [protected, inherited] |
Definition at line 164 of file rgrl_est_proj_func.h.
unsigned int rgrl_est_proj_func< Tdim, Fdim >::index_row_ [protected, inherited] |
Definition at line 163 of file rgrl_est_proj_func.h.
rgrl_set_of<rgrl_match_set_sptr> const* rgrl_est_proj_func< Tdim, Fdim >::matches_ptr_ [protected, inherited] |
Definition at line 159 of file rgrl_est_proj_func.h.
int rgrl_est_proj_func< Tdim, Fdim >::max_num_iterations_ [protected, inherited] |
specify the maximum number of iterations for this estimator.
Definition at line 166 of file rgrl_est_proj_func.h.
const unsigned int rgrl_est_proj_func< Tdim, Fdim >::proj_size_ = (Tdim+1)*(Fdim+1) [static, protected, inherited] |
Definition at line 157 of file rgrl_est_proj_func.h.
double rgrl_est_proj_func< Tdim, Fdim >::relative_threshold_ [protected, inherited] |
The threshold for relative parameter change before termination.
Definition at line 169 of file rgrl_est_proj_func.h.
vcl_vector<double> rgrl_est_proj_rad_func< Tdim, Fdim >::temp_rad_k_ [mutable, protected] |
Definition at line 140 of file rgrl_est_proj_rad_func.h.
vnl_vector_fixed<double, Tdim> rgrl_est_proj_func< Tdim, Fdim >::to_centre_ [protected, inherited] |
Definition at line 161 of file rgrl_est_proj_func.h.
double rgrl_est_proj_func< Tdim, Fdim >::zero_svd_thres_ [protected, inherited] |
zero singular value threshold.
Definition at line 172 of file rgrl_est_proj_func.h.